Skip to content

Commit

Permalink
Finalize bin-base for 1.12f and 1.30 fix
Browse files Browse the repository at this point in the history
The remaining part is the animations for 1.30 fix
  • Loading branch information
szapp committed Jul 30, 2023
1 parent 088d5fc commit 92d3c36
Show file tree
Hide file tree
Showing 36 changed files with 206 additions and 230 deletions.
59 changes: 3 additions & 56 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,60 +141,7 @@ BIN_BASE := core \
ow_playerInfoName3 \
ow_playerInfoName4 \
ow_playerInfoName5
BIN_BASE_G112 := core \
hook_createVdfArray \
hook_deploy_ani_ninja \
hook_deploy_camera_ninja \
hook_deploy_content_ninja \
hook_deploy_fightai_ninja \
hook_deploy_menu_ninja \
hook_deploy_music_ninja \
hook_deploy_ou_ninja \
hook_deploy_pfx_ninja \
hook_deploy_sfx_ninja \
hook_deploy_vfx_ninja \
hook_init_menu \
hook_init_content \
hook_linkerReplaceFunc \
hook_parserDeclareClass \
hook_parserDeclareFunc \
hook_parserDeclarePrototype \
hook_parserDeclareVar \
hook_parserDeclareVar_constInt \
hook_parserDeclareVar_constString \
hook_parserParseSource \
hook_zCPar_Symbol__GetNext \
ow_parserDeclareClass_showOverwrite \
ow_parserDeclareFunc_showOverwrite \
ow_parserDeclarePrototype_showOverwrite \
ow_parserDeclareVar_showOverwrite
BIN_BASE_G130 := core \
hook_createVdfArray \
hook_deploy_ani_ninja \
hook_deploy_camera_ninja \
hook_deploy_content_ninja \
hook_deploy_fightai_ninja \
hook_deploy_menu_ninja \
hook_deploy_music_ninja \
hook_deploy_ou_ninja \
hook_deploy_pfx_ninja \
hook_deploy_sfx_ninja \
hook_deploy_vfx_ninja \
hook_init_menu \
hook_init_content \
hook_linkerReplaceFunc \
hook_parserDeclareClass \
hook_parserDeclareFunc \
hook_parserDeclarePrototype \
hook_parserDeclareVar \
hook_parserDeclareVar_constInt \
hook_parserDeclareVar_constString \
hook_parserParseSource \
hook_zCPar_Symbol__GetNext \
ow_parserDeclareClass_showOverwrite \
ow_parserDeclareFunc_showOverwrite \
ow_parserDeclarePrototype_showOverwrite \
ow_parserDeclareVar_showOverwrite
BIN_BASE_G130 := ow_zCParser__LoadGlobalVars
BIN_BASE_G2 := ow_zCParser__LoadGlobalVars \
skip_writeAniBinFile_ModelTag \
skip_writeAniBinFile_ReadMeshAndTree \
Expand Down Expand Up @@ -235,8 +182,8 @@ DATA_BASE := symbols \
messages

BINARIES_G1 := $(BIN_BASE:%=$(BINDIR)%_g1)
BINARIES_G112 := $(BIN_BASE_G112:%=$(BINDIR)%_g112)
BINARIES_G130 := $(BIN_BASE_G130:%=$(BINDIR)%_g130)
BINARIES_G112 := $(BIN_BASE:%=$(BINDIR)%_g112)
BINARIES_G130 := $(BIN_BASE:%=$(BINDIR)%_g130) $(BIN_BASE_G130:%=$(BINDIR)%_g130) # $(BIN_BASE_G2:%=$(BINDIR)%_g130)
BINARIES_G2 := $(BIN_BASE:%=$(BINDIR)%_g2) $(BIN_BASE_G2:%=$(BINDIR)%_g2)
FUNC := $(FUNC_BASE:%=$(FUNCDIR)%$(ASMEXT))
EXEC := $(EXEC_BASE:%=$(EXECDIR)%$(ASMEXT))
Expand Down
2 changes: 0 additions & 2 deletions src/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ section .text
%include "exec/deploy.asm"
%include "exec/init.asm"
%include "exec/parse.asm"
%if GOTHIC_BASE_VERSION != 112 && GOTHIC_BASE_VERSION != 130
%include "exec/misc.asm"
%endif

