Game Development Community

Necessary includes for custom C++ code?

by Deozaan · in Torque Game Builder · 05/23/2008 (8:27 pm) · 1 replies

I'm trying to get this CRC32 hash code into TGB, but I'm not sure what sort of includes I need to put in the source files to make sure I can use the terminology I see everywhere else in the source.

The CRC hash code I have uses ULONG for unsigned long 32 bit integers, but all throughout the TGB code I see U32 being used.

Can I just do a find/replace on all every ULONG in this code and change them to U32 or do I have to include certain other source files to be able to use U32?

#1
05/24/2008 (3:41 am)
Well I figured it out and got it to compile!

TGB now creates a CRC32 hash (using a signed 32bit integer, due to limitations of ConsoleFunction()) from any string!

And using another simple TorqueScript function it is very easy to convert the S32 into a U32.