(Old code tutorial) Yet another new DrawAmmo routine from Wolf Planet forum

Go down

(Old code tutorial) Yet another new DrawAmmo routine from Wolf Planet forum

Post by Officer-M. John (Admin) on Sun Mar 27, 2016 8:54 am

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

Writte by Deathshead on Fri Mar 04, 2005 7:58 am
avatar
Officer-M. John (Admin)
Admin

Posts : 377
Join date : 2015-10-02
Age : 20

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum