mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-21 08:25:05 -05:00
Add todo
This commit is contained in:
parent
d3a4b42c49
commit
e0bcec79ca
7
assets.h
7
assets.h
@ -727,6 +727,13 @@ uint8_t SFG_weaponImages[][SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE] =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* TODO: ENEMIES: create a functions that will take enemy ID and frame type
|
||||||
|
(idle, attacking, ...) and will return pointer to sprite representing it --
|
||||||
|
allows reusing sprites and saving memory (e.g. a fyling monster can have same
|
||||||
|
frame for idle and walking, some enemies can share the same dead sprite etc.).
|
||||||
|
Also: add flip option to sprite drawing function so that some frames can be
|
||||||
|
reused flipped (good for walk anims). */
|
||||||
|
|
||||||
uint8_t SFG_charToFontIndex(char c)
|
uint8_t SFG_charToFontIndex(char c)
|
||||||
{
|
{
|
||||||
if (c >= 'a' && c <= 'z')
|
if (c >= 'a' && c <= 'z')
|
||||||
|
13
main.c
13
main.c
@ -1177,11 +1177,16 @@ void SFG_gameStep()
|
|||||||
SFG_currentLevel.levelPointer->elements[item];
|
SFG_currentLevel.levelPointer->elements[item];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(RCL_absVal(SFG_player.squarePosition[0] - e.coords[0])
|
RCL_absVal(SFG_player.squarePosition[0] - e.coords[0])
|
||||||
<= SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE)
|
<= SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE
|
||||||
&&
|
&&
|
||||||
(RCL_absVal(SFG_player.squarePosition[1] - e.coords[1])
|
RCL_absVal(SFG_player.squarePosition[1] - e.coords[1])
|
||||||
<= SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE)
|
<= SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE
|
||||||
|
&&
|
||||||
|
RCL_absVal(
|
||||||
|
SFG_player.camera.height -
|
||||||
|
SFG_floorHeightAt(e.coords[0],e.coords[1]))
|
||||||
|
<= (SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE * RCL_UNITS_PER_SQUARE)
|
||||||
)
|
)
|
||||||
item |= SFG_ITEM_RECORD_ACTIVE_MASK;
|
item |= SFG_ITEM_RECORD_ACTIVE_MASK;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user