diff --git a/Makefile b/Makefile index b028457..29a7c3a 100644 --- a/Makefile +++ b/Makefile @@ -221,11 +221,22 @@ OBJS += src/minimum_burst.o OBJS += src/mouse_always_in_focus.o OBJS += src/mouse_behavior.o -# Only include in: MOD_TO MOD_RUBICON MOD_FD MOD_TM TSCLIENT -ifneq ($(call ifdef_any_of,MOD_TO MOD_RUBICON MOD_FD MOD_TM TSCLIENT),) +# Team number position. +# Only include in: MOD_TO MOD_RUBICON MOD_FD MOD_TM +ifneq ($(call ifdef_any_of,MOD_TO MOD_RUBICON MOD_FD MOD_TM),) OBJS += src/move_team_group_number.o endif +# TI Team number position. +ifdef MOD_TI +OBJS += src/team_number_position.o +endif + +# TSCLIENT Team number position. +ifdef TSCLIENT +OBJS += src/team_number_position_tsc.o +endif + OBJS += src/multi_engineer_ignore_neutral.o OBJS += src/multiplayer_ai_base_nodes.o OBJS += src/multiplayer_movies.o @@ -315,11 +326,6 @@ OBJS += src/ingame_ui_text_color.o OBJS += src/remove_ion_storm_effects.o endif -# TI only sources. -ifdef MOD_TI -OBJS += src/team_number_position.o -endif - # TO only sources. ifdef MOD_TO #OBJS += diff --git a/src/team_number_position_tsc.asm b/src/team_number_position_tsc.asm new file mode 100644 index 0000000..2701571 --- /dev/null +++ b/src/team_number_position_tsc.asm @@ -0,0 +1,27 @@ +%include "TiberianSun.inc" +%include "macros/patch.inc" + +; Team/group number display on units and buildings is repositioned to avoid overlapping with pips. +; Y axis can be changed separately when the units/buildings have pips of ammo/passengers/storage etc. + +; Credits: E1 Elite, Tuc0 + +; X axis, Original 0x04. On right side 0xEC, Fix 0x07 +@SET 0x00637D27, {sub ecx, byte 0x07} + +; Y axis when there is pips, Original -5 (0xFFFFFFFB), On top 0xFFFFFFE2, Fix 0xFFFFFFF4 +@SET 0x00637CE3, {mov ebx, 0xFFFFFFF4} + +; Y axis when there is no pips, Original -1 (0xFFFFFFFF), On top 0xFFFFFFE2, Fix 0xFFFFFFFC +hack 0x00637CCA, 0x00637CCF + mov ecx, esi + mov ebx, 0xFFFFFFFC + jmp hackend + +; Font Original 0x49 - last digit is for font type/size like 8 or 9 +; @SET 0x00637D1F, {push byte 0x48} + +; Color Original 0x00 LightGold. Rules.ini [Colors] 0-based index * 2, also +1. +; NeonGreen = 37 * 2 = 0x4A, also 0x4B. DarkOrange = 0x1C or 0x1D. +; @SET 0x00637D1B, {push byte 0x1D} +