Yes, sorry, me again.
I've now got the basics sorted out for HGE. In other words, I've got all the virtual functions within the class working as they should. I can work with images, sounds, etc.
HGE has a series of helper classes to do advanced stuff though, and I'd like to get that done too. If it's possible. But these classes do not return instances via a public function, they do it only via constructors. So I really don't know how I would go about implementing this into BMax.
Here's the class from the C++ header file. Any tips and advice would be greatly appreciated. And if there's anything there which 100% absolutely cannot ever be done from BMax, I guess you might as well tell me now.
I've now got the basics sorted out for HGE. In other words, I've got all the virtual functions within the class working as they should. I can work with images, sounds, etc.
HGE has a series of helper classes to do advanced stuff though, and I'd like to get that done too. If it's possible. But these classes do not return instances via a public function, they do it only via constructors. So I really don't know how I would go about implementing this into BMax.
Here's the class from the C++ header file. Any tips and advice would be greatly appreciated. And if there's anything there which 100% absolutely cannot ever be done from BMax, I guess you might as well tell me now.
class hgeSprite { public: hgeSprite(HTEXTURE tex, float x, float y, float w, float h); hgeSprite(const hgeSprite &spr); ~hgeSprite() { hge->Release(); } hgeSprite& operator= (const hgeSprite &spr); void Render(float x, float y); void RenderEx(float x, float y, float rot, float hscale=1.0f, float vscale=0.0f); void RenderStretch(float x1, float y1, float x2, float y2); void Render4V(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3); void SetTexture(HTEXTURE tex); void SetTextureRect(float x, float y, float w, float h); void SetColor(DWORD col, int i=-1); void SetZ(float z, int i=-1); void SetBlendMode(int blend) { quad.blend=blend; } void SetHotSpot(float x, float y) { hotX=x; hotY=y; } void SetFlip(bool bX, bool bY); HTEXTURE GetTexture() const { return quad.tex; } void GetTextureRect(float *x, float *y, float *w, float *h) const { *x=tx; *y=ty; *w=width; *h=height; } DWORD GetColor(int i=0) const { return quad.v[i].col; } float GetZ(int i=0) const { return quad.v[i].z; } int GetBlendMode() const { return quad.blend; } void GetHotSpot(float *x, float *y) const { *x=hotX; *y=hotY; } void GetFlip(bool *bX, bool *bY) const { *bX=bXFlip; *bY=bYFlip; } hgeRect* GetBoundingBox(float x, float y, hgeRect *rect) const { rect->Set(x-hotX, y-hotY, x-hotX+width, y-hotY+height); return rect; } hgeRect* GetBoundingBoxEx(float x, float y, float rot, float hscale, float vscale, hgeRect *rect) const; float GetWidth() const { return width; } float GetHeight() const { return height; } protected: hgeSprite(); static HGE *hge; hgeQuad quad; float tx, ty, width, height; float tex_width, tex_height; float hotX, hotY; bool bXFlip, bYFlip; };