refactor: reorganize openwa-core into subdirectory modules
Browse filesMove 27 files from flat src/ into 6 subdirectories by subsystem:
- display/: DisplayBase, DisplayGfx, DDDisplay, Palette, OpenGL
- audio/: DSSound, ActiveSound, SoundId, SpeechLineId, Music, Streaming
- input/: DDKeyboard, InputCtrl
- engine/: DDGame, DDGameWrapper, GameSession, GameInfo, GameTimer, NetWrapper
- render/: RenderQueue, SpriteId, Landscape, TurnOrder
- game/: Scheme, Weapon, Frontend, Message, ClassType
Each mod.rs re-exports public types for short import paths.
Infrastructure stays at root: address, rebase, fixed, macros, wa_alloc,
vtable, wa_call, task/, wa/.
Update all imports in openwa-wormkit, openwa-debugui, and tests.
Add Win32_System_Memory feature to openwa-core for vtable.rs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- crates/openwa-core/Cargo.toml +1 -0
- crates/openwa-core/src/{active_sound.rs → audio/active_sound.rs} +1 -1
- crates/openwa-core/src/{dssound.rs → audio/dssound.rs} +0 -0
- crates/openwa-core/src/audio/mod.rs +13 -0
- crates/openwa-core/src/{music.rs → audio/music.rs} +0 -0
- crates/openwa-core/src/{sound.rs → audio/sound.rs} +0 -0
- crates/openwa-core/src/{speech.rs → audio/speech.rs} +0 -0
- crates/openwa-core/src/{streaming_audio.rs → audio/streaming.rs} +0 -0
- crates/openwa-core/src/{display_base.rs → display/base.rs} +0 -0
- crates/openwa-core/src/{dddisplay.rs → display/dd_display.rs} +0 -0
- crates/openwa-core/src/{display_gfx.rs → display/gfx.rs} +0 -0
- crates/openwa-core/src/display/mod.rs +11 -0
- crates/openwa-core/src/{opengl.rs → display/opengl.rs} +0 -0
- crates/openwa-core/src/{palette.rs → display/palette.rs} +0 -0
- crates/openwa-core/src/{ddgame.rs → engine/ddgame.rs} +11 -11
- crates/openwa-core/src/{ddgame_wrapper.rs → engine/ddgame_wrapper.rs} +4 -4
- crates/openwa-core/src/{game_info.rs → engine/game_info.rs} +0 -0
- crates/openwa-core/src/{game_session.rs → engine/game_session.rs} +4 -4
- crates/openwa-core/src/{game_timer.rs → engine/game_timer.rs} +0 -0
- crates/openwa-core/src/engine/mod.rs +16 -0
- crates/openwa-core/src/{ddnetgame_wrapper.rs → engine/net_wrapper.rs} +0 -0
- crates/openwa-core/src/{class_type.rs → game/class_type.rs} +0 -0
- crates/openwa-core/src/{frontend.rs → game/frontend.rs} +0 -0
- crates/openwa-core/src/{message.rs → game/message.rs} +0 -0
- crates/openwa-core/src/game/mod.rs +17 -0
- crates/openwa-core/src/{scheme.rs → game/scheme.rs} +0 -0
- crates/openwa-core/src/{weapon.rs → game/weapon.rs} +0 -0
- crates/openwa-core/src/{input_ctrl.rs → input/controller.rs} +0 -0
- crates/openwa-core/src/{ddkeyboard.rs → input/keyboard.rs} +0 -0
- crates/openwa-core/src/input/mod.rs +5 -0
- crates/openwa-core/src/lib.rs +7 -28
- crates/openwa-core/src/{landscape.rs → render/landscape.rs} +1 -1
- crates/openwa-core/src/render/mod.rs +14 -0
- crates/openwa-core/src/{render.rs → render/queue.rs} +0 -0
- crates/openwa-core/src/{sprite.rs → render/sprite.rs} +0 -0
- crates/openwa-core/src/{turn_order.rs → render/turn_order.rs} +1 -1
- crates/openwa-core/src/task/base.rs +2 -2
- crates/openwa-core/tests/scheme_parse.rs +1 -1
- crates/openwa-debugui/src/app.rs +2 -3
- crates/openwa-wormkit/src/replacements/config.rs +1 -1
- crates/openwa-wormkit/src/replacements/display.rs +1 -1
- crates/openwa-wormkit/src/replacements/frontend.rs +1 -1
- crates/openwa-wormkit/src/replacements/game_session.rs +6 -6
- crates/openwa-wormkit/src/replacements/hardware_init.rs +4 -13
- crates/openwa-wormkit/src/replacements/input.rs +1 -2
- crates/openwa-wormkit/src/replacements/render.rs +1 -1
- crates/openwa-wormkit/src/replacements/scheme.rs +1 -1
- crates/openwa-wormkit/src/replacements/sound.rs +2 -2
- crates/openwa-wormkit/src/replacements/speech.rs +2 -2
- crates/openwa-wormkit/src/replacements/team.rs +1 -1
|
@@ -6,6 +6,7 @@ description = "Core library for Worms Armageddon reverse engineering — types,
|
|
| 6 |
|
| 7 |
[target.'cfg(target_os = "windows")'.dependencies]
|
| 8 |
windows-sys = { version = "0.59", features = [
|
|
|
|
| 9 |
"Win32_System_Registry",
|
| 10 |
"Win32_UI_WindowsAndMessaging",
|
| 11 |
] }
|
|
|
|
| 6 |
|
| 7 |
[target.'cfg(target_os = "windows")'.dependencies]
|
| 8 |
windows-sys = { version = "0.59", features = [
|
| 9 |
+
"Win32_System_Memory",
|
| 10 |
"Win32_System_Registry",
|
| 11 |
"Win32_UI_WindowsAndMessaging",
|
| 12 |
] }
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
use crate::ddgame::DDGame;
|
| 2 |
use crate::fixed::Fixed;
|
| 3 |
|
| 4 |
/// Active sound tracking table — manages positional (local) sound playback.
|
|
|
|
| 1 |
+
use crate::engine::ddgame::DDGame;
|
| 2 |
use crate::fixed::Fixed;
|
| 3 |
|
| 4 |
/// Active sound tracking table — manages positional (local) sound playback.
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pub mod active_sound;
|
| 2 |
+
pub mod dssound;
|
| 3 |
+
pub mod music;
|
| 4 |
+
pub mod sound;
|
| 5 |
+
pub mod speech;
|
| 6 |
+
pub mod streaming;
|
| 7 |
+
|
| 8 |
+
pub use active_sound::{ActiveSoundEntry, ActiveSoundTable};
|
| 9 |
+
pub use dssound::DSSound;
|
| 10 |
+
pub use music::Music;
|
| 11 |
+
pub use sound::SoundId;
|
| 12 |
+
pub use speech::{SpeechLineId, SpeechLineTableEntry, SpeechSlotTable, SPEECH_LINE_TABLE_COUNT};
|
| 13 |
+
pub use streaming::StreamingAudio;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pub mod base;
|
| 2 |
+
pub mod dd_display;
|
| 3 |
+
pub mod gfx;
|
| 4 |
+
pub mod opengl;
|
| 5 |
+
pub mod palette;
|
| 6 |
+
|
| 7 |
+
pub use base::{DisplayBase, DisplayBaseVtable, SpriteBufferCtrl, SpriteCacheWrapper};
|
| 8 |
+
pub use dd_display::DDDisplay;
|
| 9 |
+
pub use gfx::DisplayGfx;
|
| 10 |
+
pub use opengl::OpenGLState;
|
| 11 |
+
pub use palette::{Palette, PaletteVtable};
|
|
File without changes
|
|
File without changes
|
|
@@ -1,14 +1,14 @@
|
|
| 1 |
-
use crate::active_sound::ActiveSoundTable;
|
| 2 |
-
use crate::
|
| 3 |
-
use crate::
|
| 4 |
-
use crate::dssound::DSSound;
|
| 5 |
-
use crate::game_info::GameInfo;
|
| 6 |
-
use crate::landscape::PCLandscape;
|
| 7 |
-
use crate::music::Music;
|
| 8 |
-
use crate::palette::Palette;
|
| 9 |
-
use crate::render::RenderQueue;
|
| 10 |
-
use crate::speech::SpeechSlotTable;
|
| 11 |
-
use crate::turn_order::TurnOrderWidget;
|
| 12 |
|
| 13 |
/// DDGame — the main game engine object.
|
| 14 |
///
|
|
|
|
| 1 |
+
use crate::audio::active_sound::ActiveSoundTable;
|
| 2 |
+
use crate::display::dd_display::DDDisplay;
|
| 3 |
+
use crate::input::keyboard::DDKeyboard;
|
| 4 |
+
use crate::audio::dssound::DSSound;
|
| 5 |
+
use crate::engine::game_info::GameInfo;
|
| 6 |
+
use crate::render::landscape::PCLandscape;
|
| 7 |
+
use crate::audio::music::Music;
|
| 8 |
+
use crate::display::palette::Palette;
|
| 9 |
+
use crate::render::queue::RenderQueue;
|
| 10 |
+
use crate::audio::speech::SpeechSlotTable;
|
| 11 |
+
use crate::render::turn_order::TurnOrderWidget;
|
| 12 |
|
| 13 |
/// DDGame — the main game engine object.
|
| 14 |
///
|
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
use crate::
|
| 2 |
-
use crate::ddgame::DDGame;
|
| 3 |
-
use crate::dssound::DSSound;
|
| 4 |
-
use crate::landscape::PCLandscape;
|
| 5 |
|
| 6 |
/// DDGameWrapper — large wrapper around DDGame.
|
| 7 |
///
|
|
|
|
| 1 |
+
use crate::display::dd_display::DDDisplay;
|
| 2 |
+
use crate::engine::ddgame::DDGame;
|
| 3 |
+
use crate::audio::dssound::DSSound;
|
| 4 |
+
use crate::render::landscape::PCLandscape;
|
| 5 |
|
| 6 |
/// DDGameWrapper — large wrapper around DDGame.
|
| 7 |
///
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
use crate::ddgame_wrapper::DDGameWrapper;
|
| 2 |
-
use crate::
|
| 3 |
-
use crate::dssound::DSSound;
|
| 4 |
-
use crate::palette::Palette;
|
| 5 |
|
| 6 |
/// Top-level game session context, allocated once per game run.
|
| 7 |
///
|
|
|
|
| 1 |
+
use crate::engine::ddgame_wrapper::DDGameWrapper;
|
| 2 |
+
use crate::input::keyboard::DDKeyboard;
|
| 3 |
+
use crate::audio::dssound::DSSound;
|
| 4 |
+
use crate::display::palette::Palette;
|
| 5 |
|
| 6 |
/// Top-level game session context, allocated once per game run.
|
| 7 |
///
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pub mod ddgame;
|
| 2 |
+
pub mod ddgame_wrapper;
|
| 3 |
+
pub mod game_info;
|
| 4 |
+
pub mod game_session;
|
| 5 |
+
pub mod game_timer;
|
| 6 |
+
pub mod net_wrapper;
|
| 7 |
+
|
| 8 |
+
pub use ddgame::{
|
| 9 |
+
DDGame, FullTeamBlock, SoundQueueEntry, TeamArenaRef, TeamArenaState, TeamBlockHeader,
|
| 10 |
+
TeamBlockSlot0, WormEntry, GAME_PHASE_NORMAL_MIN, GAME_PHASE_SUDDEN_DEATH,
|
| 11 |
+
};
|
| 12 |
+
pub use ddgame_wrapper::DDGameWrapper;
|
| 13 |
+
pub use game_info::GameInfo;
|
| 14 |
+
pub use game_session::GameSession;
|
| 15 |
+
pub use game_timer::GameTimer;
|
| 16 |
+
pub use net_wrapper::DDNetGameWrapper;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pub mod class_type;
|
| 2 |
+
pub mod frontend;
|
| 3 |
+
pub mod message;
|
| 4 |
+
pub mod scheme;
|
| 5 |
+
pub mod weapon;
|
| 6 |
+
|
| 7 |
+
pub use class_type::ClassType;
|
| 8 |
+
pub use frontend::ScreenId;
|
| 9 |
+
pub use message::TaskMessage;
|
| 10 |
+
pub use scheme::{
|
| 11 |
+
ExtendedOptions, SchemeError, SchemeFile, SchemeFileError, SchemeOptions, SchemeVersion,
|
| 12 |
+
WeaponSettings, EXTENDED_OPTIONS_DEFAULTS, EXTENDED_OPTIONS_OFFSET, EXTENDED_OPTIONS_SIZE,
|
| 13 |
+
OPTIONS_OFFSET, OPTIONS_SIZE, SCHEME_HEADER_SIZE, SCHEME_MAGIC, SCHEME_PAYLOAD_V1,
|
| 14 |
+
SCHEME_PAYLOAD_V2, SCHEME_PAYLOAD_V3, SCHEME_WEAPON_ORDER, WEAPONS_TOTAL_COUNT,
|
| 15 |
+
WEAPONS_V1_COUNT, WEAPONS_V1_OFFSET, WEAPONS_V2_COUNT, WEAPONS_V2_OFFSET, WEAPON_ENTRY_SIZE,
|
| 16 |
+
};
|
| 17 |
+
pub use weapon::Weapon;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pub mod controller;
|
| 2 |
+
pub mod keyboard;
|
| 3 |
+
|
| 4 |
+
pub use controller::{InputCtrl, InputCtrlVtable};
|
| 5 |
+
pub use keyboard::DDKeyboard;
|
|
@@ -3,39 +3,18 @@
|
|
| 3 |
#[macro_use]
|
| 4 |
pub mod macros;
|
| 5 |
|
| 6 |
-
pub mod
|
| 7 |
-
pub mod
|
| 8 |
-
pub mod
|
| 9 |
-
pub mod
|
| 10 |
-
pub mod
|
| 11 |
-
pub mod
|
|
|
|
| 12 |
pub mod fixed;
|
| 13 |
pub mod task;
|
| 14 |
-
pub mod ddgame;
|
| 15 |
-
pub mod ddgame_wrapper;
|
| 16 |
-
pub mod landscape;
|
| 17 |
-
pub mod render;
|
| 18 |
-
pub mod dddisplay;
|
| 19 |
-
pub mod ddkeyboard;
|
| 20 |
-
pub mod dssound;
|
| 21 |
-
pub mod music;
|
| 22 |
-
pub mod opengl;
|
| 23 |
-
pub mod palette;
|
| 24 |
-
pub mod frontend;
|
| 25 |
-
pub mod game_info;
|
| 26 |
-
pub mod scheme;
|
| 27 |
-
pub mod speech;
|
| 28 |
-
pub mod turn_order;
|
| 29 |
-
pub mod game_session;
|
| 30 |
pub mod address;
|
| 31 |
pub mod rebase;
|
| 32 |
pub mod wa;
|
| 33 |
pub mod wa_call;
|
| 34 |
pub mod wa_alloc;
|
| 35 |
-
pub mod display_gfx;
|
| 36 |
-
pub mod input_ctrl;
|
| 37 |
-
pub mod game_timer;
|
| 38 |
-
pub mod streaming_audio;
|
| 39 |
-
pub mod ddnetgame_wrapper;
|
| 40 |
-
pub mod display_base;
|
| 41 |
pub mod vtable;
|
|
|
|
| 3 |
#[macro_use]
|
| 4 |
pub mod macros;
|
| 5 |
|
| 6 |
+
pub mod audio;
|
| 7 |
+
pub mod display;
|
| 8 |
+
pub mod engine;
|
| 9 |
+
pub mod game;
|
| 10 |
+
pub mod input;
|
| 11 |
+
pub mod render;
|
| 12 |
+
|
| 13 |
pub mod fixed;
|
| 14 |
pub mod task;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
pub mod address;
|
| 16 |
pub mod rebase;
|
| 17 |
pub mod wa;
|
| 18 |
pub mod wa_call;
|
| 19 |
pub mod wa_alloc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
pub mod vtable;
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
use crate::ddgame::DDGame;
|
| 2 |
|
| 3 |
/// PCLandscape — terrain/landscape subsystem (0xB40 bytes).
|
| 4 |
///
|
|
|
|
| 1 |
+
use crate::engine::ddgame::DDGame;
|
| 2 |
|
| 3 |
/// PCLandscape — terrain/landscape subsystem (0xB40 bytes).
|
| 4 |
///
|
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pub mod landscape;
|
| 2 |
+
pub mod queue;
|
| 3 |
+
pub mod sprite;
|
| 4 |
+
pub mod turn_order;
|
| 5 |
+
|
| 6 |
+
pub use landscape::{DirtyRect, PCLandscape};
|
| 7 |
+
pub use queue::{
|
| 8 |
+
DrawBitmapGlobalCmd, DrawLineStripHeader, DrawPixelCmd, DrawPolygonHeader, DrawRectCmd,
|
| 9 |
+
DrawScaledCmd, DrawSpriteCmd, DrawSpriteOffsetCmd, DrawTextboxLocalCmd, RenderQueue,
|
| 10 |
+
};
|
| 11 |
+
pub use sprite::{Sprite, SpriteFrame, SpriteId};
|
| 12 |
+
pub use turn_order::{
|
| 13 |
+
AnimatedItemList, TurnOrderAllianceGroup, TurnOrderTeamEntry, TurnOrderWidget,
|
| 14 |
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,7 @@
|
|
| 8 |
//! All inherit from an animated item list base class (vtable 0x669C90) that
|
| 9 |
//! provides sin-table interpolated sliding transitions between items.
|
| 10 |
|
| 11 |
-
use crate::ddgame::DDGame;
|
| 12 |
|
| 13 |
/// Animated item list — base class for the turn order hierarchy.
|
| 14 |
///
|
|
|
|
| 8 |
//! All inherit from an animated item list base class (vtable 0x669C90) that
|
| 9 |
//! provides sin-table interpolated sliding transitions between items.
|
| 10 |
|
| 11 |
+
use crate::engine::ddgame::DDGame;
|
| 12 |
|
| 13 |
/// Animated item list — base class for the turn order hierarchy.
|
| 14 |
///
|
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
use crate::class_type::ClassType;
|
| 2 |
-
use crate::ddgame::DDGame;
|
| 3 |
|
| 4 |
/// Base task class in WA's entity hierarchy.
|
| 5 |
///
|
|
|
|
| 1 |
+
use crate::game::class_type::ClassType;
|
| 2 |
+
use crate::engine::ddgame::DDGame;
|
| 3 |
|
| 4 |
/// Base task class in WA's entity hierarchy.
|
| 5 |
///
|
|
@@ -1,6 +1,6 @@
|
|
| 1 |
use std::path::Path;
|
| 2 |
|
| 3 |
-
use openwa_core::scheme::{
|
| 4 |
ExtendedOptions, SchemeFile, SchemeVersion, EXTENDED_OPTIONS_DEFAULTS,
|
| 5 |
EXTENDED_OPTIONS_SIZE, SCHEME_PAYLOAD_V1, SCHEME_PAYLOAD_V2, WEAPONS_V1_COUNT,
|
| 6 |
};
|
|
|
|
| 1 |
use std::path::Path;
|
| 2 |
|
| 3 |
+
use openwa_core::game::scheme::{
|
| 4 |
ExtendedOptions, SchemeFile, SchemeVersion, EXTENDED_OPTIONS_DEFAULTS,
|
| 5 |
EXTENDED_OPTIONS_SIZE, SCHEME_PAYLOAD_V1, SCHEME_PAYLOAD_V2, WEAPONS_V1_COUNT,
|
| 6 |
};
|
|
@@ -1,7 +1,6 @@
|
|
| 1 |
use eframe::egui;
|
| 2 |
use openwa_core::address::va;
|
| 3 |
-
use openwa_core::
|
| 4 |
-
use openwa_core::ddgame_wrapper::DDGameWrapper;
|
| 5 |
use openwa_core::rebase::rb;
|
| 6 |
use openwa_core::task::{CTask, CTaskCloud, CTaskFire, CTaskMine, CTaskOilDrum, CTaskTeam, CTaskTurnGame, CTaskWorm, TurnGameCtx};
|
| 7 |
|
|
@@ -539,7 +538,7 @@ impl DebugApp {
|
|
| 539 |
}
|
| 540 |
|
| 541 |
// --- CTaskWorm-specific fields ---
|
| 542 |
-
if name == "CTaskWorm" || (*task).class_type == openwa_core::
|
| 543 |
let worm = addr as *const CTaskWorm;
|
| 544 |
egui::CollapsingHeader::new("CTaskWorm")
|
| 545 |
.default_open(true)
|
|
|
|
| 1 |
use eframe::egui;
|
| 2 |
use openwa_core::address::va;
|
| 3 |
+
use openwa_core::engine::{DDGame, DDGameWrapper};
|
|
|
|
| 4 |
use openwa_core::rebase::rb;
|
| 5 |
use openwa_core::task::{CTask, CTaskCloud, CTaskFire, CTaskMine, CTaskOilDrum, CTaskTeam, CTaskTurnGame, CTaskWorm, TurnGameCtx};
|
| 6 |
|
|
|
|
| 538 |
}
|
| 539 |
|
| 540 |
// --- CTaskWorm-specific fields ---
|
| 541 |
+
if name == "CTaskWorm" || (*task).class_type == openwa_core::game::ClassType::Worm {
|
| 542 |
let worm = addr as *const CTaskWorm;
|
| 543 |
egui::CollapsingHeader::new("CTaskWorm")
|
| 544 |
.default_open(true)
|
|
@@ -9,7 +9,7 @@
|
|
| 9 |
//! - GameInfo__LoadOptions (0x460AC0): game options from registry
|
| 10 |
//! - Options__GetCrashReportURL (0x5A63F0): crash report URL from registry
|
| 11 |
|
| 12 |
-
use openwa_core::{address::va,
|
| 13 |
use crate::log_line;
|
| 14 |
use openwa_core::rebase::rb;
|
| 15 |
|
|
|
|
| 9 |
//! - GameInfo__LoadOptions (0x460AC0): game options from registry
|
| 10 |
//! - Options__GetCrashReportURL (0x5A63F0): crash report URL from registry
|
| 11 |
|
| 12 |
+
use openwa_core::{address::va, engine::GameInfo};
|
| 13 |
use crate::log_line;
|
| 14 |
use openwa_core::rebase::rb;
|
| 15 |
|
|
@@ -6,7 +6,7 @@
|
|
| 6 |
//! correctly frees our Rust-allocated sprite cache sub-objects
|
| 7 |
|
| 8 |
use openwa_core::address::va;
|
| 9 |
-
use openwa_core::
|
| 10 |
use openwa_core::rebase::rb;
|
| 11 |
use openwa_core::vtable::patch_vtable;
|
| 12 |
use openwa_core::wa_alloc::wa_free;
|
|
|
|
| 6 |
//! correctly frees our Rust-allocated sprite cache sub-objects
|
| 7 |
|
| 8 |
use openwa_core::address::va;
|
| 9 |
+
use openwa_core::display::{DisplayBase, SpriteCacheWrapper, SpriteBufferCtrl};
|
| 10 |
use openwa_core::rebase::rb;
|
| 11 |
use openwa_core::vtable::patch_vtable;
|
| 12 |
use openwa_core::wa_alloc::wa_free;
|
|
@@ -9,7 +9,7 @@ use crate::log_line;
|
|
| 9 |
use openwa_core::wa::mfc::{CDialogHandle, CWndHandle};
|
| 10 |
use openwa_core::wa_call;
|
| 11 |
use openwa_core::address::va;
|
| 12 |
-
use openwa_core::
|
| 13 |
|
| 14 |
// Frontend dialog struct offsets (MFC CDialog-derived)
|
| 15 |
const DIALOG_FLAGS: usize = 0x3C;
|
|
|
|
| 9 |
use openwa_core::wa::mfc::{CDialogHandle, CWndHandle};
|
| 10 |
use openwa_core::wa_call;
|
| 11 |
use openwa_core::address::va;
|
| 12 |
+
use openwa_core::game::ScreenId;
|
| 13 |
|
| 14 |
// Frontend dialog struct offsets (MFC CDialog-derived)
|
| 15 |
const DIALOG_FLAGS: usize = 0x3C;
|
|
@@ -15,13 +15,13 @@
|
|
| 15 |
//! - `DDGame__InitGameState` (0x526500): plain stdcall(this), called via transmute.
|
| 16 |
|
| 17 |
use openwa_core::address::va;
|
| 18 |
-
use openwa_core::
|
| 19 |
use openwa_core::rebase::rb;
|
| 20 |
-
use openwa_core::
|
| 21 |
-
use openwa_core::
|
| 22 |
-
use openwa_core::
|
| 23 |
-
use openwa_core::
|
| 24 |
-
use openwa_core::
|
| 25 |
use crate::hook;
|
| 26 |
use crate::log_line;
|
| 27 |
|
|
|
|
| 15 |
//! - `DDGame__InitGameState` (0x526500): plain stdcall(this), called via transmute.
|
| 16 |
|
| 17 |
use openwa_core::address::va;
|
| 18 |
+
use openwa_core::engine::GameInfo;
|
| 19 |
use openwa_core::rebase::rb;
|
| 20 |
+
use openwa_core::engine::DDGameWrapper;
|
| 21 |
+
use openwa_core::display::DDDisplay;
|
| 22 |
+
use openwa_core::audio::DSSound;
|
| 23 |
+
use openwa_core::engine::GameSession;
|
| 24 |
+
use openwa_core::display::Palette;
|
| 25 |
use crate::hook;
|
| 26 |
use crate::log_line;
|
| 27 |
|
|
@@ -43,19 +43,10 @@
|
|
| 43 |
|
| 44 |
use openwa_core::address::va;
|
| 45 |
use openwa_core::rebase::rb;
|
| 46 |
-
use openwa_core::
|
| 47 |
-
use openwa_core::
|
| 48 |
-
use openwa_core::
|
| 49 |
-
use openwa_core::
|
| 50 |
-
use openwa_core::dddisplay::DDDisplay;
|
| 51 |
-
use openwa_core::dssound::DSSound;
|
| 52 |
-
use openwa_core::palette::Palette;
|
| 53 |
-
use openwa_core::input_ctrl::{InputCtrl, InputCtrlVtable};
|
| 54 |
-
use openwa_core::game_timer::GameTimer;
|
| 55 |
-
use openwa_core::display_base::DisplayBase;
|
| 56 |
-
use openwa_core::display_gfx::DisplayGfx;
|
| 57 |
-
use openwa_core::streaming_audio::StreamingAudio;
|
| 58 |
-
use openwa_core::ddnetgame_wrapper::DDNetGameWrapper;
|
| 59 |
use openwa_core::wa_alloc::WABox;
|
| 60 |
use crate::hook;
|
| 61 |
use crate::log_line;
|
|
|
|
| 43 |
|
| 44 |
use openwa_core::address::va;
|
| 45 |
use openwa_core::rebase::rb;
|
| 46 |
+
use openwa_core::engine::{GameInfo, GameSession, DDGameWrapper, GameTimer, DDNetGameWrapper};
|
| 47 |
+
use openwa_core::input::{DDKeyboard, InputCtrl, InputCtrlVtable};
|
| 48 |
+
use openwa_core::display::{DDDisplay, DisplayBase, DisplayGfx, Palette};
|
| 49 |
+
use openwa_core::audio::{DSSound, StreamingAudio};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
use openwa_core::wa_alloc::WABox;
|
| 51 |
use crate::hook;
|
| 52 |
use crate::log_line;
|
|
@@ -18,8 +18,7 @@ use crate::hook;
|
|
| 18 |
use crate::log_line;
|
| 19 |
use openwa_core::rebase::rb;
|
| 20 |
use openwa_core::address::va;
|
| 21 |
-
use openwa_core::
|
| 22 |
-
use openwa_core::ddgame_wrapper::DDGameWrapper;
|
| 23 |
|
| 24 |
extern "system" {
|
| 25 |
fn IsBadReadPtr(lp: *const u8, ucb: u32) -> i32;
|
|
|
|
| 18 |
use crate::log_line;
|
| 19 |
use openwa_core::rebase::rb;
|
| 20 |
use openwa_core::address::va;
|
| 21 |
+
use openwa_core::engine::{DDGame, DDGameWrapper};
|
|
|
|
| 22 |
|
| 23 |
extern "system" {
|
| 24 |
fn IsBadReadPtr(lp: *const u8, ucb: u32) -> i32;
|
|
@@ -5,7 +5,7 @@
|
|
| 5 |
|
| 6 |
use openwa_core::rebase::rb;
|
| 7 |
use openwa_core::address::va;
|
| 8 |
-
use openwa_core::render::*;
|
| 9 |
use openwa_core::task::{BungeeTrailTask, WeaponAimTask};
|
| 10 |
|
| 11 |
use crate::hook::{self, usercall_trampoline};
|
|
|
|
| 5 |
|
| 6 |
use openwa_core::rebase::rb;
|
| 7 |
use openwa_core::address::va;
|
| 8 |
+
use openwa_core::render::queue::*;
|
| 9 |
use openwa_core::task::{BungeeTrailTask, WeaponAimTask};
|
| 10 |
|
| 11 |
use crate::hook::{self, usercall_trampoline};
|
|
@@ -17,7 +17,7 @@ use std::sync::atomic::{AtomicU32, Ordering};
|
|
| 17 |
use crate::log_line;
|
| 18 |
use openwa_core::rebase::rb;
|
| 19 |
use openwa_core::address::va;
|
| 20 |
-
use openwa_core::scheme::{
|
| 21 |
ExtendedOptions, SchemeFile, SchemeVersion, EXTENDED_OPTIONS_DEFAULTS, EXTENDED_OPTIONS_SIZE,
|
| 22 |
SCHEME_PAYLOAD_V1, SCHEME_PAYLOAD_V2, SCHEME_PAYLOAD_V3,
|
| 23 |
};
|
|
|
|
| 17 |
use crate::log_line;
|
| 18 |
use openwa_core::rebase::rb;
|
| 19 |
use openwa_core::address::va;
|
| 20 |
+
use openwa_core::game::scheme::{
|
| 21 |
ExtendedOptions, SchemeFile, SchemeVersion, EXTENDED_OPTIONS_DEFAULTS, EXTENDED_OPTIONS_SIZE,
|
| 22 |
SCHEME_PAYLOAD_V1, SCHEME_PAYLOAD_V2, SCHEME_PAYLOAD_V3,
|
| 23 |
};
|
|
@@ -10,8 +10,8 @@
|
|
| 10 |
use std::sync::atomic::Ordering;
|
| 11 |
|
| 12 |
use openwa_core::address::va;
|
| 13 |
-
use openwa_core::
|
| 14 |
-
use openwa_core::
|
| 15 |
use openwa_core::task::CGameTask;
|
| 16 |
|
| 17 |
use crate::hook;
|
|
|
|
| 10 |
use std::sync::atomic::Ordering;
|
| 11 |
|
| 12 |
use openwa_core::address::va;
|
| 13 |
+
use openwa_core::engine::{DDGame, SoundQueueEntry};
|
| 14 |
+
use openwa_core::audio::SoundId;
|
| 15 |
use openwa_core::task::CGameTask;
|
| 16 |
|
| 17 |
use crate::hook;
|
|
@@ -13,9 +13,9 @@ use std::sync::atomic::{AtomicU32, Ordering};
|
|
| 13 |
use heapless::CString;
|
| 14 |
|
| 15 |
use openwa_core::rebase::rb;
|
| 16 |
-
use openwa_core::
|
| 17 |
use openwa_core::address::va::{self, game_info_offsets};
|
| 18 |
-
use openwa_core::
|
| 19 |
|
| 20 |
use crate::hook::{self, usercall_trampoline};
|
| 21 |
use crate::log_line;
|
|
|
|
| 13 |
use heapless::CString;
|
| 14 |
|
| 15 |
use openwa_core::rebase::rb;
|
| 16 |
+
use openwa_core::engine::DDGameWrapper;
|
| 17 |
use openwa_core::address::va::{self, game_info_offsets};
|
| 18 |
+
use openwa_core::audio::SpeechLineTableEntry;
|
| 19 |
|
| 20 |
use crate::hook::{self, usercall_trampoline};
|
| 21 |
use crate::log_line;
|
|
@@ -11,7 +11,7 @@
|
|
| 11 |
//! - SetActiveWorm_Maybe (0x522500): update team active state and counters
|
| 12 |
|
| 13 |
use openwa_core::address::va;
|
| 14 |
-
use openwa_core::ddgame::{self, TeamArenaRef};
|
| 15 |
|
| 16 |
use crate::hook::{self, usercall_trampoline};
|
| 17 |
|
|
|
|
| 11 |
//! - SetActiveWorm_Maybe (0x522500): update team active state and counters
|
| 12 |
|
| 13 |
use openwa_core::address::va;
|
| 14 |
+
use openwa_core::engine::ddgame::{self, TeamArenaRef};
|
| 15 |
|
| 16 |
use crate::hook::{self, usercall_trampoline};
|
| 17 |
|