I want an outside file that GE creates when you execute the save function.
void loadLvl()
{
int i;
FILE * lvlF;
lvlF=fopen(LoadSaveTag, "rb");
if(lvlF)
{
fread(STORAGE, sizeof(STORAGE), 1, lvlF);
i=ASIZE*6;
tACTORCOUNT = STORAGE[i];
oACTORCOUNT = STORAGE[i+1];
for(i=0; i<ASIZE-1; i++)
{
tAnim[i]=STORAGE[i];
oAnim[i]=STORAGE[i+ASIZE];
tX[i]=STORAGE[i+ASIZE*2];
tY[i]=STORAGE[i+ASIZE*3];
oX[i]=STORAGE[i+ASIZE*4];
oY[i]=STORAGE[i+ASIZE*5];
}
}
fclose(lvlF);
}
void saveLvl()
{
int i;
FILE * lvlF;
lvlF=fopen(LoadSaveTag, "wb");
if(lvlF)
{
for(i=0; i<ASIZE-1; i++)
{
STORAGE[i]=tAnim[i];
STORAGE[i+ASIZE]=oAnim[i];
STORAGE[i+ASIZE*2]=tX[i];
STORAGE[i+ASIZE*3]=tY[i];
STORAGE[i+ASIZE*4]=oX[i];
STORAGE[i+ASIZE*5]=oY[i];
}
i=ASIZE*6;
STORAGE[i]=tACTORCOUNT;
STORAGE[i+1]=oACTORCOUNT;
fwrite(STORAGE, sizeof(STORAGE), 1, lvlF);
}
fclose(lvlF);
}
+I live near you....
so which way are you wanting to do it in?
hmmm really where? if you dont mind?
Users browsing this forum: No registered users and 1 guest