You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original game does not properly support loading unique assets of more than 2 factions. CnCNet ts-patches / DTA has many hacks related to fixing this:
; Set global variable byte containing side ID to load files for
@SET 0x004E2CFA, {mov byte [0x7E2500], al}
@SET 0x004E2CFF, nop
@SET 0x004E2D00, {add esp, 4}
@SJMP 0x004E2D03, 0x004E2D13 ; jmp short
@SET 0x004E2D05, nop
; Load sidebar MIX files for new sides properly (for saved games)
@SET 0x005D6C4F, {mov cl, [eax+1D91h]}
@CLEAR 0x005D6C55, 0x90, 0x005D6C58
; Load speech MIX files for new sides properly (for saved games)
@SJMP 0x005D6DB8, 0x005D6DCE ;jmp short
@SET 0x005D6DCE, {xor ecx, ecx}
@SET 0x005D6DD0, {mov cl, [eax+1D91h]}
@CLEAR 0x005D6DD6, 0x90, 0x005D6DDB
; Load sidebar MIX files for new sides properly
@SET 0x005DD798, {mov cl, byte [0x007E2500]}
@CLEAR 0x005DD79E, 0x90, 0x005DD7A2
; Load speech MIX files for new sides properly
@SET 0x005DD822, {xor ecx, ecx}
@CLEAR 0x005DD822, 0x90, 0x005DD828
@SET 0x005DD82B, {mov cl, byte [0x007E2500]} ; Compile warning: byte value exceeds bounds?
; Sidebar hack for mods which add new sides and new sidebars for them
; this will not fuck invert al which is needed for normal TS sidebar loading
; as GDI needs 1 and Nod 0 for sidebar (which is the opposite of their side index)
SpawnINI_Get_Bool str_Settings, str_SidebarHack, 0
cmp al, 1
pop eax
jz .Sidebar_Hack
; Invert AL to set byte related to what sidebar and speech graphics to load
cmp al, 1
jz .Set_AL_To_Zero
mov al, 1
jmp .Past_AL_Invert
.Set_AL_To_Zero:
mov al, 0
.Past_AL_Invert:
.Sidebar_Hack:
mov byte [0x7E2500], al ; For side specific mix files loading and stuff, without sidebar and speech hack
mov ebx, [ScenarioStuff]
mov byte [ebx+1D91h], al
SpawnINI_Get_Int str_Settings, str_Color, 0
mov dword [esi+0x39], eax ; color
mov dword [PlayerColor], eax
mov dword [esi+0x41], -1
mov [TempPtr], esi
lea eax, [TempPtr]
push eax
mov ecx, NameNodeVector
call NameNodeVector_Add
mov esp,ebp
pop ebp
retn
The text was updated successfully, but these errors were encountered:
Description:
The original game does not properly support loading unique assets of more than 2 factions. CnCNet ts-patches / DTA has many hacks related to fixing this:
There is also a separate hack in spawner.asm (https://github.com/CnCNet/ts-patches/blob/master/src/spawner/spawner.asm) starting from line 1419 onwards, supposedly GDI needs a value to be 1 in the original game while Nod needs it to be 0, which is the opposite of their side indexes:
The text was updated successfully, but these errors were encountered: