Fix monster visbility

This commit is contained in:
Miloslav Číž 2020-08-22 22:34:18 +02:00
parent 68285eebfa
commit 53301eca94
2 changed files with 3 additions and 2 deletions

View File

@ -184,6 +184,7 @@ done:
- add universal corpse sprite?
- if space left, try blurring (lerp) the level background, see how it looks
- replace textures in distace with constant color for performance (setting)?
- enemies close to a wall often don't get drawn
scratched:
- try to make z-buffer 3 line instead of 1D, possibly like this (to keep

4
main.c
View File

@ -199,7 +199,7 @@ typedef struct
#define SFG_MR_TYPE(mr) \
(SFG_MONSTER_INDEX_TO_TYPE(((mr).stateType & SFG_MONSTER_MASK_TYPE) >> 4))
#define SFG_MONSTER_COORD_TO_RCL_UNITS(c) (c * 256)
#define SFG_MONSTER_COORD_TO_RCL_UNITS(c) ((RCL_UNITS_PER_SQUARE / 8) + c * 256)
#define SFG_MONSTER_COORD_TO_SQUARES(c) (c / 4)
#define SFG_ELEMENT_COORD_TO_RCL_UNITS(c) \
@ -720,7 +720,7 @@ static inline uint8_t SFG_getTexelAverage(uint8_t textureIndex)
}
void SFG_pixelFunc(RCL_PixelInfo *pixel)
{
{
uint8_t color;
uint8_t shadow = 0;