About Store Forum Documentation Contact
Donations:
140$/mo



Post Reply 
Own OBJ_TYPE doesn't work
Author Message
Ogniok Offline
Member

Post: #1
Own OBJ_TYPE doesn't work
Hi!

I have a problem with my game. I create my own OBJ_TYPE in Enums [OBJ_TREE]. I set this to few objects and build world. When I'm loading the world in my game, all this objects is loading to Statics container (I think). I can see them, but Trees container is empty!

My code:

Game.cpp
Code:
Game::ObjMemx<Game::Static> Statics;
Game::ObjMemx<Tree>         Trees;
Game::ObjMemx<ItemEC>       Items;
Game::ObjMemx<Player>       Players;

Game.cpp
Code:
Bool InitGame()
{
   Game::World.init();

   Game::World.setObjType(Statics, OBJ_STATIC);
   Game::World.setObjType(Trees,   OBJ_TREE);
   Game::World.setObjType(Players, OBJ_PLAYER);
   Game::World.setObjItem(Items,   OBJ_ITEM);

   Game::World.New("World/main.world");

   /***/

Tree.h
Code:
struct Tree : Game::Static
{

};

Tree.cpp
Code:
/******************************************************************************/
#include "stdafx.h"
#include "../Main.h"
/******************************************************************************/
(This post was last modified: 04-09-2010 02:55 PM by Ogniok.)
04-09-2010 02:54 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Own OBJ_TYPE doesn't work
make sure the objects aren't in "embed mode"
04-09-2010 04:41 PM
Find all posts by this user Quote this message in a reply
Ogniok Offline
Member

Post: #3
RE: Own OBJ_TYPE doesn't work
It works now. Thanks
04-09-2010 05:07 PM
Find all posts by this user Quote this message in a reply
Post Reply