Game Development Community

Adding code new TGE code.

by Ritchey "Hawk" Mulhollem · in Torque Game Engine · 10/17/2004 (12:12 pm) · 2 replies

I'm trying to add a simple piece of C code to the engine. Since I am not familar with C, it's proving to be a challange for me. I want it as a console function of "encode64" and "decode64". I know it needs to go into ResManager.cc, but I just can't get it to work.

The code is very small: http://www.ruffboy.com/code/Base64.zip

Any pointers on how to get started would be great.

Thanks!

#1
10/17/2004 (12:20 pm)
It doesn't need to go in the ResManager.cc. You can create your own CC and add it to the project. Compile the new exe and those functions will be there for you to use. Its explained in the Torque Docs (see ConsoleMethod on the linked page. Also my resource shows how to create your own console functions. See: How to to expand the Scripting Language within C++ Torque Engine

I hope that will get you well on the path to adding your own console functions.
#2
10/18/2004 (5:46 am)
Yeah, I saw the stuff in the Torque docs. That tells me where it interfaces, but not HOW to interface it. A lot of good that does me. Useless! (most likely because I am not a C coder I imagine.)

Now your resource is exactly what I needed! It's all set up, ready to go! Exactly what I was looking for. Thanks!