fixed infantry subposition count error, and corrected loopup table orders. (#108)

This commit is contained in:
Zero Fanker 2024-11-04 21:59:56 -05:00 committed by GitHub
parent 98e8b7c562
commit 8ddde4466d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -62,7 +62,7 @@
#define PICDATA_TYPE_SHP 1
#define PICDATA_TYPE_VXL 2
#define SUBPOS_COUNT 3
#define SUBPOS_COUNT 4
#define REAL_SUBPOS_COUNT 3
#define SOUND_NONE 0

View file

@ -6002,8 +6002,14 @@ void CIsoView::DrawMap()
DrawCell(drawCoords.x, drawCoords.y, 1, 1, c);
#endif
static const ProjectedVec subPosLookup[5] = { ProjectedVec(0, -f_y / 4), ProjectedVec(f_x / 4 , 0), ProjectedVec(-f_x / 4, 0), ProjectedVec(0, f_y / 4), ProjectedVec() };
auto drawCoordsInf = drawCoords + subPosLookup[ic > 4 ? 4 : ic];
static const ProjectedVec subPosLookup[5] = {
ProjectedVec(),
ProjectedVec(f_x / 4 , 0),
ProjectedVec(-f_x / 4, 0),
ProjectedVec(0, f_y / 4),
ProjectedVec(0, -f_y / 4),
};
auto drawCoordsInf = drawCoords + subPosLookup[std::min(ic, 4)];
PICDATA p;