So I have this program I'm trying to get to work, it is my attempt at a basic RTS type engine. I was able to make it draw one unit, select it and use joystick to draw selection box. (I know truly amazing things)
I changed to classes and made a little loop to where its supposed to draw 10 units on the screen and I should be able to select them (this is just to test some things out)
I got the current version to compile, tho all that happens is it draws one unit on the screen and it randomly jumps, this causes two odd questions, first being is there a problem with my classes to where its not passing the 10 objects into the drawing phase, second how did i mess it up to where it is rerolling the coordinates when the one call to reset the coordinates is outside the main loop.
Finally, it has been about 2 months since I have worked on this, I was having a problem with it not compiling due to some char problems between the various functions (oslib functions to draww things) so now I cannot even get it to compile.
I know its asking alot but if I could get some serious help with this.
Thanks
Stalin
My Error MSG:
Code: Select all
stalin@porta-commy:~/Desktop/psp/rts$ make
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2 -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2 -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150 -c -o main.o main.cpp
main.cpp: In function ‘int main()’:
main.cpp:45: warning: deprecated conversion from string constant to ‘char*’
main.cpp:39: warning: ‘stloc.ptBoxLocation::x’ may be used uninitialized in this function
main.cpp:39: warning: ‘stloc.ptBoxLocation::y’ may be used uninitialized in this function
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2 -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2 -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150 -c -o object.o object.cpp
object.cpp: In constructor ‘CObject::CObject(const char*)’:
object.cpp:8: warning: deprecated conversion from string constant to ‘char*’
object.cpp: In member function ‘void CObject::freeImage()’:
object.cpp:15: error: ‘oslFreeImage’ was not declared in this scope
object.cpp: In member function ‘void CObject::loadImage(const char*)’:
object.cpp:23: error: invalid conversion from ‘const char*’ to ‘char*’
object.cpp:23: error: initializing argument 1 of ‘OSL_IMAGE* oslLoadImageFile(char*, int, int)’
object.cpp: At global scope:
object.cpp:31: error: prototype for ‘void CObject::drawImage() const’ does not match any in class ‘CObject’
object.h:20: error: candidate is: void CObject::drawImage()
object.cpp: In member function ‘bool CObject::isSelected(ptBoxLocation)’:
object.cpp:46: error: ‘stloc’ has incomplete type
object.h:15: error: forward declaration of ‘struct ptBoxLocation’
object.cpp: In member function ‘void CObject::showSelected()’:
object.cpp:57: error: ‘rine’ was not declared in this scope
make: *** [object.o] Error 1
www.nilats.net/stalin-prg.zip