22 #ifndef M4_CORE_ROOMS_H 23 #define M4_CORE_ROOMS_H 25 #include "common/hashmap.h" 26 #include "common/serializer.h" 27 #include "m4/adv_r/adv.h" 28 #include "m4/adv_r/adv_control.h" 29 #include "m4/adv_r/adv_hotspot.h" 38 virtual void preload();
39 virtual void init() {}
40 virtual void daemon() {}
41 virtual void pre_parser() {}
42 virtual void parser();
43 virtual void roomError() {}
44 virtual void shutdown() {}
60 void add(
int roomNum,
Room *room) {
61 _rooms[roomNum] = room;
68 virtual void preLoad() {}
78 Room *operator[](uint roomNum);
80 virtual void global_room_init() {}
81 virtual void daemon() = 0;
82 virtual void tick() {}
83 virtual void pre_parser() {}
84 virtual void parser() {}
89 int32 _cameraShiftAmount = 0;
90 int32 _cameraShift_vert_Amount = 0;
91 int32 camera_pan_step = 10;
96 void game_control_cycle();
102 Section *_activeSection =
nullptr;
103 Room *_activeRoom =
nullptr;
108 void global_section_constructor();
109 void section_room_constructor();
110 void game_daemon_code();
111 void parse_player_command_now();
113 void section_init() {
114 _activeSection->
init();
117 _activeSection->daemon();
119 void global_room_init() {
120 _activeSection->global_room_init();
123 _activeSection->tick();
125 void section_parser() {
126 _activeSection->parser();
129 void room_preload() {
130 _activeRoom->preload();
136 _activeRoom->daemon();
138 void room_pre_parser() {
139 _activeRoom->pre_parser();
142 _activeRoom->parser();
145 _activeRoom->roomError();
147 void room_shutdown() {
148 _activeRoom->shutdown();
153 Room *getRoom(
int room)
const;
159 void pal_game_task();
160 void camera_shift_xy(int32 x, int32 y);
161 void adv_camera_pan_step(int32 step);
162 bool game_camera_panning()
const {
163 return _cameraShiftAmount != 0 || _cameraShift_vert_Amount != 0;
166 virtual void global_daemon() = 0;
167 virtual void global_pre_parser() {}
168 virtual void global_parser() = 0;
170 void global_error_code() {
Definition: serializer.h:79
Definition: database.h:28
virtual void init()
Definition: rooms.h:73
virtual HotSpotRec * custom_hotspot_which(int32 x, int32 y)
Definition: rooms.h:50
Definition: adv_hotspot.h:30