05-12-19, 09:39 | #611 |
Member
Joined: Mar 2019
Posts: 687
|
you can delete #pragma pack(push, 1) and #pragma pack(pop) because #pragma once can do the job.
|
05-12-19, 10:03 | #612 |
Member
Joined: Sep 2006
Posts: 674
|
That doesn't sound right, they do different things.
pragma pack sets how structs are aligned in memory and is needed to make it compatible with the other plugin sources, otherwise you'll get all kinds of weird crashes or wrong values in the game. pragma once does the same as #include guards by including the file only once during compilation to help prevent multiple definitions. |
05-12-19, 15:09 | #613 |
Member
Joined: Mar 2019
Posts: 687
|
i not have this problem with my plugins since i used #ifndef instead of #pragma pack() and i used your ClassicInventory without problem
Last edited by TokyoSU; 09-12-19 at 16:18. |
09-12-19, 10:50 | #614 |
Member
Joined: Jul 2007
Posts: 288
|
Sorry for the late answer, i just got the project working fine yesterday, there was still something to configure to make the package work correctly in Visual Studio 2019. Anyway the $(SolutionDir) was correct Thank you JMN
About those #pragma pack, not sure if it is necessary, so i'll keep them, just to be sure |
10-01-20, 20:24 | #615 |
Moderator
Joined: Dec 2011
Posts: 4,881
|
My Visual Express Debug DLL works like a charm, but the Release DLL made from that produces a bug. Unbelievable...
(I can't tell more now, because I don't know yet where to find the reason.) |
17-02-20, 14:18 | #616 |
Member
Joined: Aug 2008
Posts: 32
|
I'm trying to figure out how to replicate the TestPosition script using the plugin. I've had a look through the tutorials / documentation, and I have this so far:
Code:
StrTestPositionCmd MyPosition; StrBoxCollisione *pDist; StrBoxOrienting *pOrient; pDist = &MyPosition.DatiPosition.Distance; pOrient = &MyPosition.DatiPosition.Orienting; pDist->MinX = 0-256; pDist->MaxX = 0+256; pDist->MinY = 253-129; pDist->MaxY = 253+640; pDist->MinZ = -379-256; pDist->MaxZ = -379+256; pOrient->OrientHMin = -16384; pOrient->OrientHMax = +16384; pOrient->OrientVMin = -1000; pOrient->OrientVMax = 1000; pOrient->OrientRMin = -1000; pOrient->OrientRMax = 1000; MyPosition.IdTestPosition = -1; MyPosition.Flags = TPOS_FOUR_HORIENT; MyPosition.Slot = ??? if (CheckPositionAlignment(&MyPosition, ???) == true) { //PERFORM FLIP EFFECT } Thanks! |
17-02-20, 14:33 | #617 |
Member
Joined: Mar 2019
Posts: 687
|
CheckPositionAlignement is used in the Collision function of your object to check if the position you set in MyPosition is true, then you will do something in the if.
sorry for not more info i not use plugin anymore. check paolone tutorial or in the vehicle project in Plugin SDK for more info about Alignement. PS: the slot is the objNumber in objects.h object list but check it in the tutorial just in case. Last edited by TokyoSU; 17-02-20 at 14:34. |
17-03-20, 06:56 | #618 |
Member
Joined: Mar 2019
Posts: 687
|
it's nothing with TRNG plugins, but since i use a dll and you can only found it there, i say it here
i found the 3 fuc**** function that control the lara render, it's not DrawLara() anymore unlike TR1-TR3 but CalcLaraMatrices() so i decompiled it and the render is correct, TR4 have a bug in InterpolateArmMatrix() it not do that: Code:
*(phd_mxptr + M00) = *(phd_mxptr + M00 - 24); *(phd_mxptr + M01) = *(phd_mxptr + M01 - 24); // Restore Laras Main Rotations *(phd_mxptr + M02) = *(phd_mxptr + M02 - 24); // Less any torso rotations *(phd_mxptr + M10) = *(phd_mxptr + M10 - 24); // avoids Wobbly arms when *(phd_mxptr + M11) = *(phd_mxptr + M11 - 24); // moving 'n' shooting *(phd_mxptr + M12) = *(phd_mxptr + M12 - 24); *(phd_mxptr + M20) = *(phd_mxptr + M20 - 24); *(phd_mxptr + M21) = *(phd_mxptr + M21 - 24); *(phd_mxptr + M22) = *(phd_mxptr + M22 - 24); Code:
phd_mxptr[M00] = phd_mxptr[M00]; it messup all the think in DEL_CalcLaraMatrices_Interpolate() if you try to decompile it. now there the new render (only in CalcLaraMatrices()): Code:
void assign_pprot(short pprot); void assign_matrixptr(); void create_item(); void create_object(); void create_bone(); void create_frame(); void check_hitdirection(); void create_rotation(); void create_shadow(); void assign_weapon(); void start_world(); void start_list(); void mesh_hips(); void mesh_thight_l(); void mesh_calf_l(); void mesh_foot_l(); void mesh_thight_r(); void mesh_calf_r(); void mesh_foot_r(); void mesh_torso(); void mesh_head(); void mesh_unarmed(); // this one and the one after contains the arm. void mesh_1gun(); void mesh_2gun(); void mesh_revolver(); void end_list(); void end_world(); but i'm not using TRNG exe but the original one, since i cant replace anything with TRNG in the way :'( - this project is for my own personnal use and knowledge, dont assign it with TR5Main, TR5Main is MUCH more advanced than me and maybe more good that this one, i just want the original render instead of a new one like TR5Main have :x PS: yea you will not be curious about that since it's not a plugin, and i would not do all that just to decompile the inventory, i would use ClassicInventory new item to call that new weapon but it's not possible Last edited by TokyoSU; 17-03-20 at 07:02. |
19-03-20, 10:20 | #619 |
Member
Joined: Mar 2019
Posts: 687
|
Decompiled the inventory 2D
https://github.com/TokyoSU/TR4Main/b.../inventory.cpp it's really a big think since i just need to decompile the save/load function, i will can add new weapon it's really sad i cant do it with TRNG |
19-03-20, 17:36 | #620 |
Member
Joined: Sep 2006
Posts: 674
|
Nice, you've decompiled DrawThreeDeeObject2D().
I'm using that function to draw the pickup notifier in the ring inventory plugin. Might come in handy to fix some issues with it. Thanks for sharing the code. |
Thread Tools | |
|
|