In
this tutorial you're
going to learn how to
change the screen border
color. I'd like to thank
Brian Rowan for the
basic tutorial of this.
You could say that this
is HIS tutorial, I only
pointed out where to
find the lines
necessary. This tutorial
is especially written
for people who are
creating new status
bars(like me). Ready?
GO!
There
are 4 different values
that can be set
independently: The
screen background color
on the "Get Psyched!"
screen(defined in
WL_INTER.C), the border
color while you're
playing(defined in
WL_GAME.C and WL_MENU.H)
and
the Intermission border
color(defined in
WL_INTER.C).
Since
the colors of the
VWB_Bar are not using
the normal palette but a
decimal palette index,
use the following colors
if you'd like(for the
brighter ones, just
enter the color you'd
like to use, minus 1 or
more) and try to be
creative with this. Just
make sure it fits with
your status bar, that's
really important!
Dark
grey 29
Purple 191
Mustard 78
Light blue 141
Dark blue 157
Dark red 45
Dark brown 221
Cyan 127
Green 111
Purplish blue 174
Black 0
Step
1. Open up WL_GAME.C and
do a search for
"DrawPlayBorderSides".
Now youll see
this:
/*
===================
=
= DrawPlayBorderSides
=
= To fix window overwrites
=
===================
*/
void DrawPlayBorderSides (void)
{
int
xl,yl;
xl = 160-viewwidth/2;
yl =
(200-STATUSLINES-viewheight)/2;
VWB_Bar
(0,0,xl-1,200-STATUSLINES,127);
VWB_Bar
(xl+viewwidth+1,0,xl-2,200-STATUSLINES,127);
VWB_Vlin
(yl-1,yl+viewheight,xl-1,0);
VWB_Vlin
(yl-1,yl+viewheight,xl+viewwidth,125);
}
Now,
for example, to use a
grey border, use this:
/*
===================
=
= DrawPlayBorderSides
=
= To fix window overwrites
=
===================
*/
void DrawPlayBorderSides (void)
{
int
xl,yl;
xl = 160-viewwidth/2;
yl =
(200-STATUSLINES-viewheight)/2;
VWB_Bar
(0,0,xl-1,200-STATUSLINES,29);
VWB_Bar
(xl+viewwidth+1,0,xl-2,200-STATUSLINES,29);
VWB_Vlin
(yl-1,yl+viewheight,xl-1,0);
VWB_Vlin
(yl-1,yl+viewheight,xl+viewwidth,29);
}
Step
2. We now need to draw
the play border itself.
Do a search for
"DrawPlayBorder". There
you see:
/*
===================
=
= DrawPlayBorder
=
===================
*/
void DrawPlayBorder (void)
{
int
xl,yl;
VWB_Bar
(0,0,320,200-STATUSLINES,127);
xl = 160-viewwidth/2;
yl =
(200-STATUSLINES-viewheight)/2;
VWB_Bar
(xl,yl,viewwidth,viewheight,0);
VWB_Hlin
(xl-1,xl+viewwidth,yl-1,0);
VWB_Hlin
(xl-1,xl+viewwidth,yl+viewheight,125);
VWB_Vlin
(yl-1,yl+viewheight,xl-1,0);
VWB_Vlin
(yl-1,yl+viewheight,xl+viewwidth,125);
VWB_Plot
(xl-1,yl+viewheight,124);
}
Now,
for example, to use a
grey border, use this:
/*
===================
=
= DrawPlayBorder
=
===================
*/
void DrawPlayBorder (void)
{
int
xl,yl;
VWB_Bar
(0,0,320,200-STATUSLINES,29);
xl = 160-viewwidth/2;
yl =
(200-STATUSLINES-viewheight)/2;
VWB_Bar
(xl,yl,viewwidth,viewheight,0);
VWB_Hlin
(xl-1,xl+viewwidth,yl-1,28);
VWB_Hlin
(xl-1,xl+viewwidth,yl+viewheight,28);
VWB_Vlin
(yl-1,yl+viewheight,xl-1,28);
VWB_Vlin
(yl-1,yl+viewheight,xl+viewwidth,28);
VWB_Plot
(xl-1,yl+viewheight,28);
}
See?
It's not that hard. Now,
you can just experiment
a bit with this. Now,
compile WL_GAME.C and
close it. It's time to
change both the
Intermission screen and
the "Get Psyched!"
screen in one blow, OK?
Step
3. Open up WL_INTER.C
and do a search for
,127. Each time you find
this, you should see:
VWB_Bar
(0,0,320,200-STATUSLINES,127);
Then
simply change the 127
with another color. Make
sure it matches the
color you used in
WL_GAME.C(or not,
whatever you want)!
Step
4. Save and compile
WL_INTER.C .
However, we still need
to tell the menu that
the bottom of the
statusbar's space is
also the color we had in
WL_GAME.C.
Step
5. Open up WL_MENU.H and
do a search for
VIEWCOLOR. then you
should see:
#define
VIEWCOLOR
0x7d
Step
6. Change that to the
EXACT color you used in
WL_GAME.C and save.
Step
7. Compile all edited
files and link it all
up. Now you have:
A
re-colored border;
A
re-colored intermission
screen;
A
re-colored "Get
Psyched!" screen.
Again,
this tutorial isn't
really mine. I just
edited it so that you
can find all stuff you
need quickly. However,
credits go mostly to
Brian Rowan. Thanks a
million Brian, without
you I would never have
found it. I mean
it.
Get
back to the Dome
tutorials
Jump
to the
top
|