Replace message initialisation routines by static arrays.
This commit is contained in:
parent
6467b72501
commit
ad19fe2672
|
@ -20,61 +20,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "Starfighter.h"
|
#include "Starfighter.h"
|
||||||
|
|
||||||
static char deathMessage[6][50];
|
static const char *deathMessage[6] = {
|
||||||
static char killMessage[10][50];
|
"Oh my God... No!",
|
||||||
static char missFireMessage[5][50];
|
"NOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!",
|
||||||
static char playerHitMessage[3][50];
|
"Please tell me that didn't just happen...",
|
||||||
|
"Chris, Answer Me!!",
|
||||||
|
"What the hell happened?!",
|
||||||
|
"Chriiiiiiiiiiiiiiiiiiiiiiiiiiis!!!!",
|
||||||
|
};
|
||||||
|
|
||||||
static void setKillMessages()
|
static const char *killMessage[10] = {
|
||||||
{
|
"Chalk another one up for me!",
|
||||||
strcpy(killMessage[0], "Chalk another one up for me!");
|
"That'll teach you!",
|
||||||
strcpy(killMessage[1], "That'll teach you!");
|
"One more for me!",
|
||||||
strcpy(killMessage[2], "One more for me!");
|
"Target destroyed!",
|
||||||
strcpy(killMessage[3], "Target destroyed!");
|
"You aint so tough!",
|
||||||
strcpy(killMessage[4], "You aint so tough!");
|
"Kicked your ass!",
|
||||||
strcpy(killMessage[5], "Kicked your ass!");
|
|
||||||
|
|
||||||
strcpy(killMessage[6], "That takes me up to %d");
|
"That takes me up to %d",
|
||||||
|
|
||||||
strcpy(killMessage[7], "Hey %s, you asleep over there?!");
|
"Hey %s, you asleep over there?!",
|
||||||
strcpy(killMessage[8], "I'm catching up with you, %s!");
|
"I'm catching up with you, %s!",
|
||||||
|
|
||||||
strcpy(killMessage[9], "Number One, Baby!");
|
"Number One, Baby!",
|
||||||
}
|
};
|
||||||
|
|
||||||
static void setPlayerDeadMessages()
|
static const char *missFireMessage[5] = {
|
||||||
{
|
"I am NOT your enemy!",
|
||||||
strcpy(deathMessage[0], "Oh my God... No!");
|
"Hey! Watch it!",
|
||||||
strcpy(deathMessage[1], "NOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!");
|
"What are you doing?! Shoot THEM!",
|
||||||
strcpy(deathMessage[2], "Please tell me that didn't just happen...");
|
"OW!!! I hope that was an accident!",
|
||||||
strcpy(deathMessage[3], "Chris, Answer Me!!");
|
"Open your eyes!!",
|
||||||
strcpy(deathMessage[4], "What the hell happened?!");
|
};
|
||||||
strcpy(deathMessage[5], "Chriiiiiiiiiiiiiiiiiiiiiiiiiiis!!!!");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setMissFireMessages()
|
static const char *playerHitMessage[3] = {
|
||||||
{
|
"Oops! Sorry!",
|
||||||
strcpy(missFireMessage[0], "I am NOT your enemy!");
|
"Get out of the way!",
|
||||||
strcpy(missFireMessage[1], "Hey! Watch it!");
|
"Don't fly into my missiles!",
|
||||||
strcpy(missFireMessage[2], "What are you doing?! Shoot THEM!");
|
};
|
||||||
strcpy(missFireMessage[3], "OW!!! I hope that was an accident!");
|
|
||||||
strcpy(missFireMessage[4], "Open your eyes!!");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setHitPlayerMessages()
|
|
||||||
{
|
|
||||||
strcpy(playerHitMessage[0], "Oops! Sorry!");
|
|
||||||
strcpy(playerHitMessage[1], "Get out of the way!");
|
|
||||||
strcpy(playerHitMessage[2], "Don't fly into my missiles!");
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAllyMessages()
|
|
||||||
{
|
|
||||||
setKillMessages();
|
|
||||||
setPlayerDeadMessages();
|
|
||||||
setMissFireMessages();
|
|
||||||
setHitPlayerMessages();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getKillMessage(object *ally)
|
void getKillMessage(object *ally)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue