Code: Select all
//Global data required in included functions below
int Zindex;
//this is needed by KOS
#define _arch_dreamcast
#include <kos.h>
#include <stdlib.h>
#include <cmath>
//#include <cstring>
#include <png/png.h>
//Include game sources
#include "Image.cpp"
#include "GameHeader.h"
#include "Input.cpp"
#include "Player.h"
//Include some standard stuff
#include <list>
using namespace std;
//Create a list to hold all the objects
list<Object*> Objects;
Code: Select all
class Object
{
public:
virtual void Update() = 0;
virtual void Draw() = 0;
virtual void Delete() = 0;
};
Code: Select all
class Player : public Object
{
public:
float x,y,xvel,yvel;
float facing;
int frame;
int frame_counter;
Image character_set;
int life;
int score;
int invincible;
int coins_collected;
int enemies_killed;
int looking_up;
int going_pipe;
int going_door;
bool captain;
void Update()
{
}
void Draw()
{
}
void Delete()
{
}
};
Code: Select all
list<Object*>::iterator itr;
for(itr=Objects.begin(); itr!=Objects.end(); ++itr)
{
(*itr)->Update();
}
I simply don't understand... and this is serously hendering me from making homebrews. Does anybody see what could possibly be wrong here?Dang'ol'compiler wrote:In file included from /cygdrive/c/DevKitDC/include/g++-v3/bits/std_cwchar.h:39,
from /cygdrive/c/DevKitDC/include/g++-v3/bits/fpos.h:40,
from /cygdrive/c/DevKitDC/include/g++-v3/bits/std_iosfwd.h:41,
from /cygdrive/c/DevKitDC/include/g++-v3/bits/stl_algobase.h:77,
from /cygdrive/c/DevKitDC/include/g++-v3/bits/std_list.h:61,
from /cygdrive/c/DevKitDC/include/g++-v3/list:31,
from BlaaBlaa.cpp:26:
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:55: `clock_t' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:57: `tm' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:59: `clock' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:61: `mktime' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:63: `asctime' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:64: `ctime' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:65: `gmtime' not declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:66: `localtime' not
declared
/cygdrive/c/DevKitDC/include/g++-v3/bits/std_ctime.h:67: `strftime' not
declared
NMAKE : fatal error U1077: 'C:\DevKitDC\bin\g++.exe' : return code '0x1'
Stop.
Error executing NMAKE.
BlaaBlaa.exe - 1 error(s), 0 warning(s)