Files
Thomas MartinandClaude Opus 5.5 68ab220fc5 Settings inside the game: L1 / R1 pages in the OPTION screen
The game's own OPTION screen (the title's, and SELECT's in play) turns
with L1 / R1 to the port's pages: Graphics (display mode, resolution,
render scale, anti-aliasing, texture filter, frame rate, widescreen;
APPLY saves video.ini), Cheats (and the room warp), Save States (the
F5 / F7 slots, save and load) and Close Game. They are drawn the way
Options draws itself: its backdrop, its orbs, arrows and highlight bar,
and the game's message font with Prop_tbl's widths, through the native
2D (a new oni::sprite::overlay drawn at Pit_trans's start, under the
fades). Overrides of syou_init, syou_move, sprite_disp and mess_disp;
nothing written to the game's memory, no save-state section added.

BozoEngine 5d34d41 (#151): captureStatePicture gives an in-game save
its slot picture in F2's Save states tab.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:40:20 +01:00

40 lines
1.5 KiB
C++

// Onimusha's save-state section (bozo/state.h): what the engine's own sections do not hold. The engine saves the EE
// runtime, the kernel, the libraries and the host; the port adds the sound modules' IOP host (compiled IRX), the
// texture uploads (GS memory as the game filled it) and VIF1 / VU1 / GS state (the models' programs keep theirs between
// frames). The pictures derived from EE memory (the room's picture and depth) are rebuilt after a load.
#include "oni_menu.h"
#include "oni_port.h"
#include "oni_render.h"
#include "oni_tex.h"
#include "oni_vu1.h"
#include <string>
namespace oni
{
void audioState(bozo::state::Archive &a);
std::string audioUnsaveable();
void installState(bozo::state::Sections &sections)
{
sections.add({"oni",
[](bozo::state::Archive &a)
{
audioState(a);
oni::tex::state(a);
oni::vu1::state(a);
if (a.loading())
{
oni::bg::stateLoaded();
oni::menu::stateLoaded();
}
},
[]
{
if (std::string why = audioUnsaveable(); !why.empty())
return why;
return oni::movie::unsaveable();
}});
}
} // namespace oni