World module offsets for windows 31.22

develop
Petr Mrázek 2011-03-25 03:27:07 +01:00
parent 4c030e7cc1
commit 1a1a28ee3d
2 changed files with 10 additions and 4 deletions

@ -934,7 +934,7 @@
<Address name="current_weather" description="5x5 array of bytes for surrounding biomes. For each: 0=clear, 1=raining, 2=snowing." /> <Address name="current_weather" description="5x5 array of bytes for surrounding biomes. For each: 0=clear, 1=raining, 2=snowing." />
<Address name="game_mode" description="Current game mode" /> <Address name="game_mode" description="Current game mode" />
<Address name="control_mode" description="Current control mode" /> <Address name="control_mode" description="Current control mode" />
<Address name="control_mode_copy" description="Copy of the control mode in DF memory" /> <!--<Address name="control_mode_copy" description="Copy of the control mode in DF memory" />-->
</Group> </Group>
</Offsets> </Offsets>
</Base> </Base>
@ -1995,7 +1995,7 @@
<Address name="current_weather" value="0x15027A0" /> <Address name="current_weather" value="0x15027A0" />
<Address name="control_mode" value="0xb4a814" /> <Address name="control_mode" value="0xb4a814" />
<Address name="game_mode" value="0xb4a818" /> <Address name="game_mode" value="0xb4a818" />
<Address name="control_mode_copy" value="0xe2e2a2" /> <!--<Address name="control_mode_copy" value="0xe2e2a2" />-->
fortress = 0, adventure = 1, arena = 0, menu and legends = 3 0xb4a814 fortress = 0, adventure = 1, arena = 0, menu and legends = 3 0xb4a814
Game mode: 0xb4a818 . fortress = 0, adventure = 1, arena = 4 Game mode: 0xb4a818 . fortress = 0, adventure = 1, arena = 4
0xe2e2a2 seems to be a copy of the first one 0xe2e2a2 seems to be a copy of the first one
@ -2100,6 +2100,7 @@
<PETimeStamp value="0x4D8B30FC" /> <PETimeStamp value="0x4D8B30FC" />
<MD5 value="e31538a48efcfa6598b15bb938906c6b" /> <MD5 value="e31538a48efcfa6598b15bb938906c6b" />
<Offsets> <Offsets>
mode
<Group name="Position"> <Group name="Position">
<Address name="cursor_xyz" value="0xb337f0" /> <Address name="cursor_xyz" value="0xb337f0" />
<Address name="window_dims" value="0xb3407c" /> <Address name="window_dims" value="0xb3407c" />
@ -2125,6 +2126,13 @@
<Offset name="biome_stuffs" value="0x1d80" /> <Offset name="biome_stuffs" value="0x1d80" />
</Group> </Group>
</Group> </Group>
<Group name="World">
<Address name="control_mode" value="0xb33814" />
<Address name="game_mode" value="0xb33818"/>
<Address name="current_year" value="0xef6268" />
<Address name="current_tick" value="0xe17180" />
<Address name="current_weather" value="0x14eb7a0" />
</Group>
</Offsets> </Offsets>
</Version> </Version>
.-"""-. .-"""-.

@ -96,7 +96,6 @@ World::World(DFContextShared * _d)
{ {
d->gamemode_offset = OG_World->getAddress( "game_mode" ); d->gamemode_offset = OG_World->getAddress( "game_mode" );
d->controlmode_offset = OG_World->getAddress( "control_mode" ); d->controlmode_offset = OG_World->getAddress( "control_mode" );
d->controlmodecopy_offset = OG_World->getAddress( "control_mode" );
d->StartedMode = true; d->StartedMode = true;
} }
catch(Error::All &){}; catch(Error::All &){};
@ -162,7 +161,6 @@ bool World::WriteGameMode(const t_gamemodes & wr)
{ {
d->owner->writeDWord(d->gamemode_offset,wr.game_mode); d->owner->writeDWord(d->gamemode_offset,wr.game_mode);
d->owner->writeDWord(d->controlmode_offset,wr.control_mode); d->owner->writeDWord(d->controlmode_offset,wr.control_mode);
d->owner->writeDWord(d->controlmodecopy_offset,wr.control_mode);
return true; return true;
} }
return false; return false;