Jump to content
  • 0

I challenge everybody, too...


xdaniel
 Share

Question

...to figure out the remaining, unknown commands in the scene/room headers! (hope JSA doesn't mind me borrowing his thread title and intro ;))

 

Here are OoT's unknown commands:

 

Command 0x05, used in rooms:

  • Dampe's Hut: 0x05000000 0xF600FE08
  • Hyrule Field: 0x05000000 0x50505000 and 0x05000000 0x50505001 (in one header)
  • Lake Hylia: 0x05000000 0x00000A04
  • Gerudo Valley: 0x05000000 0xF6000005
  • Desert Colossus: 0x05000000 0x0602FF82
  • Gerudo's Fortress: 0x05000000 0x00040A50, 0x05000000 0x0004288C (one header, room 0) and 0x05000000 0x000032C8 (one header, room 1)
  • Haunted Wasteland: 0x05000000 0x00000000 (room 0) and 0x05000000 0x0F286DBE (room 1)
  • Death Mountain: 0x05000000 0x9CFF1482 and 0x05000000 0x5A00FFFB (one header)
  • Ganon's Tower (outside): 0x05000000 0x00000F32
  • Sasatest: 0x05000000 0x5A005032

Command 0x09, used in rooms... or rather in exactly one, the Depth Test: 0x09000000 0x00000000

 

Command 0x0C... doesn't appear to be used anywhere.

 

Also, there's the remaining unknown/undocumented parameters in (partially) documented commands, such as 0x07 and 0x08, and making sure that the documentation of ex. the various sound and skybox commands is correct...

 

Link to comment
Share on other sites

Recommended Posts

  • 0

So command 09 would be useless?

Most likely yes, unless I missed something along the way.So, this 0C command is a sort of lamp/Sun effect? I don't get exactly what "transparent cape" means. I'm thinking of something like Farore's Wind green ball. Is it right?And talking about environment colors, I don't know if this was ever documented, but here are the 12 standard environments (Well, those assigned by Sharp Ocarina, that - as far as I know - are obrigatory)1 - Dawn2 - Day3 - Sunset4 - Night5 - Underwater Dawn6 - Underwater Day7 - Underwater Sunset8 - Underwater Night9 - Storm Dawn10 - Storm Day11 - Storm Sunset12 - Storm Night
Link to comment
Share on other sites

  • 0

ChriisTiian-> If position is only one byte long, that means that you cannot place it everywhere, as most maps are bigger than FF in x and z length...that's a shame, but it may be useful nevertheless. 

 

xdaniel-> It's probably just me, but I would better understand what it does if it read "Light from ceiling", "Light on Link's downside" etc. than "diffuse" and "specular"; I may lack some vocabulary. But you're right, we have to document what they do exactly.

 

Strati-> No, it's more like a punctual light source (you can't see it) which emits light in all directions, as you would expect it from a flame.

Setting 01 is more like sunlight, coming from one direction from outside of the map.

 

For the environments, believe it or not, it was not documented, and I found out exactly the same things yesterday. I was on SharpOcarina for quite some time, changing colors to green and pink and then testing on what time they occur.

 

I only have to add this:

Environment 2 (day) uses it's first color mostly on actors, only slightly on the room itself,

while environment 4 (night) uses the same color on actors and more on the room.

 

This means that if you use red as first color for both environment 2 and environment 4, at night, the room will be more red than at daytime.

 

I wonder what environment is used when a lightning strikes during a storm?

Link to comment
Share on other sites

  • 0

http://code.google.com/p/sharpocarina/source/browse/trunk/MapDev/MainForm.cs#1359

 

/* Now add default environments ... normal environment */

/* ... underwater environment */

/* ... rainy environment */

 

...but granted, they weren't documented outside the source, and not beyond those short comments.

 

Also, IIRC those are only the defaults for "outdoor" scenes, dungeons have different (fewer?) environment settings.

Link to comment
Share on other sites

  • 0

