www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Next Generation Level Editor

Reply
 
Thread Tools
Old 12-09-19, 10:57   #541
ChocolateFan
Student
 
ChocolateFan's Avatar
 
Join Date: Dec 2017
Location: I am female
Posts: 227
Default

Thank you!

I wonder where these structs will be though. I already have Tomb4Discoveries_mine.h with the typedefs and functions_mine.h with the function pointers... Putting them in structures_mine.h will bloat it. Perhaps a new file?
ChocolateFan is offline   Reply With Quote
Old 12-09-19, 11:24   #542
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 286
Default

Quote:
Originally Posted by ChocolateFan View Post
Thank you!

I wonder where these structs will be though. I already have Tomb4Discoveries_mine.h with the typedefs and functions_mine.h with the function pointers... Putting them in structures_mine.h will bloat it. Perhaps a new file?
just structures_mine.h is ok

there the new StrSlot:
Code:
struct StrObjectInfo {
    WORD  nmeshes;
    WORD  mesh_index;
    int   bone_index;
    int   frame_base;
    LPVOID initialise;
    LPVOID control;
    LPVOID floor;
    LPVOID ceiling;
    LPVOID draw;
    LPVOID collision;
    WORD object_mip;
    WORD anim_index;
    short hit_points;
    WORD pivot_length;
    WORD radius;
    WORD shadow_size;
    WORD bit_offset;
    WORD loaded : 1;
    WORD intelligent : 1;
    WORD non_lot : 1;
    WORD save_position : 1;
    WORD save_hitpoints : 1;
    WORD save_flags : 1;
    WORD save_anim : 1;
    WORD semi_transparent : 1;
    WORD water_creature : 1;
    WORD using_drawanimating_item : 1;
    WORD hit_effect : 2;
    WORD undead : 1;
    WORD save_mesh : 1;
    LPVOID draw_extra;
    int explodable_meshbits;
    int pad;
};
and the new StrItemTr4:
Code:
#define SAI_GUARD	0x1
#define SAI_AMBUSH	0x2
#define SAI_PATROL1	0x4
#define SAI_MODIFY	0x8
#define SAI_FOLLOW	0x10
#define SAI_PATROL2	0x20
#define SAI_X1	    0x40
#define SAI_X2	    0x80

/// hit_effect flags
#define HIT_NONE     0
#define HIT_BLOOD    1
#define HIT_SMOKE    2
#define HIT_FRAGMENT 3

/// used by mesh_bits to found the mesh (to hide it: "&= ~(MESH_BITS_)", to show it: "|= (MESH_BITS_)")
/// it's a multiple of two.
#define MESH_BITS_0  0x1             // mesh no° 1
#define MESH_BITS_1  0x2             // mesh no° 2, etc..
#define MESH_BITS_2  0x4
#define MESH_BITS_3  0x8
#define MESH_BITS_4  0x10
#define MESH_BITS_5  0x20
#define MESH_BITS_6  0x40
#define MESH_BITS_7  0x80
#define MESH_BITS_8  0x100
#define MESH_BITS_9  0x200
#define MESH_BITS_10 0x400
#define MESH_BITS_11 0x800
#define MESH_BITS_12 0x1000
#define MESH_BITS_13 0x2000
#define MESH_BITS_14 0x4000
#define MESH_BITS_15 0x8000
#define MESH_BITS_16 0x10000
#define MESH_BITS_17 0x20000
#define MESH_BITS_18 0x40000
#define MESH_BITS_19 0x80000
#define MESH_BITS_20 0x100000
#define MESH_BITS_21 0x200000
#define MESH_BITS_22 0x400000
#define MESH_BITS_23 0x800000
#define MESH_BITS_24 0x1000000
#define MESH_BITS_25 0x2000000
#define MESH_BITS_26 0x4000000
#define MESH_BITS_27 0x8000000

