Correctly render all four objects for every cell in a map
This commit is contained in:
BIN
doc/formats/img/chapter01-rendering-objects.png
Normal file
BIN
doc/formats/img/chapter01-rendering-objects.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 MiB |
@@ -375,7 +375,7 @@ Press "U" to get to the screen!
|
||||
|
||||

|
||||
|
||||
I've added a `view-map` command to explore the data graphically. Each of the 16
|
||||
I've added a `view-minimap` command to explore the data graphically. Each of the 16
|
||||
bytes in a cell row must have a function; comparing a known map to how it looks
|
||||
in WH40K_TD.exe can help me to unravel that function.
|
||||
|
||||
@@ -431,7 +431,20 @@ maps.Cell{
|
||||
|
||||
So `CellIdx == 9` points to the center object's Area, looked up in the set file!
|
||||
|
||||

|
||||
|
||||
It seems the area numbers are absolute indexes into the set, rather than having
|
||||
a new set of indices for each type.
|
||||
|
||||
With this information, we can render a given Z index for a map quite easily,
|
||||
using the new `view-map` binary. It draws the four objects for every cell, and
|
||||
gives results like this:
|
||||
|
||||

|
||||
|
||||
Some colours are off, but I've verified that I'm using the correct palette, so
|
||||
this must be due to other things. Perhaps `Data/Cycle.cyc` is the culprit, or
|
||||
maybe I need to revisit .obj file parsing a few more times!
|
||||
|
||||
## Trailer
|
||||
|
||||
|
Reference in New Issue
Block a user