Difference between revisions of "Cutscenes"

From z64 wiki
Jump to: navigation, search
(Cutscene Commands)
(Finding Cutscenes)
Line 9: Line 9:
 
The first three alternate headers (if they exist) will never define the 0x17 command, as they are typically reserved for different combinations of day/night child/adult variations of an area (the root header + 3 alternate headers = 4).
 
The first three alternate headers (if they exist) will never define the 0x17 command, as they are typically reserved for different combinations of day/night child/adult variations of an area (the root header + 3 alternate headers = 4).
  
See [[Maps_and_Scenes]] for more information on the header commands.
+
See [[Maps and Scenes]] for more information on the header commands.
  
 
In order to reference the cutscene data, the 0x17 command uses a bank offset, which is of the following form:
 
In order to reference the cutscene data, the 0x17 command uses a bank offset, which is of the following form:

Revision as of 02:00, 1 June 2013

Finding Cutscenes

There are a few ways that you can locate a cutscene.

You can always find a cutscene by watching the cutscene pointer with a memory viewer. It's located at 801CA208 in v1.0. Be aware that the cutscene pointer does not null itself once the cutscene has finished playing, but as long as you don't leave the area this won't be an issue.

Many (but not all) cutscenes are stored within scene files. Several alternate scene headers (referenced by the 0x18 command) exist with the purpose of playing a single cutscene. This is done by defining the 0x17 command, which in turn points to the start of the cutscene header.

The first three alternate headers (if they exist) will never define the 0x17 command, as they are typically reserved for different combinations of day/night child/adult variations of an area (the root header + 3 alternate headers = 4).

See Maps and Scenes for more information on the header commands.

In order to reference the cutscene data, the 0x17 command uses a bank offset, which is of the following form:

BB XX XX XX

BB = Bank Number (02 for Scenes)
XX XX XX = Offset from the address stored in bank number BB to the Cutscene Header.

Since the cutscene is stored within the scene file, XX XX XX will be the offset from the start of the scene.

^^ Data given by Flotonic.

Cutscene Commands

Cutscenes begin with an 8 byte header of the following form

0000xxxx 0000ffff
x = ? (some values affect camera behavior?)
f = end frame? (other commands can terminate the cutscene before this frame is reached)

Following that are the cutscene commands.

Camera Positions:
00000001wwwwxxxxyyyyzzzz

00000001 = Marker
w = ?
x = start frame?
y = end frame?
z = ?

following that is a list of 16 byte records:
ww00 [????] [????????] [xxxxyyyyzzzz] [????]
ww = ? FF on last entry
xxxx = x position
yyyy = y position
zzzz = z position


Camera Focus:
00000002wwwwxxxxyyyyzzzz

00000002 = Marker
ww = ?
xxxx = start frame?
yyyy = end frame?
zzzz = ?

following that is a list of 16 byte records:
ww00 ffff [????????] [xxxxyyyyzzzz] [????]
ww = ? FF on last entry
ffff = frames to reach the next point
xxxx = x position
yyyy = y position
zzzz = z position

Cutscene Duration:
0000000B 0000xxxx

0000000B = Marker
xxxx = length in frames


Text:
00000013 0000xxxx

00000013 = Marker
xxxx = number of entries

Text Entries (follows one of two formats):

FFFF xxxx yyyy FFFF FFFF FFFF
x = start frame
y = end frame
(no text displayed)

or

zzzz xxxx yyyy 0000 0000 0000
z = message number
x = start frame
y = end frame (waits for text to finish before continuing cutscene)


Screen transition effects:
0000002D 00000001 xxxx yyyy zzzz zzzz?

0000002D = Marker
00000001 = constant?
x = transition (probably the same as entrance/exit transitions)
y = start frame
z = end frame (seems to be repeated)


Exits:
000003E8 00000001 xxxx yyyy zzzz zzzz?

000003E8 = Marker
00000001 = constant?
x = index for a list of addresses at 8013AF78, the machine code at these addresses sets the exit number to use
y = start frame
z = end frame (seems to be repeated)


End of cutscene data:
FFFFFFFF

^^ Taken from DeathBasket's posts on the GCN

Actor Commands

Anything not recognized as a cutscene command can be parsed as an actor.

0000aaaa 0000yyyy

0000aaaa = Marker, where a is the actor number. This is NOT the same numbers used to define an actor in a map, see list below.
yyyy = number of entries.

Following that is a list of entries.
Entry format for actors:
aaaa bbbb cccc dddd -------- eeeeeeee ffffffff gggggggg hhhhhhhh iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm

aaaa = Current Action
bbbb = Starting frame for path.
cccc = Ending frame for path.

dddd -------- = Unknown.

eeeeeeee = X coordinate of path start vertex.
ffffffff = Y coordinate of path start vertex.
gggggggg = Z coordinate of path start vertex.

hhhhhhhh = X coordinate of path end vertex.
iiiiiiii = Y coordinate of path end vertex.
jjjjjjjj = Z coordinate of path end vertex.

kkkkkkkk llllllll mmmmmmmm = Appears to be a vertex normal for the path, single precision floats.

Actor Entities

00000003 = Title Logo (Actor 0171, obj 014A)
 - Action 1E fades in logo
 - Action 1F fades out logo
0000000A = Link
0000003E = Navi
0000003D = Path/animation for something?
00000056 = Music Changer
 - Action param sets what music to play (Action - 1 = Song to play)

^^ Merged some information from a few posts by Twili and xdaniel on the GCN

Start position data pointed to by cutscene headers (found within the scene file) have different Link variables depending 
on whether or not Link is present in the cutscene. 

0xFF = Cutscenes where Link is not present.
0xFFF = Normal variable- Link is present.