www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 05-12-19, 09:39   #611
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 457
Default

you can delete #pragma pack(push, 1) and #pragma pack(pop) because #pragma once can do the job.
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old 05-12-19, 10:03   #612
JMN
Explorer
 
Join Date: Sep 2006
Posts: 586
Default

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.
JMN is offline   Reply With Quote
Old 05-12-19, 15:09   #613
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 457
Default

i not have this problem with my plugins since i used #ifndef instead of #pragma pack() and i used your ClassicInventory without problem
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; 09-12-19 at 16:18.
TokyoSU is offline   Reply With Quote
Old 09-12-19, 10:50   #614
Delta
Historian
 
Delta's Avatar
 
Join Date: Jul 2007
Location: Italy
Posts: 280
Default

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
Delta is offline   Reply With Quote
Old 10-01-20, 20:24   #615
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,838
Default

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.)
AkyV is online now   Reply With Quote
Old Yesterday, 14:18   #616
smcandrew
Hobbyist
 
Join Date: Aug 2008
Location: UK
Posts: 16
Default

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	
	}
For the flag I want to use the TPOS_FOUR_HORIENT, however I'm not sure what to put in the slot? If I want a specific Moveable do I just put that number? That didn't seem to work for me. Also in the CheckPositionAlignment second arguement, I'm not sure what needs to go in there either. Does anyone have any ideas?

Thanks!
smcandrew is online now   Reply With Quote
Old Yesterday, 14:33   #617
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 457
Default

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.
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; Yesterday at 14:34.
TokyoSU 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 23:28.


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