Skip to content

Commit

Permalink
fixed crash in map view by shifting data cut address
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
DiaLight committed Aug 23, 2024
1 parent 001d630 commit 9dd7c13
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
4 changes: 2 additions & 2 deletions how_it_works.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ In `DKII.EXE` version 1.7.0 there are sections:
00401000-00652AA2 R-X .text
00653000-0066BE1A R-X cseg
0066C000-0068D53C R-- .rdata
0068E000-006CCA20 RW- .data
006CCA20-007A6DD0 RW- .data uninitialized
0068E000-006CD190 RW- .data
006CD190-007A6DD0 RW- .data uninitialized
007A7000-007A7730 RW- grpoly_d
007A8000-007ACACC RW- uva_data
007AD000-007AE658 RW- idct_dat
Expand Down
4 changes: 2 additions & 2 deletions how_it_works_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
00401000-00652AA2 R-X .text
00653000-0066BE1A R-X cseg
0066C000-0068D53C R-- .rdata
0068E000-006CCA20 RW- .data
006CCA20-007A6DD0 RW- .data uninitialized
0068E000-006CD190 RW- .data
006CD190-007A6DD0 RW- .data uninitialized
007A7000-007A7730 RW- grpoly_d
007A8000-007ACACC RW- uva_data
007AD000-007AE658 RW- idct_dat
Expand Down
26 changes: 12 additions & 14 deletions mapping/DKII_EXE_v170.sgmap
Original file line number Diff line number Diff line change
Expand Up @@ -4992,9 +4992,8 @@ struct: id=vtbl_0066EF3C,name=CFrontEndComponent,size=201210,vtable=instance_006
type: kind=int,size=4
field: name=field_6015
type: kind=int,size=1,signed=True,winapi=char
field: name=gap6016
type: kind=array,count=4
type: kind=int,size=1
field: name=field_6016
type: kind=int,size=4,signed=True
field: name=field_601A
type: kind=int,size=1,signed=True,winapi=char
field: name=gap601B
Expand Down Expand Up @@ -16577,7 +16576,7 @@ struct: id=constructor_00506660,name=MyManufactureList,size=2056
struct: id=constructor_00452B30,path=dk2/world/map,name=MyMapElement,size=16
field: name=field_0
type: kind=int,size=2
field: name=field_2_roomId
field: name=f2_roomId
type: kind=int,size=2
field: name=field_4
type: kind=int,size=2,signed=True
Expand Down Expand Up @@ -48087,10 +48086,11 @@ global: va=00541AA0,name=sub_541AA0,size=841,member_of=vtbl_0066EF3C
type: kind=struct,id=vtbl_0066EF3C
arg: kind=ptr,is_const=True
type: kind=int,size=1,signed=True,winapi=char
global: va=00541DF0,name=sub_541DF0,size=337
global: va=00541DF0,name=CFrontEndComponent_sub_541DF0,size=337
type: kind=function,declspec=cdecl
ret: kind=int,size=1,signed=True,winapi=char
arg: kind=int,size=4,signed=True
arg: kind=ptr
type: kind=struct,id=vtbl_0066EF3C
global: va=00541F50,name=CButton_sub_541F50,size=284
type: kind=function,declspec=cdecl
ret: kind=int,size=1,signed=True,winapi=char
Expand Down Expand Up @@ -59832,24 +59832,24 @@ global: va=005B6B00,name=sub_5B6B00,size=53
global: va=005B6B50,name=sub_5B6B50,size=53
type: kind=function,declspec=stdcall
ret: kind=int,size=4,signed=True
global: va=005B6BE0,name=sub_5B6BE0,size=130
global: va=005B6BE0,name=sub_5B6BE0,size=130,member_of=vtbl_00671F80
type: kind=function,declspec=thiscall
ret: kind=ptr
type: kind=int,size=4
arg: kind=ptr
type: kind=int,size=1,signed=True,winapi=char
type: kind=struct,id=vtbl_00671F80
arg: kind=ptr
type: kind=int,size=4
arg: kind=ptr
type: kind=struct,id=vtbl_00671F80
arg: kind=ptr
type: kind=struct,id=constructor_005B5270
global: va=005B6C70,name=sub_5B6C70,size=246
global: va=005B6C70,name=sub_5B6C70,size=246,member_of=vtbl_00671F80
type: kind=function,declspec=thiscall
ret: kind=ptr
type: kind=int,size=4
arg: kind=ptr
type: kind=int,size=1,signed=True,winapi=char
type: kind=struct,id=vtbl_00671F80
arg: kind=ptr
type: kind=int,size=4
arg: kind=int,size=4,signed=True
Expand Down Expand Up @@ -79781,11 +79781,9 @@ global: va=006CC648,name=Dest,size=4
type: kind=int,size=1,signed=True,winapi=char
global: va=006CCA20,name=CEntryComponent_instance,size=64
type: kind=struct,id=vtbl_0066C424
global: va=006CCA60,name=myDdSurfaceArr_x15,size=1680
type: kind=array,count=21
global: va=006CCA60,name=myDdSurfaceArr_x23,size=1840
type: kind=array,count=23
type: kind=struct,id=instance_0079D200
global: va=006CD0F0,name=myDdSurface_end,size=4
type: kind=int,size=4,signed=True
global: va=006CE850,name=my_surf,size=80
type: kind=struct,id=instance_0079D200
global: va=006CE8A0,name=idx,size=4
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For a more detailed description of how Flame works, read `how_it_works.md`
The latest build can be taken from the github actions

How to install:
- copy DKII-Flame-1.7.0-*.exe from github actions to game directory (no need to rename DKII-DX.exe or DKII.exe. exe name does not matter)
- copy DKII-Flame-1.7.0-*.exe from github actions to game directory (no need rename to DKII-DX.exe or DKII.exe. exe name does not matter)
- copy ddraw.dll from https://github.com/narzoul/DDrawCompat/releases/tag/v0.5.3 to game directory
- copy dinput.dll from https://github.com/elishacloud/dinputto8/releases/tag/v1.0.54.0 to game directory
- run DKII-Flame-1.7.0-*.exe
Expand Down
4 changes: 2 additions & 2 deletions tools/delinker/dk2_170.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ bool collectSectionChunks(uint8_t *base, std::vector<SectionChunk> &out) {
uninitializedData = virtualEnd + 1;
chunkEnd = virtualEnd + 1;
} else if(secName == ".data") { // RW- virtualEnd=007A6DD0 rawEnd=006CCC00
// in dk2_170 uninitialized data starts with va=006CCA20
uninitializedData = 0x006CCA20;
// in dk2_170 uninitialized data starts with va=006CCC00 but we'll move it forward a little
uninitializedData = 0x006CD190;
} else if(secName == "grpoly_d") { // RW- virtualEnd=007A7730 rawEnd=007A7800 endVal=56000400
// ok
} else if(secName == "uva_data") { // RW- virtualEnd=007ACACC rawEnd=007ACC00 endVal=56000400
Expand Down

0 comments on commit 9dd7c13

Please sign in to comment.