Author |
Message |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Sun Jul 27, 2008 6:03 pm
Subject: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

 
|
|
I think I have found a quick and nice solution for those who usually play with full screen mode and doesn't like to press "TAB" all of the time to check on their health.
First off you need to input the in-game messages feature by WSJ.
Second off you need to input those lines I'll put in this tutorial ;]
in WL_DEF.H look for these lines:
::: CODE :::
void GetMessage (char *lastmessage);
void DrawMessage (void);
Underneath those lines put this line:
::: CODE :::
void DrawHltMessage (void);
After that open WL_DRAW.CPP and locate these lines:
::: CODE :::
if (messagetime > 0)
DrawMessage ();
Underneath those lines add:
::: CODE :::
if(viewsize == 21 && gamestate.weapon != -1)
DrawHltMessage ();
After that you should go to the end of the WL_DRAW.CPP file and modify this function:
::: CODE :::
/*
========================
=
= DrawMessage
=
= displays ingame messages
=
========================
*/
void DrawMessage (void)
{
messagetime-=tics;
fontnumber = 0;
// message's shadow
SETFONTCOLOR(0x0,0x1); // set the color
PrintX=7; PrintY=1;
US_Print(gamestate.message);
SETFONTCOLOR(0x4,0x0); // set the color
PrintX=8; PrintY=2; // position the message
US_Print(gamestate.message); // print message
DrawPlayBorderSides();
}
to look like this:
::: CODE :::
/*
========================
=
= DrawMessage
=
= displays ingame messages
=
========================
*/
void DrawMessage (void)
{
messagetime-=tics;
fontnumber = 0;
// message's shadow
SETFONTCOLOR(0x0,0x1); // set the color
PrintX=7; PrintY=1;
US_Print(gamestate.message);
SETFONTCOLOR(0x4,0x0); // set the color
PrintX=8; PrintY=2; // position the message
US_Print(gamestate.message); // print message
DrawPlayBorderSides();
}
void DrawHltMessage (void)
{
fontnumber = 0;
SETFONTCOLOR(0x0,0x1);
PrintX=8; PrintY=14;
US_Print("Health: ");
US_PrintUnsigned (gamestate.health);
SETFONTCOLOR(0x4,0x0);
PrintX=9; PrintY=15;
US_Print("Health: ");
US_PrintUnsigned (gamestate.health);
DrawPlayBorderSides ();
}
That's it!
Now you can play in full screen mode without pressing the "TAB" key anymore!
Hope anyone will ever use it. And if you do please don't forget to Credit WSJ for the in-game messages code.
And yeah I wouldn't mind to get a little credit too...  |
_________________ Raziel A.
|
|
 |
Tricob
Moderator

Joined: 14 Mar 2005
Last Visit: 0:22 ago.
Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.

|
Posted: Sun Jul 27, 2008 6:20 pm
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
You might want ammo displayed, too; always useful.  |
|
|
 |
RichterBelmont12
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 24 Sep 2019
Topics: 98
Posts: 1524
Location: New Jersey

|
|
 |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Sun Jul 27, 2008 6:32 pm
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
lol I have just input that code XD
I was playing and I saw something was wrong.. the ammo was missing too
it's working on the same function.. just need to duplicate it and change the gamestate.health to gamestate.ammo
[edit]:
One thing though.. if anyone can please answer..
How can I input a picture near to where it says, Health: or Ammo: ??
I would really like to know that!  |
_________________ Raziel A.
|
|
 |
Tricob
Moderator

Joined: 14 Mar 2005
Last Visit: 0:22 ago.
Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.

|
|
 |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Mon Jul 28, 2008 5:03 am
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
the pic is from the VGAGRAPH. Hmm.. I don't really know much about coordinates :\
so I can't answer on that >_< I just now that the Score: message that I made to show the scores on the top of the screen is: X axis: 8 and Y axis is: 14
that's all I know.. Hope it helps :/ |
_________________ Raziel A.
|
|
 |
Tricob
Moderator

Joined: 14 Mar 2005
Last Visit: 0:22 ago.
Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.

|
|
 |
Zombie_Plan
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 2:57 ago.
Topics: 111
Posts: 1763
Location: A hole in the wall

|
|
 |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Wed Jul 30, 2008 5:18 am
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
Tricob wrote:
You'll need your code to be something like this. Change "PG13PIC" to whatever name is the chunk of VGAGRAPH you want to show up, such as HEALTHPIC.
You'll have to tinker with "160" to have it as close to the health and ammo as you'd like.
::: CODE :::
CA_CacheGrChunk (PG13PIC);
VWB_DrawPic (160, 0, PG13PIC);
UNCACHEGRCHUNK (PG13PIC);
and where exactly I put those lines? |: |
_________________ Raziel A.
|
|
 |
Tricob
Moderator

Joined: 14 Mar 2005
Last Visit: 0:22 ago.
Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.

|
Posted: Wed Jul 30, 2008 10:42 pm
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
Raziel wrote:
and where exactly I put those lines? |:
I'd just place it in DrawHltMessage, right before the command -
::: CODE :::
DrawPlayBorderSides ();
|
|
|
 |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Thu Jul 31, 2008 1:14 am
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
Okay cool it worked. i still need to make the background of the image that I put transparent...
I think I know how to fix that.. But if not I'll just ask  |
_________________ Raziel A.
|
|
 |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Thu Jul 31, 2008 1:41 am
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

  
|
|
Now there is still one more thing. How do I put BJ's face on the screen? I mean the animated face..
Hope there's an easy way to do this >_<
Ah, and the keys, I was wondering about that for some time now.. It's more urgent than the animated face issue.
Thanks again for all of the help
p.s.
Sorry for the double posting! |
_________________ Raziel A.
|
|
 |
Tricob
Moderator

Joined: 14 Mar 2005
Last Visit: 0:22 ago.
Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.

|
|
 |
Raziel
DieHard SS

Joined: 03 Dec 2005
Last Visit: 03 Dec 2009
Topics: 49
Posts: 485
Location: Israhell

|
Posted: Thu Jul 31, 2008 8:07 pm
Subject: Re: [CODE] Health Shown as a message with full screen view
[ IP : Logged ]
|

 
|
|
nvm that. I remembered how to fix it ;]
so I got his face, and the keys displayed pretty well..
Thanks for the help though! I really appreciate the efforts. |
_________________ Raziel A.
|
|
 |
|