%include "func/freeVdfArray.asm"
%include "func/dispatch.asm"
Expand Down
2 changes: 1 addition & 1 deletion src/exec/createVdfArray.asm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ createVdfArray:
add esp, 0x14

%if GOTHIC_BASE_VERSION == 1 || GOTHIC_BASE_VERSION == 2
mov al, [SystemPack_version_info+g1g2(0xD,0x0,0x0,0xB)] ; Check for old Ninja system
mov al, [SystemPack_version_info+g1g2(0xD,,,0xB)] ; Check for old Ninja system
cmp al, 'N'
jnz .checkScripts

Expand Down
16 changes: 8 additions & 8 deletions src/exec/deploy.asm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ deploy_vfx_ninja:

; Jump back
%if GOTHIC_BASE_VERSION == 1 || GOTHIC_BASE_VERSION == 130 || GOTHIC_BASE_VERSION == 2
lea g1g2(edx,0x0,eax,eax), [esp+stackoffset+g1g2(-0x239,0x0,-0x226,-0x235)]
lea g1g2(edx,,eax,eax), [esp+stackoffset+g1g2(-0x239,,-0x226,-0x235)]
%elif GOTHIC_BASE_VERSION == 112
mov [esp+stackoffset-0x21C], cl
%endif
Expand Down Expand Up @@ -171,9 +171,9 @@ deploy_ani_ninja:

%if GOTHIC_BASE_VERSION == 1 || GOTHIC_BASE_VERSION == 112

resetStackoffset g1g2(0xF54,0xFD8,0x0,0x0)
resetStackoffset g1g2(0xF54,0xFD8,,)
pusha
mov ebp, [esp+stackoffset-g1g2(0xF24,0xFA8,0,0x0)] ; zCModelPrototype *
mov ebp, [esp+stackoffset-g1g2(0xF24,0xFA8,,)] ; zCModelPrototype *
mov esi, [ebp+0x14] ; name->ptr
push esi
mov esi, DWORD [zFILE_cur_mds_file]
Expand All @@ -182,7 +182,7 @@ deploy_ani_ninja:
call DWORD [ds_lstrcmpiA]
addStack 2*4
test eax, eax
verifyStackoffset g1g2(0xF54,0xFD8,0x0,0x0)+32 ; Base + pusha
verifyStackoffset g1g2(0xF54,0xFD8,,)+32 ; Base + pusha
jnz .back
sub esp, 0x120
mov eax, esp
Expand All @@ -203,9 +203,9 @@ deploy_ani_ninja:

.back:
popa
verifyStackoffset g1g2(0xF54,0xFD8,0x0,0x0)
cmp [esp+stackoffset-g1g2(0xE88,0xF20,0x0,0x0)], ebp
jmp g1g2(0x57DC40,0x598474,0x0,0x0)+7
verifyStackoffset g1g2(0xF54,0xFD8,,)
cmp [esp+stackoffset-g1g2(0xE88,0xF20,,)], ebp
jmp g1g2(0x57DC40,0x598474,,)+7

%elif GOTHIC_BASE_VERSION == 130 || GOTHIC_BASE_VERSION == 2

Expand Down Expand Up @@ -233,6 +233,6 @@ deploy_ani_ninja:

; Jump back
mov eax, [esp+stackoffset-0x3E0]
jmp g1g2(0x0,0x0,0x590C6D,0x5961CD)+7
jmp g1g2(,,0x590C6D,0x5961CD)+7

%endif

0 comments on commit 92d3c36

Please sign in to comment.