add manager's office safe scene. This is the only scene now without a player object.
parent
9a40409ebb
commit
bbac8ccc44
20
game.cpp
20
game.cpp
|
@ -7,6 +7,7 @@
|
|||
|
||||
extern const char _binary_sprite_lobby_raw_start[];
|
||||
extern const char _binary_sprite_managers_office_raw_start[];
|
||||
extern const char _binary_sprite_managers_office_safe_raw_start[];
|
||||
extern const char _binary_sprite_basement_raw_start[];
|
||||
|
||||
extern const char _binary_sprite_stickman_raw_start[];
|
||||
|
@ -26,6 +27,7 @@ extern struct navmesh navmesh_basement;
|
|||
#define OBJID_BASEMENT_POPCORN 9
|
||||
#define OBJID_BASEMENT_ELECTRICAL_BOX 10
|
||||
#define OBJID_BASEMENT_LADDER 11
|
||||
#define OBJID_CLOSE_MODAL 12
|
||||
|
||||
void scene_setup(int scene, int fromscene) {
|
||||
switch(scene) {
|
||||
|
@ -43,7 +45,6 @@ void scene_setup(int scene, int fromscene) {
|
|||
scene_set_navmesh(&navmesh_lobby);
|
||||
break;
|
||||
case SCENE_MANAGERS_OFFICE:
|
||||
case SCENE_MANAGERS_OFFICE_SAFE:
|
||||
scene_add_object(OBJID_BACKGROUND, 0, 0, BGWIDTH, BGHEIGHT, _binary_sprite_managers_office_raw_start);
|
||||
scene_add_object(OBJID_DOOR_TO_LOBBY_FROM_MANAGERS_OFFICE, 740, 440, 151, 276, nullptr);
|
||||
scene_add_object(OBJID_MANAGERS_OFFICE_TRAPDOOR, 332, 565, 139, 87, nullptr);
|
||||
|
@ -64,6 +65,11 @@ void scene_setup(int scene, int fromscene) {
|
|||
}
|
||||
scene_set_navmesh(&navmesh_managers_office);
|
||||
break;
|
||||
case SCENE_MANAGERS_OFFICE_SAFE:
|
||||
scene_add_object(OBJID_BACKGROUND, 0, 0, BGWIDTH, BGHEIGHT, _binary_sprite_managers_office_safe_raw_start);
|
||||
scene_add_object(OBJID_CLOSE_MODAL, 0, 0, 248, 800, nullptr);
|
||||
scene_add_object(OBJID_CLOSE_MODAL, 1035, 0, 1280-1035, 800, nullptr);
|
||||
break;
|
||||
case SCENE_BASEMENT:
|
||||
scene_add_object(OBJID_BACKGROUND, 0, 0, BGWIDTH, BGHEIGHT, _binary_sprite_basement_raw_start);
|
||||
scene_add_object(OBJID_BASEMENT_LADDER, 396, 86, 85, 312, nullptr);
|
||||
|
@ -82,7 +88,6 @@ void scene_setup(int scene, int fromscene) {
|
|||
|
||||
static void transition_scene_on_walk_finish(struct script *scr, int wakeupMode, int arg1, int arg2, int arg3, int arg4) {
|
||||
scr->id = 0;
|
||||
printf("walk finish transition %d %d\n", wakeupMode, scr->vars[0]);
|
||||
if(wakeupMode == SCRIPT_WAKEUP_OTHER_SCRIPT)
|
||||
transition_scene(scr->vars[0]);
|
||||
else
|
||||
|
@ -109,14 +114,12 @@ void onclick(int curscene, int objid) {
|
|||
}
|
||||
break;
|
||||
case SCENE_MANAGERS_OFFICE:
|
||||
case SCENE_MANAGERS_OFFICE_SAFE:
|
||||
switch(objid) {
|
||||
case OBJID_DOOR_TO_LOBBY_FROM_MANAGERS_OFFICE:
|
||||
start_player_walk_to_point_then_transition_scene(815, 713, SCENE_LOBBY);
|
||||
return;
|
||||
case OBJID_MANAGERS_OFFICE_SAFE:
|
||||
//start_player_walk_to_point_then_transition_scene(895, 497, SCENE_MANAGERS_OFFICE_SAFE);
|
||||
start_player_walk_to_point(895, 497);
|
||||
start_player_walk_to_point_then_transition_scene(895, 497, SCENE_MANAGERS_OFFICE_SAFE);
|
||||
return;
|
||||
case OBJID_MANAGERS_OFFICE_TRAPDOOR:
|
||||
start_player_walk_to_point_then_transition_scene(408, 559, SCENE_BASEMENT);
|
||||
|
@ -130,6 +133,13 @@ void onclick(int curscene, int objid) {
|
|||
return;
|
||||
}
|
||||
break;
|
||||
case SCENE_MANAGERS_OFFICE_SAFE:
|
||||
switch(objid) {
|
||||
case OBJID_CLOSE_MODAL:
|
||||
transition_scene(SCENE_MANAGERS_OFFICE);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue