Jump to content

xtreampb

Members
  • Posts

    321
  • Joined

  • Last visited

Everything posted by xtreampb

  1. I posted that b/c i changed it back. I removed the pointers at 'entity0' and 'entity1' and the above line is still throwing the error.
  2. this line throws the error Obj1->OnCall(position, normal, force, speed);
  3. ok so now i can compile, but when a collision occurs i get a read/write errors. I moved the collision into my main C++ file and when i create the objects in my game, i 'link' it to the collision function at the top of the code void _stdcall Coll(TEntity *entity0, TEntity *entity1, byte *position, byte *normal, byte *force, flt speed) { coll *Obj1 = (coll*)GetEntityUserData(*entity0); //coll *Obj2 = (coll*)GetEntityUserData(*entity1); Obj1->OnColl(/*Obj1,*/ position, normal, force, speed); //return 0; } //inside my game function Stone mStone;//derived from coll as you saw earlier.\ SetEntityCallback(mStone.GetFullModel(), (byte*)Coll, ENTITYCALLBACK_COLLISION); thank you all for your help ~Xtreampb~
  4. i'm not quite sure what your asking for so i'll post everything regarding the collisions //collisions class //header file #ifndef _M_COLL_H__ #define _M_COLL_H__ #include "engine.h" class coll { public: virtual void OnColl(coll *obj, byte* position, byte* normal, byte* force, flt speed) ; }; #endif //cpp file #include "Collisions.h" void coll::OnColl(coll *obj, byte* position, byte* normal, byte* force, flt speed) { } //Stone class //header file #ifndef _M_STONE__H_ #define _M_STONE__H_ #include "engine.h" #include "Collisions.h" class Stone : public coll { private: TModel Full; public: Stone();//constructor ~Stone();//destructor virtual void OnColl(coll* ColObj, byte* position, byte* normal, byte* force, flt speed); }; #endif //#ifndef _M_STONE__H_ //CPP file Stone::Stone() { this->Full=LoadModel("stone//stone_1.gmf"); EntityType(this->Full, 1); SetBodyMass(this->Full, 1); //so that we can pass the model to the collision function. we pass the model to cast it to coll type SetEntityUserData(this->Full, (byte*)this); SetEntityCallback(this->Full, (byte*)this->OnColl, ENTITYCALLBACK_COLLISION); } void Stone::OnColl(coll* ColObj, byte* position, byte* normal, byte* force, flt speed) { this->Destroy();//function call to run my collision information already set aside so that this collision testing can be easily tested } I've had this issue for the longest time, just didn't know where to turn to get help. Thanks ~xtreampb~
  5. so what is the difference between the virtual polymorphism and just having each model in a class, each with it's own collision function. I don't see the need to use polymorphism here. I also get this error Error 1 error C2440: 'type cast' : cannot convert from 'void (__thiscall Stone::* )(coll *,byte *,byte *,byte *,LE::flt)' to 'byte *' c:\Documents and Settings\Chris\My Documents\Visual Studio 2008\Projects\Castle Defense\Castle Defense\Stone.cpp 40 //the line the error occurs in is here SetEntityCallback(this->Full, (byte*)OnColl, ENTITYCALLBACK_COLLISION); //this->Full is a TModel, OnColl is my collision function name
  6. i know this is rather old, but rick can i see a quick example snippet. I think it would help everyone here to see this as an example.
  7. this link has a lot of tutorials for LE2. The one you are looking for is the tutorial "Camera Controls". I would recommend reading the PDF instead of watching the video, but that is my preference. http://www.leadwerks.com/wiki/index.php?title=Main_Page I would also recommend bookmarking this link. Good luck to you ~Xtreampb~
  8. glad you know that. something similar to OSX and iOS how the .app is actually an organized folder with a os recognized extension with everything in a particular place.
  9. ok so i'm using the "ForEachEntityDo((byte*)mFunc);" however, this doesn't execute if(KeyHit(KEY_SPACE)) { DropBox(box); if(EntityExists(ground)) FreeEntity(ground);//this doesnt execute here else goto CreateGround; } if i comment out the ForEachEntityDo call it works no problem. i've tried commenting out what the called function does to where it is an empty function and still the same result. Any help would be appriciated. This is just me messing with the engine so no real importance to where this has to work. just learning atm. Thanks ~Xtreampb~
  10. Hey all, I'll tell you what i'm trying to do. When a body gets below a certin y value i want to remove it. However, i have multiple bodies falling at once. How would i determine if a random body has fallen past lets say -5. I don't know the object in the code, it is a random object so i can use a specific 'box3.getpos().gety'. I need to use a more generic form of code. so that if any body falls, i can catch it. I could use another 'ground' that has collisions type of 2. But i don't know how do use the collisions callback functions. Do anyone else have an idea, and/or can some one show me how to set up the collisions callback? Thanks ~Xtreampb~
  11. xtreampb

    Left 2 Do

    Can you post or msg me this example pelase?
  12. well i have to run 3 miles once a week and twice a week i am required to do 30 min physical strength training then 30 min of cardio training. So with that and my lack of smoking i should get a decent % of LE3 off.
  13. Sooo excited. Can't wait for the next stage. I'm ready to put LE3 to the test on my Mac. Maybe try to push some things to linux.
  14. the card needs to be updated or the driver
  15. yes. It updated my normal drivers but not my GLSL drivers
  16. So i finally updated to LE 2.5 and updated my graphics card drivers to the lastest (nVidia 7900 gs) but it says that i'm still using GLSL 1.2 which isn't supported. Any one got any ideas how i can manually update my GLSL driver. Thanks in advance ~Xtreampb~
  17. yea i think makefile would be helpful for people who wanted to use other IDE's and compilers
  18. well i can upgrade if need be (only $30 for mountain lion) and i think that will make for better games using OGL 3.2 +. Will i be able to use net beans instead of xcode?
  19. Have an idea of an insanely complex game that ties in the mechanics of a FPS, RTS, and TBS
  20. So this may have been discussed already but i didn't see it. I thought i saw somewhere that the beta was already released to developers, although i could have misread that post. Is a date available for the current owners of LE2, and will this beta be available on Mac's snow leopard?
  21. xtreampb

    Visual Studio

    C++ is C++. It is cross platform code. the goal of LE3 is to be cross platform. So lets not limit ourselves to a particular IDE. As long as the engine is made cross platform why does it matter which IDE LE3 supports. That should be up to the user. Me personally I like net beans. If it does matter how about this, (so this isn't just a rant) have an option to use LE2 or LE3 in the updater however, this may mess with some of the business particulars that josh may have in mind.
  22. for basic encryption i use xor encryption. not the safest but i don't see a real need to do AES-256 bit encryption on my save files. I can post the encryption function if you like. it just uses iostream.h
  23. do you have a tutorial on how to link the 2 libs together or could you write one maybe, I'm sure the community would absolutly love it.
  24. so you can use Dark AI With leadwerks. Just include the necessary headerfiles and link to the dark AI library in you C++ code. Will this still be the case in L3D?
  25. xtreampb

    Project Manager

    I don't think mac supports 7zip
×
×
  • Create New...