Re: NumWords for Room is wrong...

Re: NumWords for Room is wrong...


Replies | Reply | Tomb Raider Level Editor & Utility Discussion Forum

Posted by Turbo Pascal on February 27, 2000 at 12:47:54:

In reply to: NumWords for Room is wrong... posted by Jean Luc Picard on February 27, 2000 at 03:11:23:

>: Or at least by my calculations. I'm working with Level1.PHD from TR1. I >load the textures and then proceed to load the rooms. Just to double check, I >was calculating what the offset should be after reading the first room by >comparing the "total number of words" in the room field to the actual offset >after reading the room with all the different field offsets.


-"Total number of words" fiels is the amount of "Words"(2 bytes data) needed for store the vertex-table, the rectangles-table, the triangles-table and the sprites-table.

So ("amount number of words" * 2) is the amount of bytes that you need for skip the above tables, then next is the portals table.

****IMPORTANT******
If you add or delete entries to the above tables, or create new ones YOU MUST HAVE TO RE-CALCULATE THIS FIELD or the level will not load.

Calcule "amount of word" this way:

Room[x].room_info.num_words:=(((amount_vertex*8)+
(amount_quads*10)+
(amount_triangles*8)+
(amount_sprites*4))+8) / 2;

Turbo Pascal.



Replies:



Reply

Name:

Email:

Subject:

Message:

Optional
Link URL:

Link Title:

Image URL:


Replies | Reply | Tomb Raider Level Editor & Utility Discussion Forum