Okay, this is rather simple coding change that allow you to have multiple
solid floor colors:
In wl_draw.c search for this line
Add this block under the "vgaCeiling"-table definition:
And then replace the VGAClearScreen-block with this:
solid floor colors:
In wl_draw.c search for this line
- Code:
byte vgaCeiling[]=
Add this block under the "vgaCeiling"-table definition:
- Code:
//
// Solid floor colour
byte vgaFloor[]=
{
#ifndef SPEAR
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, //episode 1
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, //episode 2
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, //episode 3
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, //episode 4
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, //episode 5
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19 //episode 6
#else
0xd7,0x09,0x03,0xde,0xdf,0x2e,0x7f,0x9e,0xae,0x7f,
0x1d,0xde,0xdf,0xde,0xdf,0xde,0xe1,0xdc,0x2e,0x1d,0xdc
#endif
};
And then replace the VGAClearScreen-block with this:
- Code:
/*
=====================
=
= VGAClearScreen
=
=====================
*/
void VGAClearScreen (void)
{
byte ceiling=vgaCeiling[gamestate.episode*10+mapon];
byte floor=vgaFloor[gamestate.episode*10+mapon];
int y;
byte *ptr = vbuf;
#ifdef USE_SHADING
for(y = 0; y < viewheight / 2; y++, ptr += vbufPitch)
memset(ptr, shadetable[GetShade((viewheight / 2 - y) << 3,0,0,0,0)][ceiling], viewwidth);
for(; y < viewheight; y++, ptr += vbufPitch)
memset(ptr, shadetable[GetShade((y - viewheight / 2) << 3,0,0,0,0)][floor], viewwidth); //0x19
#else
for(y = 0; y < viewheight / 2; y++, ptr += vbufPitch)
memset(ptr, ceiling, viewwidth);
for(; y < viewheight; y++, ptr += vbufPitch)
memset(ptr, floor, viewwidth); //0x19
#endif
}