better managed ownership (two new functions in level.h)
This commit is contained in:
@ -18,8 +18,10 @@ game_status CC3K::run() {
|
||||
case main_menu: {
|
||||
auto tmp = curr_menu->run(in);
|
||||
|
||||
if (tmp == -2)
|
||||
if (tmp == -2) {
|
||||
gresult.status = terminated;
|
||||
return terminated;
|
||||
}
|
||||
|
||||
if (tmp != -1) {
|
||||
curr_menu = nullptr;
|
||||
@ -55,6 +57,8 @@ game_status CC3K::run() {
|
||||
curr_game->print();
|
||||
out->render();
|
||||
return in_game;
|
||||
} else if (gresult.status == terminated) {
|
||||
return terminated;
|
||||
}
|
||||
|
||||
out->clear();
|
||||
|
Reference in New Issue
Block a user