Porting to TR2/3

Porting to TR2/3


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

Posted by BitShifter on May 04, 2000 at 06:49:14:

In reply to: Re: Porting TR1 to TR2/3 posted by Turbo Pascal on May 03, 2000 at 13:47:54:


: I think it is not just "cut and paste" chunk binary data from one file to another, that is the ease part, but you will need also to UPDATE ALL REFERENCES;
: for example, if we want to extract the TRex and include it to another level
: we will need to extract ONLY for the TREX the texture data, meshes, movable, mesh tree, anims, state change, anim dispatch, anim command and the frame.
: Then after "paste" all chunk to the new file, the meshes now reference to
: invalid textures (the new textures injected has different value now), the movables reference to invalid meshes,invalid frames and invalid mesh tree, etc etc etc,
: that is because the data came with references from his original arrays in the file, but now in the new file the data has different position in the arrays, so need different references to point to the correct index array.

I should have been more clear: when I say pasted I really mean pasted with all references, of course.

I had started to do it for TR3, loading all data into objects (classes galore!) so the references would be updated upon being written back to file but the thing was sooooo sloooow I just gave it up.

After loading every bit I want to inject into the new level *in memory*, I would rewrite the level file from the start while offsetting all addresses by the correct amount, copying alternatively from the chunks to be injected and the file to be updated (like inserting new pages in a loose leaf binder. The program would adjust the "page" numbers automatically.) As long as the file offsets for all references are self consistents, I see no problems.

Is there not a problem about the behaviors of enemies being hard coded in the engine or are they in the level file itself?




Replies:



Reply

Name:

Email:

Subject:

Message:

Optional
Link URL:

Link Title:

Image URL:


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