Purple MartiansTechnical Code DescriptionsItemsOverview
Items are one of the 5 basic types of objects that interact in the game.
These are all types of items:
- start
- exit
- warp
- door
- key
- switch
- sproingy
- bonus
- free man
- bomb
- rocket
- mine
- pop-up msg
They all live in 2 arrays that can hold 500 items.
extern int item[500][16]; // item ints
extern al_fixed itemf[500][4]; // item fixeds
Each item has 16 ints to hold its data and 4 fixed's to hold position and momentum.
when the game loop is running, these functions bring them to life:
proc_item_collision();
proc_item_move();
the game loop calls this function to draw items on the level
draw_items();