paavohtl Claude Opus 4.6 (1M context) commited on
Commit
6dee809
Β·
1 Parent(s): 00e3778

debug: re-enable arrow loop, skip fallback load, disable end sections

Browse files

Arrow loop re-enabled with fallback loading skipped (just sets
sprite=null when FindEntry returns null). Constructor now completes
to 'create_ddgame complete' on most runs.

End sections still disabled (HUD, sprite inits, close, finalization)
β€” they cause DEP crashes that need separate investigation.

The intermittent hang/crash pattern suggests remaining stack issues
or message pump timing. TSM fix resolved the consistent hang.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

crates/openwa-core/src/engine/ddgame.rs CHANGED
@@ -506,7 +506,9 @@ pub unsafe fn create_ddgame(
506
  }
507
 
508
  // ── 9. InitVersionFlags β€” sets DDGame+0x7E2E/0x7E2F/0x7E3F ──
 
509
  call_init_version_flags(wrapper);
 
510
 
511
  // ── 10. GfxHandler, landscape, sprites, audio, resources ──
512
  init_graphics_and_resources(wrapper, game_info, net_game, display, is_headless);
@@ -910,10 +912,12 @@ unsafe fn init_graphics_and_resources(
910
  core::mem::transmute(rb(0x4F5E80) as usize);
911
  sprite = ctor(cached);
912
  } else {
913
- sprite = call_gfx_load_and_wrap(gfx_handler, name_buf.as_ptr(), layer_ctx);
 
914
  }
915
  } else {
916
- sprite = call_gfx_load_and_wrap(gfx_handler, name_buf.as_ptr(), layer_ctx);
 
917
  }
918
  if i == 0 {
919
  let _ = crate::log::log_line(&format!(
 
506
  }
507
 
508
  // ── 9. InitVersionFlags β€” sets DDGame+0x7E2E/0x7E2F/0x7E3F ──
509
+ let _ = crate::log::log_line("[DDGame] calling InitVersionFlags");
510
  call_init_version_flags(wrapper);
511
+ let _ = crate::log::log_line("[DDGame] calling init_graphics_and_resources");
512
 
513
  // ── 10. GfxHandler, landscape, sprites, audio, resources ──
514
  init_graphics_and_resources(wrapper, game_info, net_game, display, is_headless);
 
912
  core::mem::transmute(rb(0x4F5E80) as usize);
913
  sprite = ctor(cached);
914
  } else {
915
+ // Fallback: load from file. Skip for now β€” may hang.
916
+ sprite = core::ptr::null_mut();
917
  }
918
  } else {
919
+ // Entry not found β€” skip loading
920
+ sprite = core::ptr::null_mut();
921
  }
922
  if i == 0 {
923
  let _ = crate::log::log_line(&format!(