I have a patch to display the X Y of a system in the F2 screen
here is a short video of how it displays
This patch uses the Literal mod code (alpha-number -> number-number for xy) that was developed for larger maps.
Literal mod is required and is part of this patch.
if the Literal mod is already installed the patch will display red (conflicts) this would be expected.
as always make a backup of your trek.exe before applying this patch.
here is patch for uses with botf patcher NOTE this will not work on current beta version of Galaxy mod
here is code changes
changes in 4F7320 (F2 screen sub)
at 4F73A1 I shifted code 2 bytes to duplicate registry of systinfo (mov edi, eax) so new code would always have system info
at 4F73B3 I removed code for lexicon id ("SYSTEM") and get lexicon terms and added call to new code (call loc_4B6640)
Code: Select all
4F73A1 89 C7 mov edi, eax (get systinfo for new code)
4F73A3 83 C0 08 add eax, 8
4F73A6 89 54 24 10 mov [esp+10h], edx
4F73AA E8 11 43 F9 FF call sub_48B6C0
4F73AF 89 44 24 30 mov [esp+30h], eax
4F73B3 E8 88 F2 FB FF call loc_4B6640 (call new code to display X Y)
4F73B8 90 nop
4F73B9 90 nop
4F73BA 90 nop
This code is basically the same code as 4B64A0 and 4B64D8 but with many changes
first the code for anomaly name was removed.
code was changed to call systinfo instead of stellInfo
I borrowed a wildcard %d.%d from AI diag sub routine (should not be missed)
4B6642 - 4B6660 calculates X Y
4B6662 - 4B6667 pushes calculated info into wildcards
4B6668 wildcard offset
4B666D - 4B6674 moves string into esp for sprintf
4B6675 call sprintf sub section
4B667A mov string from esp to eax to use in F2 screen code
4B6681 resets offset of esp for font
4B6684 - 4B668E resets registries to values before entering sub 4B6640
4B6693 return to F2 sub section to continue with vanilla code for F2 screen
Code: Select all
4B6640 loc_4B6640:
4B6640 89 F9 mov ecx, edi
4B6642 8B 57 78 mov edx, [edi+78h]
4B6645 BB 05 00 00 00 mov ebx, 5
4B664A 89 D0 mov eax, edx
4B664C C1 FA 1F sar edx, 1Fh
4B664F F7 FB idiv ebx
4B6651 8B 77 7C mov esi, [edi+7Ch]
4B6654 89 C3 mov ebx, eax
4B6656 89 F0 mov eax, esi
4B6658 C1 FA 1F sar edx, 1Fh
4B665B BE 05 00 00 00 mov esi, 5
4B6660 F7 FE idiv esi
4B6662 40 inc eax
4B6663 50 push eax
4B6664 83 C3 01 add ebx, 1
4B6667 53 push ebx
4B6668 68 08 81 57 00 push offset aD_D_0 ; "%d.%d"
4B666D 8D 84 24 88 00 00 00 lea eax, [esp+0Ch+arg_78]
4B6674 50 push eax
4B6675 E8 1F D7 05 00 call sprintf_
4B667A 8D 84 24 8C 00 00 00 lea eax, [esp+10h+arg_78]
4B6681 83 C4 10 add esp, 10h
4B6684 BB 1C 00 00 00 mov ebx, 1Ch
4B6689 BA 40 00 00 00 mov edx, 40h
4B668E BE 02 00 00 00 mov esi, 2
4B6693 C3 retn
Code: Select all
578108 25 64 2E 25 64 00 aD_D_0 db '%d.%d',0
If you encounter any issues let me know
enjoy
thunderchero
(original development post)
Hi Everyone,
While playing I was thinking it would be helpful to have the sector location in system screens.
I am hoping it will be possible to change "SYSTEM" to location?
here is what I am looking to do.
change this to this the lexicon "SYSTEM" is called at 4F73B1
and we have documented the sector info here;
viewtopic.php?f=107&t=618&p=8910#p8910
any ideas on how or if this is possible?
thunderchero