Re: [CODE] cScTextObj class definition [message #465707 is a reply to message #465622] |
Sat, 07 April 2012 13:13 |
iRANian
Messages: 4308 Registered: April 2011
Karma:
|
General (4 Stars) |
|
|
The __thiscall should be unnecessary yeah, it's there just to be clear that it's a member function and not a static member function. The RENEGADE_FUNCTION macro is a define for __declspec naked, if you try to define the Constructor() function as a normal constructor (i.e. cScTextObj:cScTextObj()) the linker gives annoying errors. Creating the object on the stack causes the FDS to freeze or crash on scope exit (not sure why this is), that's why there's the awkward new operator call line, deleting pointers shouldn't be an issue with the simplistic use of the class (you shouldn't need to do anything more exotic than the examples).
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|