refactor: retype landscape fields from *mut u8 to *mut PCLandscape
Browse files
crates/openwa-core/src/ddgame.rs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
use crate::game_info::GameInfo;
|
|
|
|
| 2 |
use crate::render::RenderQueue;
|
| 3 |
use crate::speech::SpeechSlotTable;
|
| 4 |
|
|
@@ -35,7 +36,7 @@ pub struct DDGame {
|
|
| 35 |
/// 0x01C: Caller/parent pointer (param_1)
|
| 36 |
pub _caller: *mut u8,
|
| 37 |
/// 0x020: PCLandscape pointer (copied from DDGameWrapper[0x133])
|
| 38 |
-
pub landscape: *mut
|
| 39 |
/// 0x024: GameInfo pointer (passed as param_10 to constructor).
|
| 40 |
pub game_info: *mut GameInfo,
|
| 41 |
/// 0x028: param_9
|
|
|
|
| 1 |
use crate::game_info::GameInfo;
|
| 2 |
+
use crate::landscape::PCLandscape;
|
| 3 |
use crate::render::RenderQueue;
|
| 4 |
use crate::speech::SpeechSlotTable;
|
| 5 |
|
|
|
|
| 36 |
/// 0x01C: Caller/parent pointer (param_1)
|
| 37 |
pub _caller: *mut u8,
|
| 38 |
/// 0x020: PCLandscape pointer (copied from DDGameWrapper[0x133])
|
| 39 |
+
pub landscape: *mut PCLandscape,
|
| 40 |
/// 0x024: GameInfo pointer (passed as param_10 to constructor).
|
| 41 |
pub game_info: *mut GameInfo,
|
| 42 |
/// 0x028: param_9
|
crates/openwa-core/src/ddgame_wrapper.rs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
use crate::ddgame::DDGame;
|
|
|
|
| 2 |
|
| 3 |
/// DDGameWrapper — large wrapper around DDGame.
|
| 4 |
///
|
|
@@ -34,7 +35,7 @@ pub struct DDGameWrapper {
|
|
| 34 |
/// 0x4C8: Graphics mode flag (DWORD index 0x132)
|
| 35 |
pub gfx_mode: u32,
|
| 36 |
/// 0x4CC: PCLandscape object pointer (DWORD index 0x133)
|
| 37 |
-
pub landscape: *mut
|
| 38 |
/// 0x4D0: DDDisplay/display object pointer (param2 of constructor)
|
| 39 |
pub display: *mut u8,
|
| 40 |
/// 0x4D4: DSSound/sound object pointer (param3 of constructor)
|
|
|
|
| 1 |
use crate::ddgame::DDGame;
|
| 2 |
+
use crate::landscape::PCLandscape;
|
| 3 |
|
| 4 |
/// DDGameWrapper — large wrapper around DDGame.
|
| 5 |
///
|
|
|
|
| 35 |
/// 0x4C8: Graphics mode flag (DWORD index 0x132)
|
| 36 |
pub gfx_mode: u32,
|
| 37 |
/// 0x4CC: PCLandscape object pointer (DWORD index 0x133)
|
| 38 |
+
pub landscape: *mut PCLandscape,
|
| 39 |
/// 0x4D0: DDDisplay/display object pointer (param2 of constructor)
|
| 40 |
pub display: *mut u8,
|
| 41 |
/// 0x4D4: DSSound/sound object pointer (param3 of constructor)
|