Floor Colors

Open up Wl_draw.c
Goto line 972 until you see this:
/*
=====================
=
= VGAClearScreen
=
=====================
*/
void VGAClearScreen (void)
{
 unsigned ceiling=vgaCeiling[gamestate.episode*10+mapon];
  //
  // clear the screen
  //
asm mov dx,SC_INDEX
asm mov ax,SC_MAPMASK+15*256 // write through all planes
asm out dx,ax
asm mov dx,80
asm mov ax,[viewwidth]
asm shr ax,2
asm sub dx,ax     // dx = 40-viewwidth/2
asm mov bx,[viewwidth]
asm shr bx,3     // bl = viewwidth/8
asm mov bh,BYTE PTR [viewheight]
asm shr bh,1     // half height
asm mov es,[screenseg]
asm mov di,[bufferofs]
asm mov ax,[ceiling]
toploop:
asm mov cl,bl
asm rep stosw
asm add di,dx
asm dec bh
asm jnz toploop
asm mov bh,BYTE PTR [viewheight]
asm shr bh,1     // half height
asm mov ax,0x0000
bottomloop:
asm mov cl,bl
asm rep stosw
asm add di,dx
asm dec bh
asm jnz bottomloop
}
 
Change the entire thing to this:
 
/*
=====================
=
= VGAClearScreen
=
=====================
*/
void VGAClearScreen (void)
{
 unsigned ceiling=vgaCeiling[gamestate.episode*10+mapon];
 unsigned floor;
     
  if (gamestate.episode == 0 && mapon == 0)
 {
 floor = 0x0000;
 }
  
 else
 {
 floor = 0x1919;  // grey
}

  //
  // clear the screen
  //
asm mov dx,SC_INDEX
asm mov ax,SC_MAPMASK+15*256 // write through all planes
asm out dx,ax
asm mov dx,80
asm mov ax,[viewwidth]
asm shr ax,2
asm sub dx,ax     // dx = 40-viewwidth/2
asm mov bx,[viewwidth]
asm shr bx,3     // bl = viewwidth/8
asm mov bh,BYTE PTR [viewheight]
asm shr bh,1     // half height
asm mov es,[screenseg]
asm mov di,[bufferofs]
asm mov ax,[ceiling]
toploop:
asm mov cl,bl
asm rep stosw
asm add di,dx
asm dec bh
asm jnz toploop
asm mov bh,BYTE PTR [viewheight]
asm shr bh,1     // half height
asm mov ax,[floor]
    
bottomloop:
asm mov cl,bl
asm rep stosw
asm add di,dx
asm dec bh
asm jnz bottomloop
}
Every time you want to change the floor color to a new level or episode add:
example:
 
else if (gamestate.episode == 1 && mapon == 4)
 {
 floor = 0x1515;
 }
Before the:
else
 {
 floor = 0x1919;  // grey
}
This means everyone other level with have this floor color, unless you add the above code:
 
Below is a color gif. pic that shows all the colors in the wolf3d engine. Enjoy

colors.gif