mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-21 23:08:49 -05:00
Fix pokitto
This commit is contained in:
parent
87b079630f
commit
91a7814193
9
main.c
9
main.c
@ -635,7 +635,7 @@ void SFG_setAndInitLevel(const SFG_Level *level)
|
||||
|
||||
for (uint8_t i = 0; i < SFG_MAX_LEVEL_ELEMENTS; ++i)
|
||||
{
|
||||
SFG_LevelElement *e = &(SFG_currentLevel.levelPointer->elements[i]);
|
||||
const SFG_LevelElement *e = &(SFG_currentLevel.levelPointer->elements[i]);
|
||||
|
||||
if (e->elementType == SFG_LEVEL_ELEMENT_BARREL)
|
||||
{
|
||||
@ -885,9 +885,10 @@ void SFG_draw()
|
||||
SFG_floorHeightAt(e.coords[0],e.coords[1]) + RCL_UNITS_PER_SQUARE / 2,
|
||||
SFG_player.camera);
|
||||
|
||||
SFG_drawScaledImage(SFG_sprites[0],p.position.x,p.position.y,
|
||||
RCL_perspectiveScale(SFG_GAME_RESOLUTION_Y / 2,p.depth),
|
||||
p.depth / (RCL_UNITS_PER_SQUARE * 2));
|
||||
if (p.depth > 0)
|
||||
SFG_drawScaledImage(SFG_sprites[0],p.position.x,p.position.y,
|
||||
RCL_perspectiveScale(SFG_GAME_RESOLUTION_Y / 2,p.depth),
|
||||
p.depth / (RCL_UNITS_PER_SQUARE * 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1636,8 +1636,8 @@ RCL_PixelInfo RCL_mapToScreen(RCL_Vector2D worldPosition, RCL_Unit height,
|
||||
|
||||
result.position.y = camera.resolution.y / 2 -
|
||||
(camera.resolution.y *
|
||||
RCL_perspectiveScale(height - camera.height,result.depth)) / RCL_UNITS_PER_SQUARE
|
||||
+ camera.shear;
|
||||
RCL_perspectiveScale(height - camera.height,result.depth))
|
||||
/ RCL_UNITS_PER_SQUARE + camera.shear;
|
||||
|
||||
RCL_Unit middleColumn = camera.resolution.x / 2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user