struct StrItemInfo {
    int floor;
    int touch_bits;
    DWORD mesh_bits;                // (MESH_BITS_ flags)
    WORD object_number;
    WORD current_anim_state;    // StateIDCurrent
    WORD goal_anim_state;        // StateIDNext
    WORD required_anim_state;  // StateIDAI
    WORD anim_number;
    WORD frame_number;
    short room_number;
    short next_item;
    short previous_item;
    short speed;
    short fallspeed;
    short hit_points;
    WORD box_number;
    short timer;
    WORD button_bits;
    WORD intensity;
    WORD ocb_bits;
    WORD carried_items;         // bad guys hold whatever pickup
    WORD after_death;
    WORD fired_weapon;         // baddy muzzleflash timer (draw muzzleflash) (the position will be always wrong dont use it !)
    short reserved_1;
    short reserved_2;
    short reserved_3;
    short zone_type;                    // (ZONE_ enum) (It's used by my new plugins, not released throught)  (reserved_4)
    LPVOID data;
    PHD_3DPOS pos;
    ITEM_LIGHT il;
    BYTE pad[5488];
    BYTE* pZone1;
    BYTE* pZone2;
    DWORD active : 1;                 // (Only STS_ACTIVE/STS_NOT_ACTIVE)
    DWORD status : 2;                 // (STS_ flags)
    DWORD gravity_status : 1;
    DWORD hit_status : 1;           // (HIT_ flags)
    DWORD collidable : 1;
    DWORD looked_at : 1;
    DWORD dynamic_light : 1;
    DWORD poisoned : 1;
    DWORD ai_bits : 5;                // (SAI_ flags)
    DWORD really_active : 1;       // for turret ...
    DWORD in_draw_rooms : 1;
    DWORD meshswap_meshbits;
    DWORD draw_room;
};
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; 12-09-19 at 11:35.
TokyoSU is offline   Reply With Quote
Old 18-09-19, 12:42   #543
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 286
Default

Found Lara Structure
instead of lara_item or lara_slot, all info about gun, climb status, water status, mesh array etc.. is stored here !
i dont know if paolone as found it before but it's clear that it's the lara struct.
i dont created it now but i will create the struct for sure

EDIT:
after some test it throw something like this but the struct is not finished !
and some value is misplaced.
Code:
========================================
[Lara] Structure Debug Info !
[Lara] ItemIndex: 14
[Lara] GunStatus: 0
[Lara] GunType: 1
[Lara] GunRequested: 1
[Lara] GunLast: 1
[Lara] CalcFallspeed: 0
[Lara] WaterStatus: ABOVEWATER
[Lara] ClimbStatus: 0
[Lara] PoseCount: 0
[Lara] HitFrame: 0
[Lara] HitDirection: -1
[Lara] Air: 1800
[Lara] DiveCount: 0
[Lara] DeathCount: 0
[Lara] CurrentActive: 0
[Lara] CurrentXVelocityX: 0
[Lara] CurrentXVelocityY: 0
[Lara] CurrentXVelocityZ: 0
[Lara] FlareAge: 0
[Lara] Skidoo (VehicleIndex): -1
[Lara] WeaponItem: 
[Lara] WeaponBackItem: 0
[Lara] FlareFrame: 0
[Lara] Poisoned: 0
[Lara] Poisoned Second: 0
[Lara] Wet[] with id 1 have value 0 
[Lara] Wet[] with id 2 have value 0 
[Lara] Wet[] with id 3 have value 0 
[Lara] Wet[] with id 4 have value 0 
[Lara] Wet[] with id 5 have value 0 
[Lara] Wet[] with id 6 have value 0 
[Lara] Wet[] with id 7 have value 0 
[Lara] Wet[] with id 8 have value 0 
[Lara] Wet[] with id 9 have value 0 
[Lara] Wet[] with id 10 have value 0 
[Lara] Wet[] with id 11 have value 0 
[Lara] Wet[] with id 12 have value 0 
[Lara] Wet[] with id 13 have value 0 
[Lara] Wet[] with id 14 have value 0 
[Lara][Flag] FlareControlLeft: 0
[Lara][Flag] Unused: 0
[Lara][Flag] Look: 0
[Lara][Flag] Burn: 0
[Lara][Flag] KeepDucked: 0
[Lara][Flag] IsMoving: 0
[Lara][Flag] CanMonkeySwing: 0
[Lara][Flag] BurnBlue: 0
[Lara][Flag] Gassed: 0
[Lara][Flag] BurnSmoke: 1
[Lara][Flag] IsDucked: 0
[Lara][Flag] HasFired: 0
[Lara][Flag] Busy: 0
[Lara][Flag] LitTorch: 0
[Lara][Flag] IsClimbing: 0
[Lara][Flag] Fired: 0
[Lara] WaterSurfaceDist: 0
[Lara] LastPos_X: 0
[Lara] LastPos_Y: 0
[Lara] LastPos_Z: 0
[Lara] MeshEffects: -268435456
[Lara] MeshPtrs[] with id 0 have value 1343296745 
[Lara] MeshPtrs[] with id 1 have value -737078036 
[Lara] MeshPtrs[] with id 2 have value -1273948947 
[Lara] MeshPtrs[] with id 3 have value 940643567 
[Lara] MeshPtrs[] with id 4 have value -1139731215 
[Lara] MeshPtrs[] with id 5 have value -1676602126 
[Lara] MeshPtrs[] with id 6 have value 537990388 
[Lara] MeshPtrs[] with id 7 have value 672208118 
[Lara] MeshPtrs[] with id 8 have value 470881533 
[Lara] MeshPtrs[] with id 9 have value 537990398 
[Lara] MeshPtrs[] with id 10 have value 605099263 
[Lara] MeshPtrs[] with id 11 have value 403772672 
[Lara] MeshPtrs[] with id 12 have value 470881537 
[Lara] MeshPtrs[] with id 13 have value 537990402 
[Lara] MeshPtrs[] with id 14 have value 1119491 
[Lara] TargetAngles[0]: 0
[Lara] TargetAngles[1]: 0
[Lara] TurnRate: 0
[Lara] MoveAngle: 0
[Lara] HeadYRotation: 0
[Lara] HeadXRotation: 0
[Lara] HeadZRotation: 0
[Lara] TorsoYRotation: 0
[Lara] TorsoXRotation: 0
[Lara] TorsoZRotation: 0
[Lara] LaraArm(Left)->frame_number: 0
[Lara] LaraArm(Left)->anim_number: 0
[Lara] LaraArm(Left)->lock: FALSE
[Lara] LaraArm(Left)->y_rot: 0
[Lara] LaraArm(Left)->x_rot: 0
[Lara] LaraArm(Left)->z_rot: 0
[Lara] LaraArm(Left)->flash_gun: 0
[Lara] LaraArm(Right)->frame_number: 0
[Lara] LaraArm(Right)->anim_number: 0
[Lara] LaraArm(Right)->lock: FALSE
[Lara] LaraArm(Right)->y_rot: 0
[Lara] LaraArm(Right)->x_rot: 0
[Lara] LaraArm(Right)->z_rot: 0
[Lara] LaraArm(Right)->flash_gun: 3584
========================================
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; Yesterday at 19:09.
TokyoSU is offline   Reply With Quote
Old Yesterday, 18:53   #544
ChocolateFan
Student
 
