mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-22 22:58:12 +03:00
Use scenario filename for debugger symbols
This commit is contained in:
+2
-1
@@ -111,7 +111,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
if (config.debugger_mode != DebuggerMode::DISABLED) {
|
||||
g_debugger = std::make_unique<debugger::Debugger>("ADISK.DAT.symbols", config.debugger_mode);
|
||||
std::string symbols_path = std::string(NACT::get_scenario_filename(game_id)) + ".symbols";
|
||||
g_debugger = std::make_unique<debugger::Debugger>(symbols_path.c_str(), config.debugger_mode);
|
||||
g_debugger->init();
|
||||
}
|
||||
#endif
|
||||
|
||||
+12
-6
@@ -26,6 +26,15 @@
|
||||
|
||||
extern SDL_Window* g_window;
|
||||
|
||||
// static
|
||||
const char* NACT::get_scenario_filename(const GameId& game_id)
|
||||
{
|
||||
return game_id.is(GameId::RANCE2_HINT) ? "GDISK.DAT" :
|
||||
game_id.is(GameId::PROG_OMAKE) ? "AGAME.DAT" :
|
||||
game_id.is(GameId::NISE_NAGURI) ? "ADISK.PAT" :
|
||||
"ADISK.DAT";
|
||||
}
|
||||
|
||||
// 初期化
|
||||
|
||||
NACT::NACT(const Config& config, const GameId& game_id)
|
||||
@@ -56,13 +65,10 @@ NACT::NACT(const Config& config, const GameId& game_id)
|
||||
}
|
||||
|
||||
// ADISK.DAT
|
||||
const char* adisk_name =
|
||||
game_id.is(GameId::RANCE2_HINT) ? "GDISK.DAT" :
|
||||
game_id.is(GameId::PROG_OMAKE) ? "AGAME.DAT" :
|
||||
"ADISK.DAT";
|
||||
sco.open(adisk_name);
|
||||
const char* scenario_filename = get_scenario_filename(game_id);
|
||||
sco.open(scenario_filename);
|
||||
if (!sco.loaded())
|
||||
sys_error("Cannot open %s", adisk_name);
|
||||
sys_error("Cannot open %s", scenario_filename);
|
||||
sco.page_jump(0, 2);
|
||||
|
||||
// 各種クラス生成
|
||||
|
||||
@@ -46,6 +46,7 @@ class NACT
|
||||
{
|
||||
public:
|
||||
static NACT* create(const Config& config, const GameId& game_id);
|
||||
static const char* get_scenario_filename(const GameId& game_id);
|
||||
NACT(const Config& config, const GameId& game_id);
|
||||
virtual ~NACT();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user