[Scummvm-tracker] [ScummVM :: Bugs] #12964: AGS: Wrong font used for police report in Kathy Rain

ScummVM :: Bugs trac at scummvm.org
Sat Sep 25 13:03:10 UTC 2021


#12964: AGS: Wrong font used for police report in Kathy Rain
-------------------+--------------------------
Reporter:  criezy  |       Owner:  (none)
    Type:  defect  |      Status:  new
Priority:  normal  |   Component:  Engine: AGS
 Version:          |  Resolution:
Keywords:          |        Game:
-------------------+--------------------------
Comment (by criezy):

 And I have now verified that `AGSSpriteFont::SetVariableSpriteFont` gets
 called a number of time when starting Kathy Rain, but it does not get
 called when loading a savegame from the launcher!

 The calls come from `RunTextScript(_G(gameinst), "game_start");` that is
 called from start_game().

 {{{
   * frame #0:
 AGS3::Plugins::AGSSpriteFont::AGSSpriteFont::SetVariableSpriteFont(params)
 at ags_sprite_font.cpp:116:2
     frame #1:
 AGS3::Plugins::AGSSpriteFont::AGSSpriteFont::execMethod(name, params) at
 ags_sprite_font.h:39:2
     frame #2:
 AGS3::Plugins::AGSSpriteFont::AGSSpriteFontClifftopGames::execMethod(name,
 params) at ags_sprite_font_clifftop.h:33:2
     frame #3:
 AGS3::Plugins::PluginMethod::operator(params)(AGS3::Plugins::ScriptMethodParams&)
 const at plugin_base.h:205:8
     frame #4: AGS3::call_function(method, object=nullptr, numparm=2,
 parms) at script_runtime.cpp:183:10
     frame #5: AGS3::ccInstance::Run(curpc=31885) at cc_instance.cpp:998:17
     frame #6: AGS3::ccInstance::CallScriptFunction(funcname="game_start",
 numargs=0, params=nullptr) at cc_instance.cpp:342:15
     frame #7: AGS3::RunScriptFunctionIfExists(sci, tsname="game_start",
 numParam=0, params=nullptr) at script.cpp:364:32
     frame #8: AGS3::RunTextScript(sci, tsname="game_start") at
 script.cpp:413:14
     frame #9: AGS3::start_game() at game_start.cpp:89:2
     frame #10: AGS3::initialize_start_and_play_game(override_start_room=0,
 loadSaveGameOnStartup=-1) at game_start.cpp:125:3
     frame #11: AGS3::initialize_engine(startup_opts) at engine.cpp:1226:2
     frame #12: AGS::AGSEngine::run() at ags.cpp:190:2
 }}}

 However when loading a savegame from the launcher we do not get there as
 start_game() is not called.

 In `initialize_start_and_play_game()` it first calls
 `start_game_load_savegame_on_startup()`, and then calls `start_game()`
 only if a savegame was not loaded.

 I am wondering if the calls to the "game_start" scripts should be move
 from `start_game()` to `initialize_start_and_play_game()` so that they
 happen before the call to `start_game_load_savegame_on_startup()`...

 This is something we might need to discuss with the AGS developers as I
 have no idea if such a change would be a good idea and how it might
 impacts other games.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/12964#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list