mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-10-31 15:25:04 -04:00
Fix pokitto
This commit is contained in:
parent
87b079630f
commit
91a7814193
3
main.c
3
main.c
@ -635,7 +635,7 @@ void SFG_setAndInitLevel(const SFG_Level *level)
|
|||||||
|
|
||||||
for (uint8_t i = 0; i < SFG_MAX_LEVEL_ELEMENTS; ++i)
|
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)
|
if (e->elementType == SFG_LEVEL_ELEMENT_BARREL)
|
||||||
{
|
{
|
||||||
@ -885,6 +885,7 @@ void SFG_draw()
|
|||||||
SFG_floorHeightAt(e.coords[0],e.coords[1]) + RCL_UNITS_PER_SQUARE / 2,
|
SFG_floorHeightAt(e.coords[0],e.coords[1]) + RCL_UNITS_PER_SQUARE / 2,
|
||||||
SFG_player.camera);
|
SFG_player.camera);
|
||||||
|
|
||||||
|
if (p.depth > 0)
|
||||||
SFG_drawScaledImage(SFG_sprites[0],p.position.x,p.position.y,
|
SFG_drawScaledImage(SFG_sprites[0],p.position.x,p.position.y,
|
||||||
RCL_perspectiveScale(SFG_GAME_RESOLUTION_Y / 2,p.depth),
|
RCL_perspectiveScale(SFG_GAME_RESOLUTION_Y / 2,p.depth),
|
||||||
p.depth / (RCL_UNITS_PER_SQUARE * 2));
|
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 -
|
result.position.y = camera.resolution.y / 2 -
|
||||||
(camera.resolution.y *
|
(camera.resolution.y *
|
||||||
RCL_perspectiveScale(height - camera.height,result.depth)) / RCL_UNITS_PER_SQUARE
|
RCL_perspectiveScale(height - camera.height,result.depth))
|
||||||
+ camera.shear;
|
/ RCL_UNITS_PER_SQUARE + camera.shear;
|
||||||
|
|
||||||
RCL_Unit middleColumn = camera.resolution.x / 2;
|
RCL_Unit middleColumn = camera.resolution.x / 2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user