mirror of https://github.com/zeldaret/tp.git
Update dtk-template (#2453)
* Update dtk-template * Fix debug build * Fix d_event_debug includes * Progress reports: Enable function relocation diffing (data_value) * Fix some diffs * Fix a few more diffs * More fixes
This commit is contained in:
parent
3c2a99e701
commit
0212d1d18e
|
@ -32,20 +32,7 @@ jobs:
|
|||
run: |
|
||||
python configure.py --map --version ${{ matrix.version }} \
|
||||
--binutils /binutils --compilers /compilers
|
||||
ninja all_source build/${{ matrix.version }}/progress.json \
|
||||
build/${{ matrix.version }}/report.json
|
||||
|
||||
# Upload progress if we're on the main branch
|
||||
- name: Upload progress
|
||||
if: github.ref == 'refs/heads/main'
|
||||
continue-on-error: true
|
||||
env:
|
||||
PROGRESS_SLUG: twilightprincess
|
||||
PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }}
|
||||
run: |
|
||||
python tools/upload_progress.py -b https://progress.decomp.club/ \
|
||||
-p $PROGRESS_SLUG -v ${{ matrix.version }} \
|
||||
build/${{ matrix.version }}/progress.json
|
||||
ninja all_source progress build/${{ matrix.version }}/report.json
|
||||
|
||||
# Upload map files
|
||||
- name: Upload map
|
||||
|
|
|
@ -655,7 +655,7 @@ d/d_bg_w.cpp:
|
|||
.text start:0x800791C4 end:0x8007E5A8
|
||||
.data start:0x803ABA80 end:0x803ABCC8
|
||||
.bss start:0x80424B80 end:0x80424F70
|
||||
.sbss start:0x80450F80 end:0x80450F90
|
||||
.sbss start:0x80450F80 end:0x80450F88
|
||||
.sdata2 start:0x804526F8 end:0x80452718
|
||||
|
||||
d/d_bg_w_base.cpp:
|
||||
|
@ -704,6 +704,7 @@ d/d_ev_camera.cpp:
|
|||
.rodata start:0x8037A7F0 end:0x8037AD68
|
||||
.data start:0x803AC528 end:0x803AC5A0
|
||||
.bss start:0x804253A8 end:0x80425438
|
||||
.sbss start:0x80450F88 end:0x80450F90
|
||||
.sdata2 start:0x804528B8 end:0x80452BC8
|
||||
|
||||
d/d_item_data.cpp:
|
||||
|
@ -806,7 +807,7 @@ d/actor/d_a_npc.cpp:
|
|||
.rodata start:0x80392680 end:0x80392A18
|
||||
.data start:0x803B36A8 end:0x803B3B80
|
||||
.bss start:0x80425708 end:0x80425978
|
||||
.sbss start:0x80450FD8 end:0x80451000
|
||||
.sbss start:0x80450FD8 end:0x80450FF8
|
||||
.sdata2 start:0x804533D8 end:0x804534B8
|
||||
|
||||
d/actor/d_a_npc_cd.cpp:
|
||||
|
@ -815,6 +816,7 @@ d/actor/d_a_npc_cd.cpp:
|
|||
.rodata start:0x80392A18 end:0x80393250
|
||||
.data start:0x803B3B80 end:0x803B61C0
|
||||
.bss start:0x80425978 end:0x80428610
|
||||
.sbss start:0x80450FF8 end:0x80451000
|
||||
.sdata2 start:0x804534B8 end:0x804534E0
|
||||
|
||||
d/actor/d_a_npc_cd2.cpp:
|
||||
|
@ -1877,7 +1879,7 @@ JSystem/JAudio2/JASProbe.cpp:
|
|||
JSystem/JAudio2/JASReport.cpp:
|
||||
.text start:0x80290F64 end:0x80291060
|
||||
.bss start:0x80431660 end:0x80431678
|
||||
.sbss start:0x80451220 end:0x80451238
|
||||
.sbss start:0x80451220 end:0x80451230
|
||||
|
||||
JSystem/JAudio2/JASCmdStack.cpp:
|
||||
.text start:0x80291060 end:0x80291228
|
||||
|
@ -2078,13 +2080,14 @@ JSystem/JAudio2/JAISeMgr.cpp:
|
|||
.rodata start:0x8039B8F8 end:0x8039B910
|
||||
.data start:0x803C98B0 end:0x803C98D8
|
||||
.bss start:0x80434078 end:0x80434098
|
||||
.sbss start:0x80451310 end:0x80451320
|
||||
.sbss start:0x80451310 end:0x80451318
|
||||
.sdata2 start:0x80455788 end:0x80455798
|
||||
|
||||
JSystem/JAudio2/JAISeq.cpp:
|
||||
.text start:0x802A0A6C end:0x802A1774
|
||||
.data start:0x803C98D8 end:0x803C9928
|
||||
.bss start:0x80434098 end:0x804340C0
|
||||
.sbss start:0x80451318 end:0x80451320
|
||||
.sdata2 start:0x80455798 end:0x804557A8
|
||||
|
||||
JSystem/JAudio2/JAISeqDataMgr.cpp:
|
||||
|
|
|
@ -21147,11 +21147,11 @@ sDefaultBankTable__8JASTrack = .bss:0x804316B4; // type:object size:0x40C scope:
|
|||
sTrackList__8JASTrack = .bss:0x80431ACC; // type:object size:0x10 scope:global align:4 data:4byte
|
||||
@470 = .bss:0x80431ADC; // type:object size:0xC scope:local align:4
|
||||
@476 = .bss:0x80431AE8; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___58JASPoolAllocObject_MultiThreaded<Q28JASTrack11TChannelMgr>Fv = .bss:0x80431AF4; // type:object size:0x10 scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___43JASPoolAllocObject_MultiThreaded<8JASTrack>Fv = .bss:0x80431B04; // type:object size:0x10 scope:local align:4
|
||||
memPool_$localstatic3$getMemPool__58JASPoolAllocObject_MultiThreaded<Q28JASTrack11TChannelMgr>Fv = .bss:0x80431AF4; // type:object size:0x10 scope:weak align:4
|
||||
memPool_$localstatic3$getMemPool__43JASPoolAllocObject_MultiThreaded<8JASTrack>Fv = .bss:0x80431B04; // type:object size:0x10 scope:weak align:4
|
||||
@433 = .bss:0x80431B18; // type:object size:0xC scope:local align:4
|
||||
@792 = .bss:0x80431B28; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___46JASPoolAllocObject_MultiThreaded<10JASChannel>Fv = .bss:0x80431B34; // type:object size:0x10 scope:local align:4
|
||||
memPool_$localstatic3$getMemPool__46JASPoolAllocObject_MultiThreaded<10JASChannel>Fv = .bss:0x80431B34; // type:object size:0x10 scope:weak align:4
|
||||
@156 = .bss:0x80431B48; // type:object size:0xC scope:local align:4
|
||||
osc$213 = .bss:0x80431B58; // type:object size:0x18 scope:local align:4 data:float
|
||||
@1065 = .bss:0x80431B70; // type:object size:0xC scope:local align:4
|
||||
|
@ -21172,10 +21172,10 @@ AUDIO_YIELD_BUFFER = .bss:0x80431FE0; // type:object size:0x2000 scope:global al
|
|||
taskwork = .bss:0x80433FE0; // type:object size:0x80 scope:global align:4
|
||||
sync_stack = .bss:0x80434060; // type:object size:0x14 scope:global align:4 data:4byte
|
||||
@744 = .bss:0x80434078; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___26JASPoolAllocObject<5JAISe>Fv = .bss:0x80434084; // type:object size:0x10 scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___26JASPoolAllocObject<5JAISe>Fv = .bss:0x80434084; // type:object size:0x10 scope:weak align:4
|
||||
@716 = .bss:0x80434098; // type:object size:0xC scope:local align:4
|
||||
@896 = .bss:0x804340A4; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___35JASPoolAllocObject<13JAISoundChild>Fv = .bss:0x804340B0; // type:object size:0x10 scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___35JASPoolAllocObject<13JAISoundChild>Fv = .bss:0x804340B0; // type:object size:0x10 scope:weak align:4
|
||||
@715 = .bss:0x804340C0; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___27JASPoolAllocObject<6JAISeq>Fv = .bss:0x804340CC; // type:object size:0x10 scope:weak align:4
|
||||
@881 = .bss:0x804340E0; // type:object size:0xC scope:local align:4
|
||||
|
@ -21191,7 +21191,7 @@ memPool_$localstatic3$getMemPool___30JASPoolAllocObject<9JAIStream>Fv = .bss:0x8
|
|||
@632 = .bss:0x804341B8; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___39JASPoolAllocObject<17Z2SoundHandlePool>Fv = .bss:0x804341C4; // type:object size:0x10 scope:weak align:4
|
||||
@1539 = .bss:0x804341D8; // type:object size:0xC scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___30JASPoolAllocObject<9Z2Audible>Fv = .bss:0x804341E4; // type:object size:0x10 scope:local align:4
|
||||
memPool_$localstatic3$getMemPool___30JASPoolAllocObject<9Z2Audible>Fv = .bss:0x804341E4; // type:object size:0x10 scope:weak align:4
|
||||
...bss.0 = .bss:0x804341F8; // type:label scope:local
|
||||
sCorrectPhrase = .bss:0x804341F8; // type:object size:0x24 scope:global align:4 data:4byte
|
||||
sWindStoneSound = .bss:0x8043421C; // type:object size:0x24 scope:global align:4 data:4byte
|
||||
|
@ -21584,7 +21584,7 @@ __DSPVersion = .sdata:0x80450A58; // type:object size:0x4 scope:global align:4 d
|
|||
__CARDVersion = .sdata:0x80450A60; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
next = .sdata:0x80450A68; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
__CARDVendorID = .sdata:0x80450A70; // type:object size:0x2 scope:global align:2 data:2byte
|
||||
data_80450A72 = .sdata:0x80450A72; // type:object size:0x1 scope:global align:1 data:byte
|
||||
__CARDPermMask = .sdata:0x80450A72; // type:object size:0x1 scope:global align:1 data:byte
|
||||
__GXVersion = .sdata:0x80450A78; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
tbl1$241 = .sdata:0x80450A80; // type:object size:0x4 scope:local align:4
|
||||
tbl2$242 = .sdata:0x80450A84; // type:object size:0x4 scope:local align:4
|
||||
|
@ -21896,7 +21896,10 @@ m_dzb_id__16dBgS_MoveBgActor = .sbss:0x80450F74; // type:object size:0x4 scope:g
|
|||
m_set_func__16dBgS_MoveBgActor = .sbss:0x80450F78; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
l_start = .sbss:0x80450F80; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
l_wcsbuf_num = .sbss:0x80450F84; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
struct_80450F88 = .sbss:0x80450F88; // type:object size:0x8 scope:global align:4 data:byte
|
||||
init$3207 = .sbss:0x80450F88; // type:object size:0x1 data:byte
|
||||
init$4121 = .sbss:0x80450F89; // type:object size:0x1 data:byte
|
||||
init$4717 = .sbss:0x80450F8A; // type:object size:0x1 scope:local align:1 data:byte
|
||||
init$7803 = .sbss:0x80450F8B; // type:object size:0x1 data:byte
|
||||
mData__12dEnemyItem_c = .sbss:0x80450F90; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
mTypeGroupData__7dTres_c = .sbss:0x80450F98; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
mNum__7dTres_c = .sbss:0x80450F9C; // type:object size:0x2 scope:global align:2 data:2byte
|
||||
|
@ -21922,8 +21925,8 @@ m_set_func__23daBaseNpc_moveBgActor_c = .sbss:0x80450FE8; // type:object size:0x
|
|||
data_80450FEC = .sbss:0x80450FEC; // type:object size:0x1 scope:local align:4 data:byte
|
||||
mFindCount__8daNpcF_c = .sbss:0x80450FF0; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
mSrchActorName__8daNpcF_c = .sbss:0x80450FF4; // type:object size:0x2 scope:global align:2 data:2byte
|
||||
data_80450FF8 = .sbss:0x80450FF8; // type:object size:0x8 scope:global align:4 data:byte
|
||||
data_80451000 = .sbss:0x80451000; // type:object size:0x1 scope:local align:4 data:byte
|
||||
init$1719 = .sbss:0x80450FF8; // type:object size:0x1 scope:global align:1 data:byte
|
||||
init$1834 = .sbss:0x80451000; // type:object size:0x1 scope:local align:1 data:byte
|
||||
target = .sbss:0x80451004; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
targetWay = .sbss:0x80451008; // type:object size:0x4 scope:global align:4 data:float
|
||||
wolfAngle = .sbss:0x8045100C; // type:object size:0x2 scope:global align:2 data:2byte
|
||||
|
@ -22038,7 +22041,8 @@ sBuffer = .sbss:0x80451220; // type:object size:0x4 scope:global align:4 data:4b
|
|||
sLineMax = .sbss:0x80451224; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
sLineCount = .sbss:0x80451228; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
sTop = .sbss:0x8045122C; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
struct_80451230 = .sbss:0x80451230; // type:object size:0x8 scope:global align:4 data:byte
|
||||
init$localstatic4$getMemPool__58JASPoolAllocObject_MultiThreaded<Q28JASTrack11TChannelMgr>Fv = .sbss:0x80451230; // type:object size:0x1 scope:global data:byte
|
||||
init$localstatic4$getMemPool__43JASPoolAllocObject_MultiThreaded<8JASTrack>Fv = .sbss:0x80451231; // type:object size:0x1 scope:global align:1 data:byte
|
||||
sDefaultParser__10JASSeqCtrl = .sbss:0x80451238; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
sCallBackFunc__12JASSeqParser = .sbss:0x80451240; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
init$528 = .sbss:0x80451244; // type:object size:0x1 scope:local align:1 data:byte
|
||||
|
@ -22049,7 +22053,7 @@ sBlockSize__13JASAramStream = .sbss:0x80451258; // type:object size:0x4 scope:gl
|
|||
sChannelMax__13JASAramStream = .sbss:0x8045125C; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
data_80451260 = .sbss:0x80451260; // type:object size:0x1 scope:global align:1 data:byte
|
||||
data_80451261 = .sbss:0x80451261; // type:object size:0x1 scope:global align:1 data:byte
|
||||
data_80451262 = .sbss:0x80451262; // type:object size:0x1 data:byte
|
||||
init$localstatic4$getMemPool__46JASPoolAllocObject_MultiThreaded<10JASChannel>Fv = .sbss:0x80451262; // type:object size:0x1 scope:global align:1 data:byte
|
||||
sOscTable__12JASVoiceBank = .sbss:0x80451268; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
oscp$214 = .sbss:0x80451270; // type:object size:0x4 scope:local align:4 data:4byte
|
||||
data_80451274 = .sbss:0x80451274; // type:object size:0x1 scope:local align:4 data:byte
|
||||
|
@ -22086,8 +22090,8 @@ taskwritep = .sbss:0x80451304; // type:object size:0x4 scope:global align:4 data
|
|||
struct_80451308 = .sbss:0x80451308; // type:object size:0x1 scope:local align:1 data:byte
|
||||
struct_80451309 = .sbss:0x80451309; // type:object size:0x1 scope:local align:1 data:byte
|
||||
DSP_prior_task = .sbss:0x8045130C; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
data_80451310 = .sbss:0x80451310; // type:object size:0x8 scope:global align:4 data:byte
|
||||
data_80451318 = .sbss:0x80451318; // type:object size:0x8 scope:global align:4 data:byte
|
||||
init$localstatic4$getMemPool___26JASPoolAllocObject<5JAISe>Fv = .sbss:0x80451310; // type:object size:0x1 scope:global align:1 data:byte
|
||||
init$localstatic4$getMemPool___35JASPoolAllocObject<13JAISoundChild>Fv = .sbss:0x80451318; // type:object size:0x1 scope:global align:1 data:byte
|
||||
init$localstatic4$getMemPool___27JASPoolAllocObject<6JAISeq>Fv = .sbss:0x80451320; // type:object size:0x1 scope:global align:1 data:byte
|
||||
init$localstatic4$getMemPool___30JASPoolAllocObject<9JAIStream>Fv = .sbss:0x80451328; // type:object size:0x1 scope:global align:1 data:byte
|
||||
init$80 = .sbss:0x80451330; // type:object size:0x1 scope:local align:1 data:byte
|
||||
|
@ -22100,7 +22104,7 @@ struct_80451342 = .sbss:0x80451342; // type:object size:0x1 scope:global align:1
|
|||
pad_80451344 = .sbss:0x80451344; // type:object size:0x4 scope:global align:4
|
||||
init$localstatic4$getMemPool___39JASPoolAllocObject<17Z2SoundHandlePool>Fv = .sbss:0x80451348; // type:object size:0x1 scope:global align:1 data:byte
|
||||
cNearFarRatio = .sbss:0x80451350; // type:object size:0x4 scope:local align:4 data:float
|
||||
data_80451354 = .sbss:0x80451354; // type:object size:0x4 scope:global align:4 data:byte
|
||||
init$localstatic4$getMemPool___30JASPoolAllocObject<9Z2Audible>Fv = .sbss:0x80451354; // type:object size:0x1 scope:global align:1 data:byte
|
||||
data_80451358 = .sbss:0x80451358; // type:object size:0x1 scope:global align:1 data:byte
|
||||
data_80451359 = .sbss:0x80451359; // type:object size:0x1 scope:global align:1 data:byte
|
||||
mLinkPtr__14Z2CreatureLink = .sbss:0x80451360; // type:object size:0x4 scope:global align:4 data:4byte
|
||||
|
|
31
configure.py
31
configure.py
|
@ -181,11 +181,11 @@ if not config.non_matching:
|
|||
|
||||
# Tool versions
|
||||
config.binutils_tag = "2.42-1"
|
||||
config.compilers_tag = "20240706"
|
||||
config.dtk_tag = "v1.4.1"
|
||||
config.objdiff_tag = "v2.7.1"
|
||||
config.sjiswrap_tag = "v1.2.0"
|
||||
config.wibo_tag = "0.6.11"
|
||||
config.compilers_tag = "20250520"
|
||||
config.dtk_tag = "v1.5.1"
|
||||
config.objdiff_tag = "v3.0.0-beta.8"
|
||||
config.sjiswrap_tag = "v1.2.1"
|
||||
config.wibo_tag = "0.6.16"
|
||||
|
||||
# Project
|
||||
config.config_path = Path("config") / config.version / "config.yml"
|
||||
|
@ -343,7 +343,7 @@ cflags_rel = [
|
|||
"-sdata2 0",
|
||||
]
|
||||
|
||||
def MWVersion(cfg_version: str) -> str:
|
||||
def MWVersion(cfg_version: str | None) -> str:
|
||||
match cfg_version:
|
||||
case "GZ2E01":
|
||||
return "GC/2.7"
|
||||
|
@ -866,7 +866,7 @@ config.libs = [
|
|||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASWSParser.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio2/JASBNKParser.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASWaveArcLoader.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(Equivalent, "JSystem/JAudio2/JASChannel.cpp", extra_cflags=['-pragma "nosyminline off"']), # bss locations
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASChannel.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASLfo.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASOscillator.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio2/JASAiCtrl.cpp"),
|
||||
|
@ -884,7 +884,7 @@ config.libs = [
|
|||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAIAudience.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISe.cpp"),
|
||||
Object(Equivalent, "JSystem/JAudio2/JAISeMgr.cpp", extra_cflags=['-pragma "nosyminline off"']), # weak function order
|
||||
Object(Equivalent, "JSystem/JAudio2/JAISeq.cpp", extra_cflags=['-pragma "nosyminline off"']), # bss locations
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISeq.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISeqDataMgr.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISeqMgr.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISound.cpp"),
|
||||
|
@ -893,7 +893,7 @@ config.libs = [
|
|||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISoundInfo.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISoundParams.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAISoundStarter.cpp"),
|
||||
Object(Equivalent, "JSystem/JAudio2/JAIStream.cpp", extra_cflags=['-pragma "nosyminline off"']), # bss locations
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAIStream.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAIStreamDataMgr.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAIStreamMgr.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUAudioArcInterpreter.cpp"),
|
||||
|
@ -901,7 +901,7 @@ config.libs = [
|
|||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUAudioMgr.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUBankTable.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUClusterSound.cpp"),
|
||||
Object(Equivalent, "JSystem/JAudio2/JAUInitializer.cpp", extra_cflags=['-pragma "nosyminline off"']), # bss locations
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUInitializer.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(NonMatching, "JSystem/JAudio2/JAUSectionHeap.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUSeqCollection.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JAUSeqDataBlockMgr.cpp"),
|
||||
|
@ -1571,7 +1571,7 @@ config.libs = [
|
|||
ActorRel(NonMatching, "d_a_obj_magne_arm"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_metalbox"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_mgate"),
|
||||
ActorRel(Matching, "d_a_obj_nameplate"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_nameplate"),
|
||||
ActorRel(NonMatching, "d_a_obj_ornament_cloth"),
|
||||
ActorRel(NonMatching, "d_a_obj_rope_bridge"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_sWallShutter"),
|
||||
|
@ -2241,6 +2241,7 @@ out_dir = config.build_dir / version
|
|||
|
||||
# This generates the build steps needed for preprocessing
|
||||
def emit_build_rule(asset: Dict[str, Any]) -> None:
|
||||
assert config.custom_build_steps is not None
|
||||
steps = config.custom_build_steps.setdefault("pre-compile", [])
|
||||
custom_data = asset.get("custom_data") or {}
|
||||
|
||||
|
@ -2300,12 +2301,18 @@ config.progress_categories = [
|
|||
ProgressCategory("third_party", "Third Party"),
|
||||
]
|
||||
config.progress_each_module = args.verbose
|
||||
# Optional extra arguments to `objdiff-cli report generate`
|
||||
config.progress_report_args = [
|
||||
# Marks relocations as mismatching if the target value is different
|
||||
# Default is "functionRelocDiffs=none", which is most lenient
|
||||
"--config functionRelocDiffs=data_value",
|
||||
]
|
||||
|
||||
if args.mode == "configure":
|
||||
# Write build.ninja and objdiff.json
|
||||
generate_build(config)
|
||||
elif args.mode == "progress":
|
||||
# Print progress and write progress.json
|
||||
# Print progress information
|
||||
calculate_progress(config)
|
||||
else:
|
||||
sys.exit("Unknown mode: " + args.mode)
|
||||
|
|
|
@ -195,7 +195,7 @@ class daB_OB_HIO_c {
|
|||
public:
|
||||
public:
|
||||
/* 8061056C */ daB_OB_HIO_c();
|
||||
/* 8061A808 */ virtual ~daB_OB_HIO_c();
|
||||
/* 8061A808 */ virtual ~daB_OB_HIO_c() {}
|
||||
|
||||
/* 0x04 */ s8 field_0x04;
|
||||
/* 0x08 */ f32 mCoreSize;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
class daB_OH_HIO_c {
|
||||
public:
|
||||
/* 8061B72C */ daB_OH_HIO_c();
|
||||
/* 8061D93C */ virtual ~daB_OH_HIO_c(); // supposed to be inlined
|
||||
/* 8061D93C */ virtual ~daB_OH_HIO_c() {} // supposed to be inlined
|
||||
|
||||
/* 0x4 */ s8 field_0x4;
|
||||
/* 0x8 */ f32 mModelSize;
|
||||
|
|
|
@ -1101,7 +1101,7 @@ public:
|
|||
/* 80155BE8 */ virtual void setMotionAnm(int i_idx, f32 i_morf);
|
||||
/* 80155BEC */ virtual void setMotion(int i_motion, f32 i_morf, int i_restart);
|
||||
/* 80155BD0 */ virtual BOOL drawDbgInfo();
|
||||
/* 80155BCC */ virtual void drawOtherMdls();
|
||||
/* 80155BCC */ virtual void drawOtherMdls() {}
|
||||
|
||||
BOOL chkActorInSpeakArea(fopAc_ac_c* i_actorCheck, fopAc_ac_c* i_actorArea) {
|
||||
return chkActorInAttnArea(i_actorCheck, i_actorArea, attention_info.distances[fopAc_attn_SPEAK_e]);
|
||||
|
|
|
@ -22,7 +22,7 @@ enum AnmNum {
|
|||
|
||||
struct daNpcCd2_HIO_Jnt_c : public JORReflexible {
|
||||
/* 8015A6E8 */ virtual ~daNpcCd2_HIO_Jnt_c() {}
|
||||
/* 8015A788 */ daNpcCd2_HIO_Jnt_c();
|
||||
/* 8015A788 */ daNpcCd2_HIO_Jnt_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
|
@ -32,7 +32,7 @@ struct daNpcCd2_HIO_Jnt_c : public JORReflexible {
|
|||
|
||||
struct daNpcCd2_HIO_MChild_c {
|
||||
/* 8015A798 */ virtual ~daNpcCd2_HIO_MChild_c() {}
|
||||
/* 8015A808 */ daNpcCd2_HIO_MChild_c();
|
||||
/* 8015A808 */ daNpcCd2_HIO_MChild_c() {}
|
||||
|
||||
/* 0x004 */ daNpcCd2_HIO_Jnt_c field_0x004[19];
|
||||
/* 0x1CE */ s16 mMaxLmtY_BACKBONE;
|
||||
|
@ -61,7 +61,7 @@ struct daNpcCd2_HIO_MChild_c {
|
|||
|
||||
struct daNpcCd2_HIO_WChild_c {
|
||||
/* 8015A678 */ virtual ~daNpcCd2_HIO_WChild_c() {}
|
||||
/* 8015A730 */ daNpcCd2_HIO_WChild_c();
|
||||
/* 8015A730 */ daNpcCd2_HIO_WChild_c() {}
|
||||
|
||||
/* 0x004 */ daNpcCd2_HIO_Jnt_c field_0x004[21];
|
||||
/* 0x1FE */ s16 mMaxLmtY_BACKBONE;
|
||||
|
|
|
@ -336,8 +336,3 @@ int JAISeMgr::getNumActiveSe() const {
|
|||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
u8 data_80451310[8];
|
||||
|
||||
/* 80451318-80451320 000818 0008+00 0/0 7/7 0/0 .sbss None */
|
||||
u8 data_80451318[8];
|
||||
|
|
|
@ -52,9 +52,3 @@ void JASReport(const char * str, ...) {
|
|||
sLineCount++;
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80451230-80451238 -00001 0008+00 0/0 6/6 0/0 .sbss None */
|
||||
/* 80451230 0001+00 data_80451230 None */
|
||||
/* 80451231 0007+00 data_80451231 None */
|
||||
u8 struct_80451230[8];
|
|
@ -58,31 +58,31 @@ BOOL daAlink_c::getE3Zhint() {
|
|||
}
|
||||
|
||||
/* 80452C50-80452C58 001250 0005+03 2/2 0/0 0/0 .sdata2 l_wArcName */
|
||||
static const char l_wArcName[8] = "Wmdl";
|
||||
static const char l_wArcName[] = "Wmdl";
|
||||
|
||||
/* 80452C58-80452C60 001258 0005+03 2/2 0/0 0/0 .sdata2 l_bArcName */
|
||||
static const char l_bArcName[8] = "Bmdl";
|
||||
static const char l_bArcName[] = "Bmdl";
|
||||
|
||||
/* 80452C60-80452C68 001260 0005+03 2/2 0/0 0/0 .sdata2 l_kArcName */
|
||||
static const char l_kArcName[8] = "Kmdl";
|
||||
static const char l_kArcName[] = "Kmdl";
|
||||
|
||||
/* 80452C68-80452C70 001268 0005+03 2/2 0/0 0/0 .sdata2 l_zArcName */
|
||||
static const char l_zArcName[8] = "Zmdl";
|
||||
static const char l_zArcName[] = "Zmdl";
|
||||
|
||||
/* 80452C70-80452C78 001270 0005+03 3/3 0/0 0/0 .sdata2 l_mArcName */
|
||||
static const char l_mArcName[8] = "Mmdl";
|
||||
static const char l_mArcName[] = "Mmdl";
|
||||
|
||||
/* 80452C78-80452C80 001278 0006+02 1/1 0/0 0/0 .sdata2 l_hyShdArcName */
|
||||
static const char l_hyShdArcName[8] = "HyShd";
|
||||
static const char l_hyShdArcName[] = "HyShd";
|
||||
|
||||
/* 80452C80-80452C88 001280 0006+02 1/1 0/0 0/0 .sdata2 l_cWShdArcName */
|
||||
static const char l_cWShdArcName[8] = "CWShd";
|
||||
static const char l_cWShdArcName[] = "CWShd";
|
||||
|
||||
/* 80452C88-80452C90 001288 0006+02 1/1 0/0 0/0 .sdata2 l_sWShdArcName */
|
||||
static const char l_sWShdArcName[8] = "SWShd";
|
||||
static const char l_sWShdArcName[] = "SWShd";
|
||||
|
||||
/* 80452C90-80452C98 001290 0006+02 7/7 0/0 0/0 .sdata2 l_arcName */
|
||||
static const char l_arcName[8] = "Alink";
|
||||
static const char l_arcName[] = "Alink";
|
||||
|
||||
/* 8009D884-8009D88C 0981C4 0008+00 0/0 0/0 13/13 .text getAlinkArcName__9daAlink_cFv */
|
||||
const char* daAlink_c::getAlinkArcName() {
|
||||
|
|
|
@ -1526,7 +1526,7 @@ static int fish_normal(b_ob_class* i_this) {
|
|||
i_this->field_0x47b4 = 0;
|
||||
} else {
|
||||
i_this->mTargetMovePos.x = a_this->home.pos.x + cM_rndFX(2000.0f);
|
||||
i_this->mTargetMovePos.y = a_this->home.pos.y + 1000.0f + cM_rndFX(2000.0f);
|
||||
i_this->mTargetMovePos.y = a_this->home.pos.y + 1000.0f + cM_rndF(2000.0f);
|
||||
i_this->mTargetMovePos.z = a_this->home.pos.z + cM_rndFX(2000.0f);
|
||||
i_this->mTimers[0] = cM_rndF(30.0f) + 30.0f;
|
||||
}
|
||||
|
|
|
@ -5198,11 +5198,6 @@ void daNpcF_c::setParam() {
|
|||
/* empty function */
|
||||
}
|
||||
|
||||
/* 80155BCC-80155BD0 15050C 0004+00 2/0 0/0 0/0 .text drawOtherMdls__8daNpcF_cFv */
|
||||
void daNpcF_c::drawOtherMdls() {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
/* 80155BD0-80155BD8 150510 0008+00 2/0 0/0 0/0 .text drawDbgInfo__8daNpcF_cFv */
|
||||
BOOL daNpcF_c::drawDbgInfo() {
|
||||
return true;
|
||||
|
|
|
@ -25,9 +25,6 @@ extern "C" void checkPlayerGet__8daItem_cFv();
|
|||
// External References:
|
||||
//
|
||||
|
||||
// cLib_calcTimer<u8>
|
||||
extern "C" u8 func_80141AE8(u8*);
|
||||
|
||||
extern "C" extern void* __vt__16Z2SoundObjSimple[8];
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__14Z2SoundObjBaseFv();
|
||||
|
@ -546,7 +543,7 @@ void daItem_c::procWaitGetDemoEvent() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (func_80141AE8(&field_0x9c1) == 0 || checkItemGet(m_itemNo, 1)) {
|
||||
if (cLib_calcTimer<u8>(&field_0x9c1) == 0 || checkItemGet(m_itemNo, 1)) {
|
||||
if (fopAcM_delete(m_item_id)) {
|
||||
// "Item: Get Item deleted because Get Demo was canceled\n"
|
||||
OS_REPORT("アイテム:ゲットデモ中止されたので、ゲットアイテム削除しました\n");
|
||||
|
@ -645,7 +642,7 @@ void daItem_c::procMainSwOnWait() {
|
|||
OS_REPORT("水面より下で発生wtr<%.2f>my<%.2f>\n", mAcch.m_wtr.GetHeight(), home.pos.y);
|
||||
}
|
||||
|
||||
if (func_80141AE8(&mSwOnWaitTimer) == 0) {
|
||||
if (cLib_calcTimer<u8>(&mSwOnWaitTimer) == 0) {
|
||||
show();
|
||||
procInitNormal();
|
||||
}
|
||||
|
@ -1153,7 +1150,7 @@ int daItem_c::CountTimer() {
|
|||
}
|
||||
}
|
||||
|
||||
func_80141AE8(&mBoomWindTgTimer);
|
||||
cLib_calcTimer<u8>(&mBoomWindTgTimer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ static int useHeapInit(fopAc_ac_c* a_this) {
|
|||
for (int i = 0; i < i_this->field_0xad98; i++) {
|
||||
f32* mSize = i_this->field_0xad7c.getSize(i);
|
||||
for (int j = 0; j < 3; j++) {
|
||||
*mSize = 0.1f + 1.3f;
|
||||
*mSize = 1.3f;
|
||||
mSize++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -631,7 +631,7 @@ void daMagLiftRot_c::init_modeMove() {
|
|||
void daMagLiftRot_c::modeMove() {
|
||||
cLib_chaseF(&speedF, l_HIO.mMaxSpeed, l_HIO.mAcceleration);
|
||||
|
||||
if (cLib_addCalcAngleS(¤t.angle.z, field_0x5e2, 1, fopAcM_GetSpeedF(this) * 182.0444f,
|
||||
if (cLib_addCalcAngleS(¤t.angle.z, field_0x5e2, 1, fopAcM_GetSpeedF(this) * 182.04445f,
|
||||
1) == 0)
|
||||
{
|
||||
field_0x5e2 += 0x8000;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4278,3 +4278,6 @@ void dFile_select3D_c::toItem3Dpos(f32 param_0, f32 param_1, f32 param_2, cXyz*
|
|||
void dFile_select3D_c::calcViewMtx(Mtx param_0) {
|
||||
cMtx_lookAt(param_0, &cXyz(0.0f, 0.0f, -1000.0f), &cXyz::Zero, &cXyz(0.0f, 1.0f, 0.0f), 0);
|
||||
}
|
||||
|
||||
// Fakematch, should be defined in header but it gets put in the wrong TU
|
||||
void J2DAnmTransform::getTransform(u16, J3DTransformInfo*) const {}
|
||||
|
|
|
@ -3057,9 +3057,9 @@ void dScnKy_env_light_c::settingTevStruct_plightcol_plus(cXyz* pos_p, dKy_tevstr
|
|||
{
|
||||
cLib_addCalc(&tevstr_p->field_0x344, 0.0f, 0.75f, 0.21f, 0.0001f);
|
||||
} else if (tevstr_p->Type == 9 && player->getSinkShapeOffset() < -35.0f) {
|
||||
cLib_addCalc(&tevstr_p->field_0x344, 0.0f, 0.1f, 0.001f, 0.00001f);
|
||||
cLib_addCalc(&tevstr_p->field_0x344, 0.0f, 0.1f, 0.01f, 0.00001f);
|
||||
} else if (tevstr_p->Type == 10 && player->getSinkShapeOffset() < -100.0f) {
|
||||
cLib_addCalc(&tevstr_p->field_0x344, 0.0f, 0.1f, 0.001f, 0.00001f);
|
||||
cLib_addCalc(&tevstr_p->field_0x344, 0.0f, 0.1f, 0.01f, 0.00001f);
|
||||
} else if (init_timer != 0) {
|
||||
tevstr_p->field_0x344 = kankyo->field_0x1238 +
|
||||
(var_f31 * (kankyo->field_0x123c - kankyo->field_0x1238));
|
||||
|
@ -5001,7 +5001,7 @@ void dKy_fog_startendz_set(f32 param_0, f32 param_1, f32 ratio) {
|
|||
ratio = 0.0f;
|
||||
}
|
||||
|
||||
if (ratio < 0.0000000000001f) {
|
||||
if (ratio < 0.0001f) {
|
||||
ratio = 0.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -4237,7 +4237,7 @@ void dKyr_drawStar(Mtx drawMtx, u8** tex) {
|
|||
temp_f29 *= temp_f29 * temp_f29;
|
||||
var_f28 += 1.0f + (3.0f * temp_f29);
|
||||
if (var_f28 > 200.0f) {
|
||||
var_f28 = 20.0f * (i / 2800.0f);
|
||||
var_f28 = 20.0f * (i / 1200.0f);
|
||||
}
|
||||
|
||||
static const GXColor star_col[] = {
|
||||
|
|
|
@ -4,7 +4,7 @@ from argparse import ArgumentParser
|
|||
import os
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
from typing import Optional, Tuple
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_dir = os.path.abspath(os.path.join(script_dir, ".."))
|
||||
|
@ -22,10 +22,16 @@ FUNCTION_KEYS_TO_DIFF = [
|
|||
"fuzzy_match_percent",
|
||||
]
|
||||
|
||||
type Change = Tuple[str, str, float, float]
|
||||
Change = Tuple[str, str, float, float]
|
||||
|
||||
|
||||
def get_changes(changes_file: str) -> list[Change]:
|
||||
def format_float(value: float) -> str:
|
||||
if value < 100.0 and value > 99.99:
|
||||
value = 99.99
|
||||
return "%6.2f" % value
|
||||
|
||||
|
||||
def get_changes(changes_file: str) -> Tuple[list[Change], list[Change]]:
|
||||
changes_file = os.path.relpath(changes_file, root_dir)
|
||||
with open(changes_file, "r") as f:
|
||||
changes_json = json.load(f)
|
||||
|
@ -33,7 +39,7 @@ def get_changes(changes_file: str) -> list[Change]:
|
|||
regressions = []
|
||||
progressions = []
|
||||
|
||||
def diff_key(object_name: str, object: dict, key: str):
|
||||
def diff_key(object_name: Optional[str], object: dict, key: str):
|
||||
from_value = object.get("from", {}).get(key, 0.0)
|
||||
to_value = object.get("to", {}).get(key, 0.0)
|
||||
key = key.removesuffix("_percent")
|
||||
|
@ -77,7 +83,7 @@ def generate_changes_plaintext(changes: list[Change]) -> str:
|
|||
if len(name) > name_max_len:
|
||||
name = name[: name_max_len - len("[...]")] + "[...]"
|
||||
out_lines.append(
|
||||
f"{name:>{name_max_len}} | {key:<{key_max_len}} | {from_value:6.2f}% -> {to_value:5.2f}%"
|
||||
f"{name:>{name_max_len}} | {key:<{key_max_len}} | {format_float(from_value)}% -> {format_float(to_value)}%"
|
||||
)
|
||||
|
||||
return "\n".join(out_lines)
|
||||
|
@ -106,7 +112,9 @@ def generate_changes_markdown(changes: list[Change], description: str) -> str:
|
|||
name = name[: name_max_len - len("...")] + "..."
|
||||
name = f"`{name}`" # Surround with backticks
|
||||
key = key.replace("_", " ").capitalize()
|
||||
out_lines.append(f"| {name} | {key} | {from_value:.2f}% | {to_value:.2f}% |")
|
||||
out_lines.append(
|
||||
f"| {name} | {key} | {format_float(from_value)}% | {format_float(to_value)}% |"
|
||||
)
|
||||
|
||||
out_lines.append("</details>")
|
||||
|
||||
|
|
|
@ -196,9 +196,8 @@ class ProjectConfig:
|
|||
None # Callback to add/remove/reorder units within a module
|
||||
)
|
||||
|
||||
# Progress output, progress.json and report.json config
|
||||
# Progress output and report.json config
|
||||
self.progress = True # Enable report.json generation and CLI progress output
|
||||
self.progress_all: bool = True # Include combined "all" category
|
||||
self.progress_modules: bool = True # Include combined "modules" category
|
||||
self.progress_each_module: bool = (
|
||||
False # Include individual modules, disable for large numbers of modules
|
||||
|
@ -207,6 +206,9 @@ class ProjectConfig:
|
|||
self.print_progress_categories: Union[bool, List[str]] = (
|
||||
True # Print additional progress categories in the CLI progress output
|
||||
)
|
||||
self.progress_report_args: Optional[List[str]] = (
|
||||
None # Flags to `objdiff-cli report generate`
|
||||
)
|
||||
|
||||
# Progress fancy printing
|
||||
self.progress_use_fancy: bool = False
|
||||
|
@ -423,6 +425,7 @@ def generate_build_ninja(
|
|||
if config.linker_version is None:
|
||||
sys.exit("ProjectConfig.linker_version missing")
|
||||
n.variable("mw_version", Path(config.linker_version))
|
||||
n.variable("objdiff_report_args", make_flags_str(config.progress_report_args))
|
||||
n.newline()
|
||||
|
||||
###
|
||||
|
@ -431,7 +434,6 @@ def generate_build_ninja(
|
|||
n.comment("Tooling")
|
||||
|
||||
build_path = config.out_path()
|
||||
progress_path = build_path / "progress.json"
|
||||
report_path = build_path / "report.json"
|
||||
build_tools_path = config.build_dir / "tools"
|
||||
download_tool = config.tools_dir / "download_tool.py"
|
||||
|
@ -1188,7 +1190,7 @@ def generate_build_ninja(
|
|||
description="PROGRESS",
|
||||
)
|
||||
n.build(
|
||||
outputs=progress_path,
|
||||
outputs="progress",
|
||||
rule="progress",
|
||||
implicit=[
|
||||
ok_path,
|
||||
|
@ -1205,7 +1207,7 @@ def generate_build_ninja(
|
|||
n.comment("Generate progress report")
|
||||
n.rule(
|
||||
name="report",
|
||||
command=f"{objdiff} report generate -o $out",
|
||||
command=f"{objdiff} report generate $objdiff_report_args -o $out",
|
||||
description="REPORT",
|
||||
)
|
||||
n.build(
|
||||
|
@ -1385,7 +1387,7 @@ def generate_build_ninja(
|
|||
if config.non_matching:
|
||||
n.default(link_outputs)
|
||||
elif config.progress:
|
||||
n.default(progress_path)
|
||||
n.default("progress")
|
||||
else:
|
||||
n.default(ok_path)
|
||||
else:
|
||||
|
@ -1437,6 +1439,7 @@ def generate_objdiff_config(
|
|||
COMPILER_MAP = {
|
||||
"GC/1.0": "mwcc_233_144",
|
||||
"GC/1.1": "mwcc_233_159",
|
||||
"GC/1.1p1": "mwcc_233_159p1",
|
||||
"GC/1.2.5": "mwcc_233_163",
|
||||
"GC/1.2.5e": "mwcc_233_163e",
|
||||
"GC/1.2.5n": "mwcc_233_163n",
|
||||
|
@ -1825,7 +1828,7 @@ def generate_compile_commands(
|
|||
json.dump(clangd_config, w, indent=2, default=default_format)
|
||||
|
||||
|
||||
# Calculate, print and write progress to progress.json
|
||||
# Print progress information from objdiff report
|
||||
def calculate_progress(config: ProjectConfig) -> None:
|
||||
config.validate()
|
||||
out_path = config.out_path()
|
||||
|
@ -1917,35 +1920,3 @@ def calculate_progress(config: ProjectConfig) -> None:
|
|||
if summary_file:
|
||||
summary_file.write("```\n")
|
||||
summary_file.close()
|
||||
|
||||
# Generate and write progress.json
|
||||
progress_json: Dict[str, Any] = {}
|
||||
|
||||
def add_category(id: str, measures: Dict[str, Any]) -> None:
|
||||
progress_json[id] = {
|
||||
"code": measures.get("complete_code", 0),
|
||||
"code/total": measures.get("total_code", 0),
|
||||
"data": measures.get("complete_data", 0),
|
||||
"data/total": measures.get("total_data", 0),
|
||||
"matched_code": measures.get("matched_code", 0),
|
||||
"matched_code/total": measures.get("total_code", 0),
|
||||
"matched_data": measures.get("matched_data", 0),
|
||||
"matched_data/total": measures.get("total_data", 0),
|
||||
"matched_functions": measures.get("matched_functions", 0),
|
||||
"matched_functions/total": measures.get("total_functions", 0),
|
||||
"fuzzy_match": int(measures.get("fuzzy_match_percent", 0) * 100),
|
||||
"fuzzy_match/total": 10000,
|
||||
"units": measures.get("complete_units", 0),
|
||||
"units/total": measures.get("total_units", 0),
|
||||
}
|
||||
|
||||
if config.progress_all:
|
||||
add_category("all", report_data["measures"])
|
||||
else:
|
||||
# Support for old behavior where "dol" was the main category
|
||||
add_category("dol", report_data["measures"])
|
||||
for category in report_data.get("categories", []):
|
||||
add_category(category["id"], category["measures"])
|
||||
|
||||
with open(out_path / "progress.json", "w", encoding="utf-8") as w:
|
||||
json.dump(progress_json, w, indent=2)
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
###
|
||||
# Uploads progress information to https://github.com/decompals/frogress.
|
||||
#
|
||||
# Usage:
|
||||
# python3 tools/upload_progress.py -b https://progress.decomp.club/ -p [project] -v [version] build/[version]/progress.json
|
||||
#
|
||||
# If changes are made, please submit a PR to
|
||||
# https://github.com/encounter/dtk-template
|
||||
###
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def get_git_commit_timestamp() -> int:
|
||||
return int(
|
||||
subprocess.check_output(["git", "show", "-s", "--format=%ct"])
|
||||
.decode("ascii")
|
||||
.rstrip()
|
||||
)
|
||||
|
||||
|
||||
def get_git_commit_sha() -> str:
|
||||
return subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip()
|
||||
|
||||
|
||||
def generate_url(args: argparse.Namespace) -> str:
|
||||
url_components = [args.base_url.rstrip("/"), "data"]
|
||||
|
||||
for arg in [args.project, args.version]:
|
||||
if arg != "":
|
||||
url_components.append(arg)
|
||||
|
||||
return str.join("/", url_components) + "/"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Upload progress information.")
|
||||
parser.add_argument("-b", "--base_url", help="API base URL", required=True)
|
||||
parser.add_argument("-a", "--api_key", help="API key (env var PROGRESS_API_KEY)")
|
||||
parser.add_argument("-p", "--project", help="Project slug", required=True)
|
||||
parser.add_argument("-v", "--version", help="Version slug", required=True)
|
||||
parser.add_argument("input", help="Progress JSON input")
|
||||
|
||||
args = parser.parse_args()
|
||||
api_key = args.api_key or os.environ.get("PROGRESS_API_KEY")
|
||||
if not api_key:
|
||||
raise KeyError("API key required")
|
||||
url = generate_url(args)
|
||||
|
||||
entries = []
|
||||
with open(args.input, "r") as f:
|
||||
data = json.load(f)
|
||||
entries.append(
|
||||
{
|
||||
"timestamp": get_git_commit_timestamp(),
|
||||
"git_hash": get_git_commit_sha(),
|
||||
"categories": data,
|
||||
}
|
||||
)
|
||||
|
||||
print("Publishing entry to", url)
|
||||
json.dump(entries[0], sys.stdout, indent=4)
|
||||
print()
|
||||
r = requests.post(
|
||||
url,
|
||||
json={
|
||||
"api_key": api_key,
|
||||
"entries": entries,
|
||||
},
|
||||
)
|
||||
r.raise_for_status()
|
||||
print("Done!")
|
Loading…
Reference in New Issue