Author Topic: Submarine minigame text  (Read 3170 times)

kruci

  • *
  • Posts: 105
    • View Profile
Submarine minigame text
« on: 2007-09-19 19:36:24 »
Hi,
do anyone know where is submarine minigame text?
or ideas where it can be?

I am searching for
MISSION INCOMPLETE (COMPLETE)
TARGET XX/XX (XX is number)
SCORE

doesnt looks like texture not in scene.bin, sub.lgp, ff7.exe
(but maybe coded else than fftext?)

sub.lgp only TEX - help, indicators, FONTS
FF7.exe
----- Submarine Mini Game BEGIN -----
names of TEX files
----- Submarine Mini Game END -----
Some "functions" pos: (%i, %i, %i)  rot: (%i, %i, %i)  dir: (%i, %i, %i),...

actualy submarine has data somewhere else, becouse sub.lgp contain only TEX.(models, battlefield missing, text,.. )

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Submarine minigame text
« Reply #1 on: 2007-09-19 20:51:52 »
Most of the data is in the exe (PC version), so I'd look for text there. Or just trace it with debugger.

_Ombra_

  • *
  • Posts: 110
    • View Profile
    • http://www.sadnescity.it
Re: Submarine minigame text
« Reply #2 on: 2009-05-28 01:28:31 »
This is a old ass post but i figured it's information that has never been posted. Quoting a PM from dziugo:

Quote
Text is coded into the exe, and it's not even in a data block, it's in code section. In assembly it looks like this:

Code: [Select]
00796347  |> 66:C705 908DE9>MOV WORD PTR DS:[E98D90],0FF90           ;  text1[0].posX = -112; // +320
00796350  |. 66:C705 928DE9>MOV WORD PTR DS:[E98D92],0FF70           ;  text1[0].posY = -144; // +270
00796359  |. 66:C705 948DE9>MOV WORD PTR DS:[E98D94],19              ;  text1[0].sizeX = 25;
00796362  |. 66:C705 968DE9>MOV WORD PTR DS:[E98D96],13              ;  text1[0].sizeY = 19;
0079636B  |. 66:C705 988DE9>MOV WORD PTR DS:[E98D98],0DF             ;  text1[0].srcX = 223;
00796374  |. 66:C705 9A8DE9>MOV WORD PTR DS:[E98D9A],0               ;  text1[0].srcY = 0;
0079637D  |. 66:C705 9C8DE9>MOV WORD PTR DS:[E98D9C],5               ;  text1[0].color = 5;
00796386  |. C705 A08DE900 >MOV DWORD PTR DS:[E98DA0],3C23D70A       ;  text1[0].fract = 0.01f;
00796390  |. 8B15 6891E900  MOV EDX,DWORD PTR DS:[E99168]
00796396  |. 8915 A48DE900  MOV DWORD PTR DS:[E98DA4],EDX            ;  text1[0].texta = texta_reference;
0079639C  |. A1 B485E900    MOV EAX,DWORD PTR DS:[E985B4]
007963A1  |. A3 A88DE900    MOV DWORD PTR DS:[E98DA8],EAX            ;  text1[0].textb = textb_reference;
007963A6  |. 8B0D 788BE900  MOV ECX,DWORD PTR DS:[E98B78]
007963AC  |. 890D AC8DE900  MOV DWORD PTR DS:[E98DAC],ECX            ;  text1[0].textc = textc_reference;
007963B2  |. 8B15 1C8BE900  MOV EDX,DWORD PTR DS:[E98B1C]
007963B8  |. 8915 B08DE900  MOV DWORD PTR DS:[E98DB0],EDX            ;  text1[0].textd = textd_reference;

Or in C-language:

Code: [Select]
// Text: MISSIONINCOMPLETE
// M:
text1[0].posX = -112; // +320
text1[0].posY = -144; // +270
text1[0].sizeX = 25; // width of the image to copy
text1[0].sizeY = 19; // height of the image to copy
text1[0].srcX = 223; // x-pos in the text.tim
text1[0].srcY = 0; // y-pos in the text.tim
text1[0].color = 5;
text1[0].fract = 0.01f;
text1[0].texta = texta_reference;
text1[0].textb = textb_reference;
text1[0].textc = textc_reference;
text1[0].textd = textd_reference;

Size is hardcoded in at least 2 places, each text has it's own display function  - for MISSIONINCOMPLETE it looks like this:

Code: [Select]
00791BD8  /$ 55             PUSH EBP                                 ;  void draw_text_MISSIONINCOMPLETE();
...
00791BEE  |> 837D FC 11      CMP DWORD PTR SS:[EBP-4],11             ;  // size of the text == 17
...


There are plenty of space for modifications since that's how the FF7 was compiled.

dziugo

All of this is referring to the PC version of the game