Difference between revisions of "FF7/Field/DialogWindow"

From Final Fantasy Inside
< FF7‎ | Field
Jump to navigation Jump to search
my_wiki>Akari
my_wiki>Akari
Line 1: Line 1:
 +
== Description ==
 +
Field module of Final Fantasy VII han handle 4 dialog windows at once. All data for them stored in structures with size 0x30.
 +
There are a lot of additional arrays used for variables offsets and many other data used by windows.
 +
 +
All windows can be called any time with 0x40 MESSAGE or 0x48 ASK opcodes. They will be called all the time, when window is shown on screen. Only after window is closed this opcode will be skipped and script pointer go to next opcode.
 +
There are a lot of window parameters opcode. they are set different parameters to window. They are 0x2E WCLS 0x2F WSIZW 0x36 WSPCL 0x37 WNUMB 0x38 STTIM 0x41 MPARA 0x42 MPRA2 0x50 WINDOW 0x51 WMOVE 0x52 WMODE 0x53 WREST 0x55 WROW 0x57 SWCOL. All of them write parameters directly to structure, but they need to be called from the same entity else they wait till the window is closed.
 +
 +
Window is state driven. The way how window handling input and shown are dependent on state. State handling called by MESSAGE and ASK opcode. State handling of this two opcodes a bit different. By default window state is zero (closed window).
 +
 
== Memory Layout ==
 
== Memory Layout ==
  

Revision as of 16:48, 17 September 2007

Description

Field module of Final Fantasy VII han handle 4 dialog windows at once. All data for them stored in structures with size 0x30. There are a lot of additional arrays used for variables offsets and many other data used by windows.

All windows can be called any time with 0x40 MESSAGE or 0x48 ASK opcodes. They will be called all the time, when window is shown on screen. Only after window is closed this opcode will be skipped and script pointer go to next opcode. There are a lot of window parameters opcode. they are set different parameters to window. They are 0x2E WCLS 0x2F WSIZW 0x36 WSPCL 0x37 WNUMB 0x38 STTIM 0x41 MPARA 0x42 MPRA2 0x50 WINDOW 0x51 WMOVE 0x52 WMODE 0x53 WREST 0x55 WROW 0x57 SWCOL. All of them write parameters directly to structure, but they need to be called from the same entity else they wait till the window is closed.

Window is state driven. The way how window handling input and shown are dependent on state. State handling called by MESSAGE and ASK opcode. State handling of this two opcodes a bit different. By default window state is zero (closed window).

Memory Layout

This is offsets to english version of game. But japanese has exactly same structure, just offsets a bit different. this is all offsets used by dialog windows (opcode reading offsets not included here).

800491D0 character id -> savemap block assosiation id. (0-0, 1-1, 2-2, 3-3, 4-4, 5-5, 6-6, 7-7, 8-8, 9-6, A-7)

80049208 window RGB. (size [r][g][b]x4)

80071E2C number of opened windows. Increment this during window initialization. Decrement during closing.

8007E7A8 offset to dialog block.

8008326C [] windows parent entity (size 0x01).

80083274 [][][][] windows data (size 0x30). Pointer to dialog string.

80083278 [][] windows data (size 0x30). WINDOW x.

8008327A [][] windows data (size 0x30). WINDOW y.

8008327C [][] windows data (size 0x30). WINDOW width.

8008327E [][] windows data (size 0x30). WINDOW height.

80083280 [][] windows data (size 0x30). WINDOW current width. Set during dialog init (width / 4) (8 - min value).

80083282 [][] windows data (size 0x30). WINDOW current height. Set during dialog init (height / 4) (8 - min value).

80083284 [][] windows data (size 0x30). Text scrolling value.

80083286 [][] windows data (size 0x30). Letters in window string.

80083288 [][] windows data (size 0x30). Bytes in window string.

8008328A [][] windows data (size 0x30). Current row in string. Incremented during copy.

8008328C []

8008328D [] windows data (size 0x30). WMODE style.

8008328E [] windows data (size 0x30). Show pointer.

8008328F [] windows data (size 0x30). WSPCL type.

80083290 []

80083291 [] windows data (size 0x30). WNUMB number of digits in number.

80083292 [][]

80083294 [][][][] windows data (size 0x30). WNUMB number.

80083298 [][] windows data (size 0x30). Pointer X.

8008329A [][] windows data (size 0x30). Pointer Y.

8008329C [] windows data (size 0x30). WSPCL x.

8008329D []

8008329E [] windows data (size 0x30). WSPCL y.

8008329F []

800832A0 [][] windows data (size 0x30). window state.

800832A2 [] windows data (size 0x30). WMODE cbc.

800832A3 []

8009C6E4 savemap start

8009C748 savemap character name data (Cloud).

8009D268 [][][][] savemap seconds for timer (set in STTIM).

8009D288 savemap memory bank 1/2 start

8009D391 [][][] savemap party info.

8009D7D0 [] savemap message speed.

800E0738 digit->letter assosiation array (10-26 letters from character table)

800E4214 memory bank array for getting variable for windows. 8 for each window. (size 0x8 0x1)

800E4234 reading offsets in dialog in field. One for each window. (size 0x4).

800E424C total window height. Height of window with extra rows. Set this during B state in window as 8008328A (current row) * 10 + 11. (size 0x2).

800E4278 [][] name reading offset for dialog windows. (size 0x2).

800E4280 [][] current variable for windows. (size 0x2).

800E4944 text for windows to diaplay. (size 0x100)

800E4D48 offsets for getting variable from memory block for windows. 8 for each window. (size 0x10 0x2)

80114278 [][] some data for windows. Set this to zero during window initialization

801142CC [][] additional rows during text scrolling. (size 0x2).

8011445C [][] time to wait for windows. (size 0x2).

80114470 [][] field dialog value which content value how mush characters add at current character copy. (size 0x08 0x2).

80114480 [][] field dialog OK button speed modificator. (size 0x08 0x2).

801144DC [][] temp variable string. First we write variable here and then copy it to window string. (size 0x10).

8011451C [][] current variable read offset. (size 0x2).