Hello everyone! I have a problem with Adding teleporters to Wolf4SDL. I'll get straight to the point!
So i've wanted to use MCS's Teleport code in my SDL Modl, but several errors has been occured while compiling.
Let's just say, i followed the tutorial completly, from A to Z. (Nothing was missed, i've checked it several times!)
But one thing i've changed in the code was the PlaySound section in void WarpPlayer (wl_agent.cpp)
I've changed this in the original code:
Into this:,
because we all know that Wolf4SDL doesn't use DMA, TimeCount and such anymore.
So this is how my WarpPlayer section looks like.
Now, here is the problem: When i trying to compile it, error messages pops up, while pointing at DrawPlayerWeapon(); :
Not understanding any of these, i've decided to comment out the two DrawPlayerWeapon(); line in the code. When i tried to compile it again, "Linker" errors appeared:
And so on, i was stuck with this. Sorry for explaining my problem that long, but i've wanted to give a full description of it.
Sadly, i'm not a code expert. I would thank any help!
So i've wanted to use MCS's Teleport code in my SDL Modl, but several errors has been occured while compiling.
Let's just say, i followed the tutorial completly, from A to Z. (Nothing was missed, i've checked it several times!)
But one thing i've changed in the code was the PlaySound section in void WarpPlayer (wl_agent.cpp)
I've changed this in the original code:
- Code:
SD_PlaySound (BOSSACTIVESND);
if (DigiMode != sds_Off)
{
long lasttimecount = TimeCount;
while(TimeCount < lasttimecount+35) //adjust warp duration here
SD_Poll();
}
else
VW_WaitVBL(1*50);
Into this:,
- Code:
SD_PlaySound (BOSSACTIVESND);
VW_WaitVBL(100);
because we all know that Wolf4SDL doesn't use DMA, TimeCount and such anymore.
So this is how my WarpPlayer section looks like.
- Code:
void WarpPlayer (int facedir)
{
objtype *check;
int x,y;
buttonstate[bt_attack] = false;
buttonheld[bt_attack] = false;
gamestate.attackframe = 0;
gamestate.weaponframe = 0;
DrawPlayerWeapon();
ThreeDRefresh();
switch (facedir)
{
case EAST:
check = actorat[warpex][warpey];
if (check > objlist && (check->flags & FL_SHOOTABLE))
KillActor(check);
SpawnPlayer(warpex,warpey,facedir);
break;
case WEST:
check = actorat[warpwx][warpwy];
if (check > objlist && (check->flags & FL_SHOOTABLE))
KillActor(check);
SpawnPlayer(warpwx,warpwy,facedir);
break;
}
SD_PlaySound (BOSSACTIVESND);
VW_WaitVBL(100);
buttonstate[bt_attack] = false;
buttonheld[bt_attack] = false;
gamestate.attackframe = 0;
gamestate.weaponframe = 0;
DrawPlayerWeapon();
ThreeDRefresh();
}
Now, here is the problem: When i trying to compile it, error messages pops up, while pointing at DrawPlayerWeapon(); :
Not understanding any of these, i've decided to comment out the two DrawPlayerWeapon(); line in the code. When i tried to compile it again, "Linker" errors appeared:
And so on, i was stuck with this. Sorry for explaining my problem that long, but i've wanted to give a full description of it.
Sadly, i'm not a code expert. I would thank any help!
Last edited by kkk911 on Mon Jul 14, 2014 7:08 am; edited 1 time in total