Also, IIRC those are only the defaults for "outdoor" scenes, dungeons have different (fewer?) environment settings.

 

This is true. You can build an indoor map and only give it one set of environment colours. Someone should probably take a look at that in more detail though.

Link to comment
Share on other sites

  • 0

Most likely (?) environment settings format:

 

aaaaaa bbbbbb cccccc dddddd eeeeee ffffff gggg hhhh

 

Where:

a = Ambient light color (RRGGBB)

b = First diffuse light direction (XXYYZZ)

c = First diffuse light color (RRGGBB)

d = Second diffuse light direction (XXYYZZ)

e = Second diffuse light color (RRGGBB)

f = Fog color (RRGGBB)

g = Fog near distance

h = Fog far distance

  • Like 1
Link to comment
Share on other sites

  • 0

That's really neat, xdaniel. Just what is the difference between "fog near distance" and "fog far distance"?

 

 

After some work in the Bottom of the Well (4 environments) and Ice Cavern (6 environments):

 

Environment usage in a dungeon (tested with up to 6 environments):

 

Environment 1: Main - Water type 0, Terrain type 0-3

Environment 2: Water type 1, Terrain type 4-7

Environment 3: Water type 2, Terrain type 8-B

Environment 4: Water type 3, Terrain type C-F

Environment 5: Water type 4

Environment 6: Water type 5

 

 

What I mean with water type? Well, the properties of a water box are: ?x??

where x = used environment while under water.

 

So x = 0 uses environment 1,

x = 1 uses environment 2,

x = 2 uses environment 3...

Link to comment
Share on other sites

  • 0

Rinku: I've honestly not worked with fog very much, but I believe the "near" distance is where fog starts in relation to the camera, while the "far" distance is where the fog ends. They can also influence the draw distance of room and actor models, cutting them off beyond a certain point, but I'm not sure if that's just a side effect or not.

 

That said, there's a way to mess around with the current environment settings easily in-game - in the Majora's Mask Debug ROM: http://tcrf.net/Proto:The_Legend_of_Zelda:_Majora's_Mask/Debug_Version#Environmental_Control - The menu in the third screenshot there is what you want, just press Start three times on controller 4 to get there. It allows you to change, in order, the ambient light, the first diffuse light, the second diffuse light, and the fog using the D-pad and A/B buttons on the controller.

 

EDIT: IP.Board doesn't like apostrophes in URLs -.-

Edited by xdaniel
Link to comment
Share on other sites

  • 0

Strati-> Thank you!

 

SharpOcarina could edit these colors as Lighting A, B, C, D, E but had not information about their meaning (general ambient light, Link's upside or downside etc.).

 

So command 09 would be useless?

 

ChriisTiian-> Nice findings!

 

After some testing of the 02 format, I think I understand what you mean.

 

With Transparent Cape with a Light, you mean a punctual light source, am I right?

It can be positioned around like an actor.

But the size gets very big very fast. yy = 10 is as big as Kakariko!

 

Are you sure that the positions are only one byte long, not two? I mean, I think it is

"02 UUUU VVVV WWWW 00 XX XX XX 00 YY 00" instead of

"02 00 UU 00 VV 00 WW 00 XX XX XX 00 YY 00".

 

 

I have one question left, for the 01 (Ambient Light):

01 00 WW 00 XX YY YY YY 00 00 00 00 00 00

 

Do you think that the two 00 bytes highlighted in purple are unused? I tried many things for them, it didn't crash, but I didn't see any changes either.

 

Probably because YY00 is actually 'YYYY', an s10.5 fixed point value like most coordinates in game. the coordinate range is -1024 to 1023, so I can see a value of 0x1000 (128), possibly engulfing kakariko

 

EDIT:

And to answer the question, it's probably more likely that they are 2 bytes, since registers are loaded and stored 16-bits at a time in mips (though it is possible, yet tedious, to load/store single bytes)

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.