Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 24-08-17, 13:58   #111
Dustie
Member
 
Dustie's Avatar
 
Joined: Apr 2005
Posts: 9,208
Default

I might very well be trying to reverse-engineer the wheel (since everyone else seems to know how things work, while I'm starting from scratch), but I just wanted to say I'm currently investigating sapper's TR42PRJ tool code because I want to learn the TR file format so that maybe I can convert TR2/3 levels to PRJ one day

Currently I'm trying to wrap my head around FloorData, because I lack much knowledge and fluency in binary and hexadecimal systems, so it all appear cyphered to me. But because it's so fascinating I can't help trying to figure it all out! It's too addictive!
Dustie is offline   Reply With Quote
Old 29-08-17, 15:22   #112
TempleOfHorus
Member
 
Joined: Jan 2017
Posts: 18
Default TR

I found what is entity 144 in TR1. It's scion piece which has Pierre in Tomb of Tihocan level.
TempleOfHorus is offline   Reply With Quote
Old 30-08-17, 11:16   #113
Dustie
Member
 
Dustie's Avatar
 
Joined: Apr 2005
Posts: 9,208
Default

Never stop learning, I guess
Dustie is offline   Reply With Quote
Old 09-05-18, 01:39   #114
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

One thing that needs checking.

Quote:
struct tr_face4 // 12 bytes
{
uint16_t Vertices[4];
uint16_t Texture;
};

Texture field can have the bit 15 set: when it is, the face is double-sided (i.e. visible from both sides).
Room#17 in andy3.trc has some water surface faces that have bit 14 set.

Using
Code:
texture and 0x7fff
gives invalid texture index. Need to use
Code:
texture and 0x3fff
Can be seen with fexinspect where invalid texture leads to incorrect texturing of water surface.
sapper is offline   Reply With Quote
Old 14-02-19, 15:24   #115
ChocolateFan
Member
 
Joined: Dec 2017
Posts: 534
Default

On this page: https://trwiki.earvillage.net/doku.php?id=trs:sound, section Sound Map, the Looping behaviour flag is described as:

Code:
[...] Since TR3, one-shot wait mode is introduced (value 10), [...]
I think that the correct is:

Code:
[...] Since TR3, one-shot wait mode is introduced (value 01), [...]
Perhaps it would be nice to also specify the relationship with Sounds.txt flags:
  • None: normal playback;
  • W: one-shot wait;
  • R: one-shot rewound; and
  • L: looped.
ChocolateFan is offline   Reply With Quote
Old 14-02-19, 23:23   #116
Boobandie
Member
 
Joined: Jul 2012
Posts: 4,285
Default

What does one shot wait and one shot rewound mean in regards to how a sound is played? How does it differ from normal playback?
Boobandie is offline   Reply With Quote
Old 15-02-19, 17:57   #117
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,872
Default

Wait (W): do not restart if it is already playing. (After that, the new start is not automatical when the old play stops.)
Rewound (R): abort the actual one and restart a new play.

These are for single plays.

In my actual WIP TRNG plugin I am just working successfully on a feature to change some sound sample features, including these, in-game.

Last edited by AkyV; 15-02-19 at 17:58.
AkyV is online now   Reply With Quote
Old 15-05-20, 11:07   #118
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

I was studying TurboPascal's code for loading TR5 levels and and it seems the tr5_room struct is incomplete.

First need to define unknown struct of 36 bytes. Not sure what element type is though.

Code:
struct tr5_unknown //36 bytes
{
    uint8_t unknown[36];
};
After light data and before sector data is section whose size depends on Unknown6 field.

Code:
tr5_room_light Lights[NumLights];
tr5_unknown What[Unknown6];
tr_room_sector SectorList[NumXSectors * NumZSectors];
I inspected Andrea1.trc and verified existence of new section whenever Unknown6 > 0.

@Lwmte the first post mentions 2 locations of TRS 3 but there are 3.

http://xproger.info/projects/OpenLara/trs.htm
https://opentomb.github.io/TRosettaS...ettastone.html

and the wiki.

Which one is best? Reply at discord.
sapper is offline   Reply With Quote
Old 19-05-20, 13:05   #119
zdimension
Member
 
zdimension's Avatar
 
Joined: Feb 2016
Posts: 68
Default

Thanks for the heads up, this extra block is for the fog bulbs, I just updated TRS3 about it. I'll give you more details on Discord.
zdimension is offline   Reply With Quote
Old 28-05-20, 04:45   #120
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default tr5 room structure

Code:
    uint32_t Separator;    // 0xCDCDCDCD

    uint16_t Unknown4;
    uint16_t Unknown5;

    float RoomX;
    float RoomY;
    float RoomZ;

    uint32_t Separator[4]; // Always 0xCDCDCDCD
    uint32_t Separator;    // 0 for normal rooms and 0xCDCDCDCD for null rooms
    uint32_t Separator;    // Always 0xCDCDCDCD
The RoomX, RoomY, RoomZ values affect the dynamic lighting (gunflash, binoculars, lasersight) of the room mesh.

RoomY is always 0. Any other value stops the dynamic lighting.

RoomX and RoomZ must be correct values. Wrong values stop dynamic lighting.

As for fog bulb, 36 byte struct is:
Code:
float x, y, z //position 12 bytes
unknown 12 bytes possibly intensity, in out floats order unknown
float r, g, b //colour 12 bytes
For each fog bulb there is a light source in lights array but all bytes are 0xCD.

Last edited by sapper; 28-05-20 at 06:29.
sapper is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 14:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.