A CRUMB is a small item (but not the same as a game ITEM :-) ) that can exist at multiple places in the game, and can be collected by the hero. Think of the dots in Pacman, or the coins in Super Mario Bros.
Characteristics of crumbs:
They can appear multiple times all around the map
They are automatically collected by the hero when s/he walks over them
They use a special tile type of TT_CRUMB
There may more than one crumb type in a single game (think Red Pills and Blue Pills, for example)
Each crumb type has an associated function that is called each time the hero grabs a crumb of that type. This function can increment or decrement a counter, for example, and make events happen on special values, or it can be used as a "score" counter, for example.
The use of CRUMBs in the game forces a full-byte tile map (i.e. it disables the 2BIT-TILE-MAP option). The tile type for crumbs is 0x10, and the lower nibble is used to specify the type of crumb, so there may be at most 16 crumb types in a game.
Tasks:
[x] Initial types:
[x] crumb.h
[x] btile.h
[x] map.h
[x] Implementation:
[x] hero.c
[x] game_loop.c
[x] game_state.c
[x] map.c
[x] btile.c
[x] map.c
[x] Support in DATAGEN
[x] Input: directive CRUMB_TYPE in GAME_CONFIG section
[x] Input: directive CRUMB in SCREEN section
[x] Output: Global crumb type table code generation
Allow a new type of element in the game: CRUMBS
A CRUMB is a small item (but not the same as a game ITEM :-) ) that can exist at multiple places in the game, and can be collected by the hero. Think of the dots in Pacman, or the coins in Super Mario Bros.
Characteristics of crumbs:
Tasks:
crumb.h
btile.h
map.h
hero.c
game_loop.c
game_state.c
map.c
btile.c
map.c