• Welcome to The Desert Colossus.
 

News:

Welcome to the Desert!  Register, post, and have fun.  Why not introduce yourself in the
Welcome Thread?

Main Menu

Re: I'm so geeky game

Started by DarkZelda, October 22, 2008, 01:59:28 PM

Previous topic - Next topic

DarkZelda

*continued from previous post*
Contents of KH_HUD.cpp

#include <allegro.h>
#include <iostream>
#include <cmath>
#include <ctime>
#include <cmath>
#include <string>
#include <sstream>
#include <cstdlib>
#define pi 3.1415926535
#define null NULL
#define SCREEN_W 640
#define SCREEN_H 480
#include "allegset.h"
#include "HUD_outline.h"
using namespace std;

//***************************************************
//                 Player Class
// The class containing all the information that will
// be used in the HUD.
//***************************************************

class Player
{
      private:
              int HP,
                  MP,
                  maxHP,
                  maxMP,
                  tempHP;
              BITMAP *face; // We'll need to allocate new memory later!
      public:
             Player() // Player's default constructor.
             {
              HP = 30;
              maxHP = 30;
              maxMP = 100;
              MP = 100;
              face = NULL;
              tempHP = HP;
              face = null;
             
              face = load_bitmap("F:\\Dev-Cpp\\High Health.bmp",null);
             }
             int getHP() {return HP;}
             int getMP() {return MP;}
             int getmaxHP() {return maxHP;}
             int getmaxMP() {return maxMP;}
             void addmaxHP(int x) {maxHP += x;}
             void addHP(int x) {HP += x;}
             //void damage_check(int, int); // Void version of damage_check
             BITMAP * damage_check(int,int); // Bitmap version of damage_check
             BITMAP * get_face() {return face;} // An accessor that returns
                                                 // the bitmap of the player's
                                                 // face.
            
}; // End class definition.

BITMAP * Player::damage_check(int currentHP, int beforeHP)
{
bool damage = false; // Initialize the damage flag to false.

if (currentHP >= beforeHP)
    damage = false;
else if (currentHP < beforeHP && HP > 0)
    damage = true;

if (damage == false)
{
    if (currentHP > (*this).maxHP / 4) // If you have more than a quarter of your max HP left...
       (*this).face = load_bitmap("F:\\Dev-Cpp\\High Health.bmp",null); // ...you're good to go!
    else // If not...
       (*this).face = load_bitmap("F:\\Dev-Cpp\\Low Health.bmp",null); // ...you're screwed.
}
else // If damage IS taken...
    (*this).face = load_bitmap("F:\\Dev-Cpp\\Damage.bmp",null); // All hail the animation
                         

DarkZelda

Example;
I'm so geeky that I'm on my blackberry on TDC during church.

(Second post because my phone is weird.)

Keaton

I'm so geeky that I have 12 computers in my apartment right now, and spend more time with them than I do with the lovely ladies with whom I room.

DarkZelda

(You moght have just won there. :-p)
I'm so geeky that I carry a DS lite, SP, and gameboy color in my purse all the time.
With extra games.

Keaton

I'm so geeky, the last party I went to (actually, I hosted it) was a LAN party.

Zelda Veteran

Quote from: Davy Jones on October 22, 2008, 02:22:42 PM
I'm so geeky, the last party I went to (actually, I hosted it) was a LAN party.
I'm so geeky, that that actually sounded like an awesome party. Wish I coulda gone :/

My real Poison team in BW2. They all have perfect natures and EV's. I went the extra distance and bred the right IV's into them. Come at me bro.

DW

I'm so geeky I can't think of anything humorous to write.
­

MagmarFire

I'm so geeky I sometimes do math just for fun.



Advanceshipping and Rion had better be Chuck Norris approved.

DarkZelda

I'm so geeky, I listen to geek podcasts.




Over and over again.

Carpet Merchant

#9
I'm so geeky that I've seen every Doctor Who episode since the 60s.


EDIT:
Geez, it's been a week. did I win?

DarkZelda

Haha mabye.
Because that is rather geeky I must admit.

But I'm so geeky, I use chatspeak.

"LAWLZ N00B"

MagmarFire

#include <iostream>
#include <string>
using namespace std;

int main()
{
string _1337 = "I'm so geeky that I'm using C++ to talk.";

cout << _1337 << endl;
return 0;
}



Advanceshipping and Rion had better be Chuck Norris approved.

Zelda Veteran

Magmar Wins.
END OF STORY.                                                  sequel?

My real Poison team in BW2. They all have perfect natures and EV's. I went the extra distance and bred the right IV's into them. Come at me bro.

DarkZelda

Holy Crap.
Can anyone beat Magma Fire?
+1 Internets in Wookie
+2 Internets in Klingon
+over 9000 internets in hylian.

MagmarFire

WHAT, NINE THOUSAND!? O.o

You know, I'm not sure if I should be flattered or ashamed. :P



Advanceshipping and Rion had better be Chuck Norris approved.