Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed update on team number position. #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 +=
Expand Down
27 changes: 27 additions & 0 deletions src/team_number_position_tsc.asm
Original file line number Diff line number Diff line change
@@ -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}