Wolf Planet Forum Index Wolf Planet
We want you here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[code] Yet another new DrawAmmo routine

 
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance
View previous topic :: View next topic  
Author Message
Deathshead
Corporal


Joined: 18 Feb 2005
Posts: 87

PostPosted: Fri Mar 04, 2005 7:58 am    Post subject: [code] Yet another new DrawAmmo routine Reply with quote

This is the DrawAmmo routine I am using for Extremeties. I thought I would share it with everyone.

Simply replace the DrawAmmo routine with this:

Code:

/*==
==== DrawAmmo
==== Editted by Deathshead
====
==== This is another variation of the original DrawAmmo
==== routine. For each weapon, make the ammo variable equal
==== to the necessary ammotype for the weapon.
==*/

void   DrawAmmo (void)
{
   char   ammo;

   switch (gamestate.weapon)
   {
      case wp_knife:
         break;
      case wp_pistol:
      case wp_machinegun:
      case wp_chaingun:
         ammo = gamestate.ammo;
         break;
   }
   LatchNumber (27,16,2,ammo);
}


I'm 90% sure this saves memory, as you don't need to call LatchNumber(); so many times. It also displays zero ammo when the knife is selected, and can be easily customized to suit your needs. My full one houses ammotypes for all weapons, and a few other things Smile .

If you use this, remember me in the credits.

There you go
-Deathshead
_________________
Myspace
VampireFreaks
Music4Life
Wolfing Time
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance All times are GMT
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.