Skip to content

Commit

Permalink
Fix remaining issues on port
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Aug 8, 2023
1 parent 6122ac8 commit 269f60f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/exec/init.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ init_menu:
resetStackoffset g1g2(0x34,0x3C,0x34,0x34)
call zCArraySort_zCMenu___InsertSort ; Overwritten
pusha
%if GOTHIC_BASE_VERSION == 112
mov ebp, ebx
%endif
push ninja_initMenu
push char_src
push NINJA_PATH_CONTENT
Expand Down
2 changes: 1 addition & 1 deletion src/func/dispatch.asm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ ninja_dispatch:
push esi
call DWORD [ds_lstrlenA]
addStack 4
sub eax, 0x7 ; Cut off '_G*.EXT'
sub eax, g1g2(0x7,0x9,0x9,0x7) ; Cut off '_G*.EXT'
mov BYTE [esi+eax], 0x0
push DWORD [esp+stackoffset+arg_2]
push esi
Expand Down
8 changes: 4 additions & 4 deletions src/func/injectMds.asm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ninja_injectMds:
push DWORD [zFILE_cur_mds_file]
mov DWORD [zFILE_cur_mds_file], esi

%if GOTHIC_BASE_VERSION == 2
%if GOTHIC_BASE_VERSION == 130 || GOTHIC_BASE_VERSION == 2
sub esp, 0xC ; Create fake zCFileBIN
mov DWORD [esp], 0xFFFFFFFF ; -1
%endif
Expand Down Expand Up @@ -90,19 +90,19 @@ ninja_injectMds:
addStack 3*4
cmp eax, 0xFFFFFFFF
jz .mds_loop_start
%if GOTHIC_BASE_VERSION == 2
%if GOTHIC_BASE_VERSION == 130 || GOTHIC_BASE_VERSION == 2
mov ecx, esp ; zCFileBIN * (ignored in Gothic 1)
push ecx
%endif
mov ecx, ebp
call zCModelPrototype__ReadModel
%if GOTHIC_BASE_VERSION == 2
%if GOTHIC_BASE_VERSION == 130 || GOTHIC_BASE_VERSION == 2
addStack 4
%endif
jnz .mds_loop_start

.eof:
%if GOTHIC_BASE_VERSION == 2
%if GOTHIC_BASE_VERSION == 130 || GOTHIC_BASE_VERSION == 2
add esp, 0xC
%endif

Expand Down

0 comments on commit 269f60f

Please sign in to comment.