Hi!
In WL_GAME.CPP I add some new doors to case number 105 (this is 4 new doors) and everything works fine...
Where is the problem? Well, I found that cases from number 106 are reserved to floors, then I moved case number for more 2 new doors to 144 (this is the first tile after floor tiles).
I used Chaos edit to add textures, tile configuration and put that new doors on map.(There is everything ok. I attached sprinfo)
Everything is ok in WL_DEF.H too:
WL_DEF.H related code:
typedef enum {
dr_normal,
dr_lock1,
dr_lock2,
dr_lock3,
dr_lock4,
dr_elevator,
dr_lock5,
dr_lock6,
dr_lock5keys,
dr_wood
} door_t;
----------------------------------------------
I have problem with these last two doors.
WL_DRAW.CPP code related to doors:
#define DOORWALL (PMSpriteStart-30)
.............................
.............................
/*
====================
= HitVertWall - Adjacent textures
====================
*/
switch(doorobjlist[tilemap[xtile-xtilestep][ytile] & 0x80-1].lock)
{
case dr_normal:
wallpic = DOORWALL+3;
break;
case dr_lock1:
case dr_lock2:
case dr_lock3:
case dr_lock4:
case dr_lock5:
case dr_lock6:
case dr_lock5keys:
wallpic = DOORWALL+11;
break;
case dr_elevator:
wallpic = DOORWALL+9;
break;
case dr_wood:
wallpic = DOORWALL+29;
break;
}
}
else
wallpic = vertwall[tilehit & ~0x40];
/*
====================
= HitHorizWall - Adjacent textures
====================
*/
switch(doorobjlist[tilemap[xtile][ytile-ytilestep] & 0x80-1].lock)
{
case dr_normal:
wallpic = DOORWALL+2;
break;
case dr_lock1:
case dr_lock2:
case dr_lock3:
case dr_lock4:
case dr_lock5:
case dr_lock6:
case dr_lock5keys:
wallpic = DOORWALL+10;
break;
case dr_elevator:
wallpic = DOORWALL+8;
break;
case dr_wood:
wallpic = DOORWALL+28;
break;
}
}
else
wallpic = horizwall[tilehit & ~0x40];
/*
====================
= HitHorizDoor
====================
*/
switch(doorobjlist[doornum].lock)
{
case dr_normal:
doorpage = DOORWALL;
break;
case dr_lock1:
doorpage = DOORWALL+12;
break;
case dr_lock2:
doorpage = DOORWALL+14;
break;
case dr_lock3:
doorpage = DOORWALL+16;
break;
case dr_lock4:
doorpage = DOORWALL+18;
break;
case dr_elevator:
doorpage = DOORWALL+4;
break;
case dr_lock5:
doorpage = DOORWALL+20;
break;
case dr_lock6:
doorpage = DOORWALL+22;
break;
case dr_lock5keys:
doorpage = DOORWALL+24;
break;
case dr_wood:
doorpage = DOORWALL+26;
break;
}
/*
====================
= HitVertDoor
====================
*/
switch(doorobjlist[doornum].lock)
{
case dr_normal:
doorpage = DOORWALL+1;
break;
case dr_lock1:
doorpage = DOORWALL+13;
break;
case dr_lock2:
doorpage = DOORWALL+15;
break;
case dr_lock3:
doorpage = DOORWALL+17;
break;
case dr_lock4:
doorpage = DOORWALL+19;
break;
case dr_elevator:
doorpage = DOORWALL+5;
break;
case dr_lock5:
doorpage = DOORWALL+21;
break;
case dr_lock6:
doorpage = DOORWALL+23;
break;
case dr_lock5keys:
doorpage = DOORWALL+25;
break;
case dr_wood:
doorpage = DOORWALL+27;
break;
}
--------------------------------------------------------
WL_GAME.CPP spawn doors code:
if ((tile >= 90 && tile <= 105) || (tile >= 144 && tile <= 147))
{
// door
switch (tile)
{
case 90:
case 92:
case 94:
case 96:
case 98:
case 100:
case 102:
case 104:
SpawnDoor (x,y,1,(tile-90)/2);
break;
case 144:
case 146:
SpawnDoor (x,y,1,(tile-144)/2);
break;
case 91:
case 93:
case 95:
case 97:
case 99:
case 101:
case 103:
case 105:
SpawnDoor (x,y,0,(tile-91)/2);
break;
case 145:
case 147:
SpawnDoor (x,y,0,(tile-145)/2);
break;
}
}
--------------------------------------------------------
When I run game with this WL_GAME.CPP code, instead of wooden doors there are normal doors, instead of 5-lock doors there are gold key doors for horizontal and silver key doors for vertical.
When I run game with changed values there are no object in game or there are some certain walls..
Thank you.
In WL_GAME.CPP I add some new doors to case number 105 (this is 4 new doors) and everything works fine...
Where is the problem? Well, I found that cases from number 106 are reserved to floors, then I moved case number for more 2 new doors to 144 (this is the first tile after floor tiles).
I used Chaos edit to add textures, tile configuration and put that new doors on map.(There is everything ok. I attached sprinfo)
Everything is ok in WL_DEF.H too:
WL_DEF.H related code:
typedef enum {
dr_normal,
dr_lock1,
dr_lock2,
dr_lock3,
dr_lock4,
dr_elevator,
dr_lock5,
dr_lock6,
dr_lock5keys,
dr_wood
} door_t;
----------------------------------------------
I have problem with these last two doors.
WL_DRAW.CPP code related to doors:
#define DOORWALL (PMSpriteStart-30)
.............................
.............................
/*
====================
= HitVertWall - Adjacent textures
====================
*/
switch(doorobjlist[tilemap[xtile-xtilestep][ytile] & 0x80-1].lock)
{
case dr_normal:
wallpic = DOORWALL+3;
break;
case dr_lock1:
case dr_lock2:
case dr_lock3:
case dr_lock4:
case dr_lock5:
case dr_lock6:
case dr_lock5keys:
wallpic = DOORWALL+11;
break;
case dr_elevator:
wallpic = DOORWALL+9;
break;
case dr_wood:
wallpic = DOORWALL+29;
break;
}
}
else
wallpic = vertwall[tilehit & ~0x40];
/*
====================
= HitHorizWall - Adjacent textures
====================
*/
switch(doorobjlist[tilemap[xtile][ytile-ytilestep] & 0x80-1].lock)
{
case dr_normal:
wallpic = DOORWALL+2;
break;
case dr_lock1:
case dr_lock2:
case dr_lock3:
case dr_lock4:
case dr_lock5:
case dr_lock6:
case dr_lock5keys:
wallpic = DOORWALL+10;
break;
case dr_elevator:
wallpic = DOORWALL+8;
break;
case dr_wood:
wallpic = DOORWALL+28;
break;
}
}
else
wallpic = horizwall[tilehit & ~0x40];
/*
====================
= HitHorizDoor
====================
*/
switch(doorobjlist[doornum].lock)
{
case dr_normal:
doorpage = DOORWALL;
break;
case dr_lock1:
doorpage = DOORWALL+12;
break;
case dr_lock2:
doorpage = DOORWALL+14;
break;
case dr_lock3:
doorpage = DOORWALL+16;
break;
case dr_lock4:
doorpage = DOORWALL+18;
break;
case dr_elevator:
doorpage = DOORWALL+4;
break;
case dr_lock5:
doorpage = DOORWALL+20;
break;
case dr_lock6:
doorpage = DOORWALL+22;
break;
case dr_lock5keys:
doorpage = DOORWALL+24;
break;
case dr_wood:
doorpage = DOORWALL+26;
break;
}
/*
====================
= HitVertDoor
====================
*/
switch(doorobjlist[doornum].lock)
{
case dr_normal:
doorpage = DOORWALL+1;
break;
case dr_lock1:
doorpage = DOORWALL+13;
break;
case dr_lock2:
doorpage = DOORWALL+15;
break;
case dr_lock3:
doorpage = DOORWALL+17;
break;
case dr_lock4:
doorpage = DOORWALL+19;
break;
case dr_elevator:
doorpage = DOORWALL+5;
break;
case dr_lock5:
doorpage = DOORWALL+21;
break;
case dr_lock6:
doorpage = DOORWALL+23;
break;
case dr_lock5keys:
doorpage = DOORWALL+25;
break;
case dr_wood:
doorpage = DOORWALL+27;
break;
}
--------------------------------------------------------
WL_GAME.CPP spawn doors code:
if ((tile >= 90 && tile <= 105) || (tile >= 144 && tile <= 147))
{
// door
switch (tile)
{
case 90:
case 92:
case 94:
case 96:
case 98:
case 100:
case 102:
case 104:
SpawnDoor (x,y,1,(tile-90)/2);
break;
case 144:
case 146:
SpawnDoor (x,y,1,(tile-144)/2);
break;
case 91:
case 93:
case 95:
case 97:
case 99:
case 101:
case 103:
case 105:
SpawnDoor (x,y,0,(tile-91)/2);
break;
case 145:
case 147:
SpawnDoor (x,y,0,(tile-145)/2);
break;
}
}
--------------------------------------------------------
When I run game with this WL_GAME.CPP code, instead of wooden doors there are normal doors, instead of 5-lock doors there are gold key doors for horizontal and silver key doors for vertical.
When I run game with changed values there are no object in game or there are some certain walls..
Thank you.
Last edited by Josip_2P2 on Tue Feb 12, 2019 1:47 am; edited 1 time in total