Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

DarthRaff

Members
  • Content Count

    152
  • Joined

  • Last visited

Community Reputation

3 Neutral

About DarthRaff

  • Birthday 06/20/1976

Profile Information

  • Gender
    Male
  • Location
    Spain
  • Interests
    Graphical art, video games, manga
  1. Yes, no error, thank you very much
  2. Hello, trying some simple collision but have problem when i try to use a class functions inside another class. This are the pieces of code : .h : #include "elementograf.h" #include "nivel.h" class Prota : public ElementoGraf { public: Prota(); void moverDerecha(Nivel n); void moverIzquierda(Nivel n); . . . } .cpp: #include "elementograf.h" #include "prota.h" #include "nivel.h" void Prota::moverDerecha(Nivel n) { if (n.esPosibleMover(posX+4, posY, posX+anchura+4, posY+altura)) { posX += 4; } } void Prota::moverIzquie
  3. Thank you very much, Aggror, it works
  4. Hello, Happy new year every body!!!! I'm want to load a level from a .dat file, but no succes. This is what i have: . . . nivelActual = 1; . . . void ReadFromFile() { FILE *fichDatos; char nombreFich[50]; sprintf(nombreFich, "nivel%03d.dat", nivelActual);// This line is not working fichDatos = fopen(nombreFich, "rt"); //fichDatos = fopen("nivel1.dat", "rt"); This works, so, the file exists } . . . Can someone tell me what am i doing wrong, please, thank you very much
  5. Oh, Yes, it's compiling now. Thankyou very much for your time, you helped me a lot, thankyou
  6. 1>Prueba1_250.obj : error LNK2019: unresolved external symbol "public: __thiscall Monster::~Monster(void)" (??1Monster@@QAE@XZ) referenced in function _main 1>.\Prueba1-250-Debug.exe : fatal error LNK1120: 1 unresolved externals
  7. Hello again, I tried several ways but can't make it work. can someone tell what am i doing wrong, please ? Header: #ifndef MONSTER_H #define MONSTER_H class Monster { public: Monster(); TController monstercont; TModel monsterent; TVec3 monsterpos; TVec3 monsterrot; int monsterstate; float mstartframe; float mendframe; float manimvel; void MoveMonster(TController monst); ~Monster(); }; #endif CPP: #include "engine.h" #include "monster.h" Monster::Monster() { } void Monster::MoveMonster(TController monst) { if (KeyHit(KEY_UP)) { MoveEntity (monst,Vec3(.0f,.0f,1.0f))
  8. Thankyou very much, i will try that tomorrow. But i think that i allready tried it before with no succes ( put the array and iterator inside .cpp), anyway not sure, so will try. The program works if i have all in the same file, but i'd like to do it in separate files, thankyou again.
  9. Here they are : 1>j:\pruebaheaders3\monster.cpp(10) : error C2065: 'monsteriter' : undeclared identifier 1>j:\pruebaheaders3\monster.cpp(10) : error C2065: 'monsterarray' : undeclared identifier 1>j:\pruebaheaders3\monster.cpp(10) : error C2228: left of '.begin' must have class/struct/union 1> type is ''unknown-type'' 1>j:\pruebaheaders3\monster.cpp(10) : error C2065: 'monsteriter' : undeclared identifier 1>j:\pruebaheaders3\monster.cpp(10) : error C2065: 'monsterarray' : undeclared identifier 1>j:\pruebaheaders3\monster.cpp(10) : error C2228: left of '.en
  10. Thanks for the info. Here are a smaller code for try and see the errors : Header: #ifndef MONSTER_H #define MONSTER_H class Monster { public: Monster(); TController monstercont; TModel monsterent; TVec3 monsterpos; TVec3 monsterrot; int monsterstate; float mstartframe; float mendframe; float manimvel; void MoveMonster(); ~Monster(); }; #endif CPP: #include "engine.h" #include "monster.h" Monster::Monster() { } void Monster::MoveMonster() { for(monsteriter=monsterarray.begin();monsteriter!=monsterarray.end();monsteriter++) { if (KeyHit(KEY_UP)) { MoveEntity ((*monsteriter
  11. You right, sorry, no time now. it give me 9 errors. I will put a shortest version or the app itself in a zip later, sorry again.
  12. Hello, trying to organize my code in a header and a cpp file but no succes. i tried many different things with no luck. can someone help me with that, please ? here are the codes: Header: #ifndef MONSTER_H #define MONSTER_H class Monster { public: Monster(); TController monstercont; TModel monsterent; TVec3 monsterpos; TVec3 monsterrot; int monsterstate; float mstartframe; float mendframe; float manimvel; void MoveMonster(); ~Monster(); }; #endif CPP: #include "engine.h" #include "monster.h" Monster::Monster() { } void Monster::MoveMonster() { for(monsteriter=m
  13. Hello again, Can't figure out how to use "on key release" to achive this, and i'd like to do it without an external library, but can't find the way. A lot of years ago, when i was trying quick basic, a teacher told me that i 'd have to clear the keyboard buffer to move something without that little annoying stop, but can't find how to do that in c++. If someone coul'd help me please...
  14. Thank you, i thought that i have to clean the input buffer using fflush(stdin) but it doesn't work. i will try that you say, thank you again.
  15. Hello, This is just c++, not Leadwerks. I have been looking in google a way to move something (using the console) around the screen using the keyboard trying to aboid this : When i push a key for move to the right the character, it moves one point, then stop while the key is still pushed and then start to move againg smoothing. Well, can someone tell me how can i eliminate this stop ? sorry if i ask this here but i have been looking for it in google with no result and don't know where to ask it.
×
×
  • Create New...