23 lines
647 B
C
23 lines
647 B
C
|
#define MAX_GAME_OBJECTS 300
|
||
|
extern struct object {
|
||
|
int id; // 0 if slot unused
|
||
|
int x;
|
||
|
int y;
|
||
|
int width;
|
||
|
int height;
|
||
|
const char *pixels;
|
||
|
} objects[MAX_GAME_OBJECTS];
|
||
|
|
||
|
// engine
|
||
|
void transition_scene(int scene); // Immediately stops all event processing for current scene, which is unloaded before this function returns
|
||
|
void scene_add_clickrect(int id, int x, int y, int width, int height);
|
||
|
void scene_add_object(int id, int x, int y, int width, int height, const char *pixels);
|
||
|
|
||
|
// game-specific constants
|
||
|
#define SCENE_LOBBY 1
|
||
|
#define SCENE_MANAGERS_OFFICE 2
|
||
|
|
||
|
// game.cpp
|
||
|
void scene_setup(int scene);
|
||
|
void onclick(int curscene, int objid);
|