Monday, 19 January 2015

Building TRViewer – part 4

TRViewer was written well before Paolone’s Next Generation Level Editor (NGLE) and next generation enhancement to tomb4.exe (TRNG) were on the scene.

Paolone did update TRViewer to open next generation levels and that version can be found in the Tools folder of your NGLE installation.

With help from meta2tr, I released a further updated version in this thread [link] that addressed some bugs and added some more features. Note that the changes were mainly tested with TR4 files and may not be correct for the other TR versions.

I have uploaded a zip containing the files that were changed to create the latest version (revision 5) of TRViewer at mediafire [link].

In the zip’s “DOC” folder is a readme that details the changes made. Some other changes not mentioned in the readme were made to address the warnings when building.

Copy the *.h, *.cpp and *.rc  files in the zip into the TRViewer folder to replace the corresponding files.

If you want to preserve your current TRViewer setup either make a copy of the whole TRViewerSrc folder and replace the files in the copy or make sure you have committed the current state to source control.

If you search the new files for “sapper”, “meta2tr” or “paolone” you should find most of the changed code.

IMPORTANT: TRViewer doesn’t calculate the number of keyframes for animations correctly and as it turns out calculating the number of keyframes is not a simple fix.

In this version of the code, this bug is not fixed and skips any animations that cause a problem.

Because the animations are skipped and not loaded they cannot be saved. If the level is saved those problem animations will be missing.

Included in the zip is “_changefiledates.bat” which will change the timestamp of the files in the zip to the current date and time. Open the *.bat before executing it and make sure it contains only the following line, “copy *.*,,+”.

Since source control relies on the timestamps of the files, run the *.bat file in the zip before you copy the files so they have a newer timestamp than the existing files.

In the zip’s “Resources” folder is a new version of “TRCatalog.xml” which has been updated for the next generation slots. Copy this into the ../bin/debug/resources and ../bin/release/resources folder where TRViewer.exe is created and executed.

The TRViewerDoc2.ico file in the zip’s “res” folder must be copied into the “res” folder in the TRViewer folder.

Once all the files have been copied, rebuild the Debug and Release configurations of TRViewer.
If there are no errors, commit the changes to source control.

There is a new header file “ExtraNG.h” and it will appear in the untracked files in source control so be sure to add that to the included changes when you commit to source control.

prev | next | first

No comments:

Post a Comment