| 126 | } |
| 127 | |
| 128 | static void HUDScreen_BuildPosition(struct HUDScreen* s, struct VertexTextured* data) { |
| 129 | struct VertexTextured* cur = data; |
| 130 | struct TextAtlas* atlas = &s->posAtlas; |
| 131 | struct Texture tex; |
| 132 | IVec3 pos; |
| 133 | |
| 134 | /* Make "Position: " prefix */ |
| 135 | tex = atlas->tex; |
| 136 | tex.x = 2 + DisplayInfo.ContentOffsetX; |
| 137 | tex.width = atlas->offset; |
| 138 | Gfx_Make2DQuad(&tex, PACKEDCOL_WHITE, &cur); |
| 139 | |
| 140 | IVec3_Floor(&pos, &Entities.CurPlayer->Base.Position); |
| 141 | atlas->curX = tex.x + tex.width; |
| 142 | |
| 143 | /* Make (X, Y, Z) suffix */ |
| 144 | TextAtlas_Add(atlas, 13, &cur); |
| 145 | TextAtlas_AddInt(atlas, pos.x, &cur); |
| 146 | TextAtlas_Add(atlas, 11, &cur); |
| 147 | TextAtlas_AddInt(atlas, pos.y, &cur); |
| 148 | TextAtlas_Add(atlas, 11, &cur); |
| 149 | TextAtlas_AddInt(atlas, pos.z, &cur); |
| 150 | TextAtlas_Add(atlas, 14, &cur); |
| 151 | |
| 152 | s->lastX = pos.x; |
| 153 | s->lastY = pos.y; |
| 154 | s->lastZ = pos.z; |
| 155 | |
| 156 | s->posCount = (int)(cur - data); |
| 157 | } |
| 158 | |
| 159 | static cc_bool HUDScreen_HasHacksChanged(struct HUDScreen* s) { |
| 160 | struct HacksComp* hacks = &Entities.CurPlayer->Hacks; |
no test coverage detected