ChocolateFan's Avatar
 
Join Date: Dec 2017
Location: I am female
Posts: 227
Default

I have updated our discoveries in this thread: https://www.tombraiderforums.com/sho...d.php?t=221439.

Sources:
ChocolateFan is offline   Reply With Quote
Old Yesterday, 19:28   #545
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,607
Default

Great work, ChocolateFan, thank you!

@TokyoSU:
About the post here:
- As I can see, it is your further discoveries over the "TokyoSU-part" in the files ChocolateFan sent. So should I add them in those files, to the TokyoSU-part, right? Right?
- What do you mean by

Quote:
Originally Posted by TokyoSU View Post
for the StrItemInfo, you the structure there: https://www.tombraiderforums.com/sho...65#post8132765
I can't find that info in that post. (Please don't send me from links to links, if that was your purpose, it makes the things messy. )
AkyV is offline   Reply With Quote
Old Today, 07:08   #546
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 286
Default

Quote:
Originally Posted by AkyV View Post
I can't find that info in that post. (Please don't send me from links to links, if that was your purpose, it makes the things messy. )
https://www.tombraiderforums.com/sho...&postcount=542 this post :x
for the lara control & collision routine, paolone already found it, i just created the typedef and TYPE_.
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; Today at 07:09.
TokyoSU is offline   Reply With Quote
Old Today, 08:22   #547
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,607
Default

Thanks!
And the answer for the other question, please?

Quote:
@TokyoSU:
About the post here:
- As I can see, it is your further discoveries over the "TokyoSU-part" in the files ChocolateFan sent. So should I add them in those files, to the TokyoSU-part, right? Right?
AkyV is offline   Reply With Quote
Old Today, 09:23   #548
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 286
Default

Quote:
Originally Posted by AkyV View Post
Thanks!
And the answer for the other question, please?
yes but you will not use it because it's for the engine only, you can add it for gathering info about lara control & collision.
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old Today, 17:52   #549
ChocolateFan
Student
 
ChocolateFan's Avatar
 
Join Date: Dec 2017
Location: I am female
Posts: 227
Default

I checked the functions that Krystian discovered and their prototypes are all correct, so I added them to our discoveries in this post: https://www.tombraiderforums.com/sho...62&postcount=3.
ChocolateFan is offline   Reply With Quote
Reply

Bookmarks

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 19:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.