author | ecalot
<ecalot> 2005-01-31 00:18:37 UTC |
committer | ecalot
<ecalot> 2005-01-31 00:18:37 UTC |
parent | 122a76b4207a9791fa2ad8e48dcaa7b61874991e |
FP/src/include/types.h | +1 | -1 |
FP/src/res/maps.c | +11 | -1 |
diff --git a/FP/src/include/types.h b/FP/src/include/types.h index 5c89c88..8569d32 100644 --- a/FP/src/include/types.h +++ b/FP/src/include/types.h @@ -76,7 +76,7 @@ typedef struct { typedef struct { int frame; - enum {eChoActive,eChoInactive,eSpiUp,eSpiWaitUp,eSpiDown,eSpiStuck} action; + enum {eChoActive,eChoInactive,eSpiUp,eSpiWaitUp,eSpiDown,eSpiStuck,eLosNormal,eLosMoving,eLosDown} action; union { int time; unsigned char back; diff --git a/FP/src/res/maps.c b/FP/src/res/maps.c index 3d5ce21..c3af729 100644 --- a/FP/src/res/maps.c +++ b/FP/src/res/maps.c @@ -138,7 +138,17 @@ void* mapLoadLevel(tMemory level) { /* initialize the tDanger object*/ newDanger.frame=0; newDanger.more.time=1; - newDanger.action=((map->fore[i*30+j]&0x1f)==TILE_CHOPPER)?eChoInactive:eSpiDown; + switch (map->fore[i*30+j]&0x1f) { + case TILE_CHOPPER: + newDanger.action=eChoInactive; + break; + case TILE_SPIKES: + newDanger.action=eSpiDown; + break; + case TILE_LOOSE: + newDanger.action=eLosNormal; + break; + } map->back[i*30+j]=dangerInRoom; map->screenDangers[i][dangerInRoom]=map->dangers+dangers; #ifdef DEBUGMAPS