Object

BlitzMax Forums/BlitzMax Programming/Object

verfum(Posted 2008) [#1]
Okay I use the blitz community as a fantastic source of gameing techniques, I switch between using Bmax and C++ for different reasons, now I've got some code in Bmax which I'm trying to convert over to C, so I'll jump straight to it, what on earth is an Object?!

as in obj:Object

Blitz docs says this, which is about as useful as a chocolate teapot.

Object
Description Object Type


Thanks :)


MGE(Posted 2008) [#2]
Think of it as a c++ class. ;)


Brucey(Posted 2008) [#3]
Object is the base Type from which all other Types are born... (except Int, Short, Float, Double, etc).

Any types you make yourself are a subclass of Object.


verfum(Posted 2008) [#4]
Is it a built in Bmax base class that I'd need to create for my code to immitate it, as in:

class Object
{

};

class Weapon: public Object
{

};

class Player: public Object
{

       Object* currentWeapon;
};


If you see what I mean?

So in Blitz, everything you create like a TImage, TMap etc are derived from it's built in Object Type?


verfum(Posted 2008) [#5]
Excellent, yep cheers Brucey, thought I was on the right track there :)