U8 to U16 type updates
This commit is contained in:
parent
a3db4baad2
commit
532aebc43c
|
@ -43,9 +43,9 @@ typedef struct {
|
||||||
} hscore_t;
|
} hscore_t;
|
||||||
|
|
||||||
extern U16 game_status_dirty; /* status dirty flag */
|
extern U16 game_status_dirty; /* status dirty flag */
|
||||||
extern U8 game_lives; /* lives counter */
|
extern U16 game_lives; /* lives counter */
|
||||||
extern U8 game_bombs; /* bombs counter */
|
extern U16 game_bombs; /* bombs counter */
|
||||||
extern U8 game_bullets; /* bullets counter */
|
extern U16 game_bullets; /* bullets counter */
|
||||||
|
|
||||||
extern U32 game_score; /* score */
|
extern U32 game_score; /* score */
|
||||||
|
|
||||||
|
@ -54,11 +54,11 @@ extern hscore_t game_hscores[8]; /* highest scores (hall of fame) */
|
||||||
extern U16 game_map; /* current map */
|
extern U16 game_map; /* current map */
|
||||||
extern U16 game_submap; /* current submap */
|
extern U16 game_submap; /* current submap */
|
||||||
|
|
||||||
extern U8 game_dir; /* direction (LEFT, RIGHT) */
|
extern U16 game_dir; /* direction (LEFT, RIGHT) */
|
||||||
extern U8 game_chsm; /* change submap request (TRUE, FALSE) */
|
extern U16 game_chsm; /* change submap request (TRUE, FALSE) */
|
||||||
|
|
||||||
extern U8 game_waitevt; /* wait for events (TRUE, FALSE) */
|
extern U16 game_waitevt; /* wait for events (TRUE, FALSE) */
|
||||||
extern U8 game_period; /* time between each frame, in millisecond */
|
extern U16 game_period; /* time between each frame, in millisecond */
|
||||||
|
|
||||||
extern rect_t *game_rects; /* rectangles to redraw at each frame */
|
extern rect_t *game_rects; /* rectangles to redraw at each frame */
|
||||||
|
|
||||||
|
@ -68,9 +68,9 @@ extern void game_stopmusic(void);
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_CHEATS
|
#ifdef ENABLE_CHEATS
|
||||||
extern U8 game_cheat1; /* infinite lives, bombs and bullets */
|
extern U16 game_cheat1; /* infinite lives, bombs and bullets */
|
||||||
extern U8 game_cheat2; /* never die */
|
extern U16 game_cheat2; /* never die */
|
||||||
extern U8 game_cheat3; /* highlight sprites */
|
extern U16 game_cheat3; /* highlight sprites */
|
||||||
extern void game_toggleCheat(U8);
|
extern void game_toggleCheat(U8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ extern U8 map_eflg[0x100]; /* current */
|
||||||
/*
|
/*
|
||||||
* map_map top row within the submap
|
* map_map top row within the submap
|
||||||
*/
|
*/
|
||||||
extern U8 map_frow;
|
extern U16 map_frow;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* tiles offset
|
* tiles offset
|
||||||
|
|
|
@ -162,10 +162,10 @@ connect_t map_connect[MAP_NBR_CONNECT] = {
|
||||||
{0xff, 0x00, 0x00, 0x00},
|
{0xff, 0x00, 0x00, 0x00},
|
||||||
/* map 1 submap 11 */
|
/* map 1 submap 11 */
|
||||||
{0x01, 0x18, 0x10, 0x18},
|
{0x01, 0x18, 0x10, 0x18},
|
||||||
{0000, 0x38, 0x12, 0x18}, /* was {0000, 0x38, 0x13, 0x68} ?? - now OK */
|
{0000, 0x38, 0x13, 0x68},
|
||||||
{0xff, 0x00, 0x00, 0x00},
|
{0xff, 0x00, 0x00, 0x00},
|
||||||
/* map 1 submap 12 */
|
/* map 1 submap 12 -- NOT PLAYABLE - skipped */
|
||||||
{0x01, 0x18, 0x11, 0x38}, /* pointless since it's not possible to go back */
|
{0x01, 0x18, 0x11, 0x38},
|
||||||
{0000, 0x68, 0x13, 0x68},
|
{0000, 0x68, 0x13, 0x68},
|
||||||
{0xff, 0x00, 0x00, 0x00},
|
{0xff, 0x00, 0x00, 0x00},
|
||||||
/* map 1 submap 13 */
|
/* map 1 submap 13 */
|
||||||
|
@ -1952,11 +1952,11 @@ mark_t map_marks[MAP_NBR_MARKS] = {
|
||||||
{0x48, 0x19, 0x88, 0x1d, 0x25},
|
{0x48, 0x19, 0x88, 0x1d, 0x25},
|
||||||
{0x48, 0x09, 0000, 0xcd, 0x04},
|
{0x48, 0x09, 0000, 0xcd, 0x04},
|
||||||
{0x50, 0x07, 0000, 0x45, 0x80},
|
{0x50, 0x07, 0000, 0x45, 0x80},
|
||||||
{0x60, 0x1b, 0x88, 0x41, 0x41},
|
{0x60, 0x1b, 0x88, 0x41, 0x41}, // traps
|
||||||
{0x60, 0x1a, 0x88, 0xe5, 0x24},
|
{0x60, 0x1a, 0x88, 0xe5, 0x24},
|
||||||
{0x68, 0x13, 0000, 0x2d, 0000},
|
{0x68, 0x13, 0000, 0x2d, 0000}, // Bonus Statue
|
||||||
{0x70, 0x18, 0x8e, 0xc8, 0xce},
|
{0x70, 0x18, 0x8e, 0xc8, 0xce}, // Platform Brick
|
||||||
{0x78, 0x1a, 0x88, 0xe5, 0x24},
|
{0x78, 0x1a, 0x88, 0xe5, 0x24}, // Dart Gun
|
||||||
{0x78, 0x16, 0000, 0x22, 0x22},
|
{0x78, 0x16, 0000, 0x22, 0x22},
|
||||||
{0xff, 0000, 0000, 0000, 0000},
|
{0xff, 0000, 0000, 0000, 0000},
|
||||||
{0x18, 0x17, 0x01, 0xe0, 0xe0}, /* 9 */
|
{0x18, 0x17, 0x01, 0xe0, 0xe0}, /* 9 */
|
||||||
|
|
|
@ -115,6 +115,9 @@ e_bomb_action(UNUSED(ent_t* pEnt))
|
||||||
}
|
}
|
||||||
else if (e_bomb_ticker == 0x09)
|
else if (e_bomb_ticker == 0x09)
|
||||||
{
|
{
|
||||||
|
if (E_RICK_STTST (E_RICK_STZOMBIE))
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* explode
|
* explode
|
||||||
*/
|
*/
|
||||||
|
@ -138,6 +141,9 @@ e_bomb_action(UNUSED(ent_t* pEnt))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (E_RICK_STTST (E_RICK_STZOMBIE))
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* exploding
|
* exploding
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because one or more lines are too long
22
src/game.c
22
src/game.c
|
@ -59,24 +59,24 @@ typedef enum {
|
||||||
/*
|
/*
|
||||||
* global vars
|
* global vars
|
||||||
*/
|
*/
|
||||||
U8 game_period = 0;
|
U16 game_period = 0;
|
||||||
U8 game_waitevt = FALSE;
|
U16 game_waitevt = FALSE;
|
||||||
rect_t *game_rects = NULL;
|
rect_t *game_rects = NULL;
|
||||||
|
|
||||||
U8 game_lives = 0;
|
U16 game_lives = 0;
|
||||||
U8 game_bombs = 0;
|
U16 game_bombs = 0;
|
||||||
U8 game_bullets = 0;
|
U16 game_bullets = 0;
|
||||||
U32 game_score = 0;
|
U32 game_score = 0;
|
||||||
|
|
||||||
U16 game_map = 0;
|
U16 game_map = 0;
|
||||||
U16 game_submap = 0;
|
U16 game_submap = 0;
|
||||||
|
|
||||||
U8 game_dir = 0;
|
U16 game_dir = 0;
|
||||||
U8 game_chsm = FALSE;
|
U16 game_chsm = FALSE;
|
||||||
|
|
||||||
U8 game_cheat1 = 0;
|
U16 game_cheat1 = 0;
|
||||||
U8 game_cheat2 = 0;
|
U16 game_cheat2 = 0; // no die
|
||||||
U8 game_cheat3 = 0;
|
U16 game_cheat3 = 0;
|
||||||
|
|
||||||
U16 game_status_dirty = 0;
|
U16 game_status_dirty = 0;
|
||||||
|
|
||||||
|
@ -464,13 +464,11 @@ frame(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case PLAY0:
|
case PLAY0:
|
||||||
play0();
|
play0();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case PLAY1:
|
case PLAY1:
|
||||||
if (control_status & CONTROL_PAUSE) {
|
if (control_status & CONTROL_PAUSE) {
|
||||||
#ifdef ENABLE_SOUND
|
#ifdef ENABLE_SOUND
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
*/
|
*/
|
||||||
U8 map_map[0x2C][0x20];
|
U8 map_map[0x2C][0x20];
|
||||||
U8 map_eflg[0x100];
|
U8 map_eflg[0x100];
|
||||||
U8 map_frow;
|
U16 map_frow;
|
||||||
U16 map_tilesBank;
|
U16 map_tilesBank;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue