diff --git a/src/interpreter/library/fn_room.cpp b/src/interpreter/library/fn_room.cpp index b65c75c7..d4fcbcc5 100644 --- a/src/interpreter/library/fn_room.cpp +++ b/src/interpreter/library/fn_room.cpp @@ -26,6 +26,16 @@ void ogm::interpreter::fn::room_goto(VO out, V rm) frame.m_data.m_room_goto_queued = room_index; } +void ogm::interpreter::fn::room_goto_next(VO out) +{ + frame.m_data.m_room_goto_queued = frame.m_data.m_room_index + 1; +} + +void ogm::interpreter::fn::room_goto_previous(VO out) +{ + frame.m_data.m_room_goto_queued = frame.m_data.m_room_index - 1; +} + void ogm::interpreter::fn::getv::room_first(VO out) { asset_index_t asset_index = 0; diff --git a/src/interpreter/library/fn_room.h b/src/interpreter/library/fn_room.h index a1634d62..eaa70203 100644 --- a/src/interpreter/library/fn_room.h +++ b/src/interpreter/library/fn_room.h @@ -1,4 +1,6 @@ FNDEF1(room_goto, rm) +FNDEF0(room_goto_next) +FNDEF0(room_goto_previous) GETVAR(room_first) GETVAR(room_last) VAR(room) diff --git a/src/interpreter/library/todo/resources.h b/src/interpreter/library/todo/resources.h index ee389a7d..bc5c1bb4 100644 --- a/src/interpreter/library/todo/resources.h +++ b/src/interpreter/library/todo/resources.h @@ -75,8 +75,6 @@ IGNORE_WARN(room_assign) IGNORE_WARN(room_get_camera) IGNORE_WARN(room_get_name) IGNORE_WARN(room_get_viewport) -IGNORE_WARN(room_goto_next) -IGNORE_WARN(room_goto_previous) IGNORE_WARN(room_last) IGNORE_WARN(room_next) IGNORE_WARN(room_persistent) @@ -145,4 +143,4 @@ IGNORE_WARN(background_vtiled) IGNORE_WARN(background_xscale) IGNORE_WARN(background_yscale) IGNORE_WARN(background_blend) -IGNORE_WARN(background_assign) \ No newline at end of file +IGNORE_WARN(background_assign)