J
JoeC
It is me again with the same problem with my game. I can get data from
one object to another.
I have my player play graphic stored in a vector. I would like to get
that data out of tha object and display my graphics in the part that
displays the graphics. I have made significant changes in my program
but I can't get it to work.
class space{
char gchar;
graphic *gr;
graphic *grDefault;
graphic *cgr;
player * play;
bool seen;
graphic& space::graphicOut(){
if(play){
vector<BYTE>t;
play->data(t);
cgr = new graphic(t);
return *cgr;
}
//if(play){return *cgr;}
if(seen){return *gr;}
else {return *grDefault;}
}
void data(vector<BYTE>& d){
for(int lp = 0; lp != 32; lp++){
//d.push_back(gData[lp]);
}
}
I have been trying many thing to make this work I down't understand why
I can't return the graphics vector or the individual datas to retrun
out of this object.
one object to another.
I have my player play graphic stored in a vector. I would like to get
that data out of tha object and display my graphics in the part that
displays the graphics. I have made significant changes in my program
but I can't get it to work.
class space{
char gchar;
graphic *gr;
graphic *grDefault;
graphic *cgr;
player * play;
bool seen;
graphic& space::graphicOut(){
if(play){
vector<BYTE>t;
play->data(t);
cgr = new graphic(t);
return *cgr;
}
//if(play){return *cgr;}
if(seen){return *gr;}
else {return *grDefault;}
}
void data(vector<BYTE>& d){
for(int lp = 0; lp != 32; lp++){
//d.push_back(gData[lp]);
}
}
I have been trying many thing to make this work I down't understand why
I can't return the graphics vector or the individual datas to retrun
out of this object.