Add HUD_init_message_literal for preformatted text strings
This commit is contained in:
parent
5b1b870551
commit
63dc72ba4a
|
@ -1092,7 +1092,7 @@ void save_screen_shot(int automap_flag)
|
|||
|
||||
if (!GameArg.DbgGlReadPixelsOk){
|
||||
if (!automap_flag)
|
||||
HUD_init_message(HM_DEFAULT, "glReadPixels not supported on your configuration");
|
||||
HUD_init_message_literal(HM_DEFAULT, "glReadPixels not supported on your configuration");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1423,7 +1423,7 @@ void InitMarkerInput ()
|
|||
if (Game_mode & GM_MULTI)
|
||||
i = !LastMarkerDropped; //in multi, replace older of two
|
||||
else {
|
||||
HUD_init_message(HM_DEFAULT, "No free marker slots");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No free marker slots");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ void start_rendered_endlevel_sequence()
|
|||
|
||||
start_endlevel_flythrough(0,ConsoleObject,cur_fly_speed); //initialize
|
||||
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_EXIT_SEQUENCE );
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_EXIT_SEQUENCE );
|
||||
|
||||
outside_mine = ext_expl_playing = 0;
|
||||
|
||||
|
|
|
@ -479,7 +479,7 @@ void set_escort_special_goal(int special_key)
|
|||
break;
|
||||
}
|
||||
if (i == Highest_object_index+1)
|
||||
HUD_init_message(HM_DEFAULT, "No Guide-Bot in mine.");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No Guide-Bot in mine.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1721,7 +1721,7 @@ void do_escort_menu(void)
|
|||
window *wind;
|
||||
|
||||
if (Game_mode & GM_MULTI) {
|
||||
HUD_init_message(HM_DEFAULT, "No Guide-Bot in Multiplayer!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No Guide-Bot in Multiplayer!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1733,7 +1733,7 @@ void do_escort_menu(void)
|
|||
|
||||
if (i > Highest_object_index) {
|
||||
|
||||
HUD_init_message(HM_DEFAULT, "No Guide-Bot present in mine!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No Guide-Bot present in mine!");
|
||||
|
||||
#if 0 //ndef NDEBUG // Just use HELPVISHNU!!
|
||||
// If no buddy bot, create one!
|
||||
|
|
|
@ -174,7 +174,7 @@ void transfer_energy_to_shield()
|
|||
HUD_init_message(HM_DEFAULT, "Need more than %i energy to enable transfer", f2i(INITIAL_ENERGY));
|
||||
}
|
||||
else if (Players[Player_num].shields == 200) {
|
||||
HUD_init_message(HM_DEFAULT, "No transfer: Shields already at max");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No transfer: Shields already at max");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ void do_weapon_n_item_stuff()
|
|||
if (!Players[Player_num].secondary_ammo[PROXIMITY_INDEX] && !Players[Player_num].secondary_ammo[SMART_MINE_INDEX])
|
||||
{
|
||||
digi_play_sample_once( SOUND_BAD_SELECTION, F1_0 );
|
||||
HUD_init_message(HM_DEFAULT, "No bombs available!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No bombs available!");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -990,7 +990,7 @@ int HandleGameKey(int key)
|
|||
if (!(Game_mode & GM_MULTI))
|
||||
set_escort_special_goal(key);
|
||||
else
|
||||
HUD_init_message(HM_DEFAULT, "No Guide-Bot in Multiplayer!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No Guide-Bot in Multiplayer!");
|
||||
game_flush_inputs();
|
||||
return 1;
|
||||
}
|
||||
|
@ -1003,10 +1003,10 @@ int HandleGameKey(int key)
|
|||
write_player_file();
|
||||
switch (PlayerCfg.HudMode)
|
||||
{
|
||||
case 0: HUD_init_message(HM_DEFAULT, "Standard HUD"); break;
|
||||
case 1: HUD_init_message(HM_DEFAULT, "Alternative HUD #1"); break;
|
||||
case 2: HUD_init_message(HM_DEFAULT, "Alternative HUD #2"); break;
|
||||
case 3: HUD_init_message(HM_DEFAULT, "No HUD"); break;
|
||||
case 0: HUD_init_message_literal(HM_DEFAULT, "Standard HUD"); break;
|
||||
case 1: HUD_init_message_literal(HM_DEFAULT, "Alternative HUD #1"); break;
|
||||
case 2: HUD_init_message_literal(HM_DEFAULT, "Alternative HUD #2"); break;
|
||||
case 3: HUD_init_message_literal(HM_DEFAULT, "No HUD"); break;
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
@ -1016,14 +1016,14 @@ int HandleGameKey(int key)
|
|||
if (Netgame.RefusePlayers && WaitForRefuseAnswer && !(Game_mode & GM_TEAM))
|
||||
{
|
||||
RefuseThisPlayer=1;
|
||||
HUD_init_message(HM_MULTI, "Player accepted!");
|
||||
HUD_init_message_literal(HM_MULTI, "Player accepted!");
|
||||
}
|
||||
return 1;
|
||||
case KEY_ALTED + KEY_1:
|
||||
if (Netgame.RefusePlayers && WaitForRefuseAnswer && (Game_mode & GM_TEAM))
|
||||
{
|
||||
RefuseThisPlayer=1;
|
||||
HUD_init_message(HM_MULTI, "Player accepted!");
|
||||
HUD_init_message_literal(HM_MULTI, "Player accepted!");
|
||||
RefuseTeam=1;
|
||||
game_flush_inputs();
|
||||
}
|
||||
|
@ -1032,7 +1032,7 @@ int HandleGameKey(int key)
|
|||
if (Netgame.RefusePlayers && WaitForRefuseAnswer && (Game_mode & GM_TEAM))
|
||||
{
|
||||
RefuseThisPlayer=1;
|
||||
HUD_init_message(HM_MULTI, "Player accepted!");
|
||||
HUD_init_message_literal(HM_MULTI, "Player accepted!");
|
||||
RefuseTeam=2;
|
||||
game_flush_inputs();
|
||||
}
|
||||
|
@ -1145,7 +1145,7 @@ void kill_all_robots(void)
|
|||
if (Objects[i].type == OBJ_ROBOT)
|
||||
if (Robot_info[Objects[i].id].companion) {
|
||||
Objects[i].flags |= OF_EXPLODING|OF_SHOULD_BE_DEAD;
|
||||
HUD_init_message(HM_DEFAULT, "Toasted the Buddy! *sniff*");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Toasted the Buddy! *sniff*");
|
||||
dead_count++;
|
||||
}
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ void kill_and_so_forth(void)
|
|||
{
|
||||
int i, j;
|
||||
|
||||
HUD_init_message(HM_DEFAULT, "Killing, awarding, etc.!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Killing, awarding, etc.!");
|
||||
|
||||
for (i=0; i<=Highest_object_index; i++) {
|
||||
switch (Objects[i].type) {
|
||||
|
@ -1219,7 +1219,7 @@ void kill_thief(void)
|
|||
if (Objects[i].type == OBJ_ROBOT)
|
||||
if (Robot_info[Objects[i].id].thief) {
|
||||
Objects[i].flags |= OF_EXPLODING|OF_SHOULD_BE_DEAD;
|
||||
HUD_init_message(HM_DEFAULT, "Thief toasted!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Thief toasted!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ void kill_buddy(void)
|
|||
if (Objects[i].type == OBJ_ROBOT)
|
||||
if (Robot_info[Objects[i].id].companion) {
|
||||
Objects[i].flags |= OF_EXPLODING|OF_SHOULD_BE_DEAD;
|
||||
HUD_init_message(HM_DEFAULT, "Buddy toasted!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Buddy toasted!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1360,9 +1360,9 @@ int HandleTestKey(int key)
|
|||
case KEY_DEBUGGED + KEY_M:
|
||||
Debug_spew = !Debug_spew;
|
||||
if (Debug_spew) {
|
||||
HUD_init_message(HM_DEFAULT, "Debug Spew: ON" );
|
||||
HUD_init_message_literal(HM_DEFAULT, "Debug Spew: ON" );
|
||||
} else {
|
||||
HUD_init_message(HM_DEFAULT, "Debug Spew: OFF" );
|
||||
HUD_init_message_literal(HM_DEFAULT, "Debug Spew: OFF" );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1518,12 +1518,12 @@ int FinalCheats(int key)
|
|||
if (cheat_codes[gotcha].stateptr == &cheats.lamer)
|
||||
{
|
||||
Players[Player_num].shields=Players[Player_num].energy=i2f(1);
|
||||
HUD_init_message(HM_DEFAULT, "Take that...cheater!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Take that...cheater!");
|
||||
}
|
||||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.wowie)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_WOWIE_ZOWIE);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_WOWIE_ZOWIE);
|
||||
|
||||
if (Piggy_hamfile_version < 3) // SHAREWARE
|
||||
{
|
||||
|
@ -1559,7 +1559,7 @@ int FinalCheats(int key)
|
|||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.allkeys)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_ALL_KEYS);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_ALL_KEYS);
|
||||
Players[Player_num].flags |= PLAYER_FLAGS_BLUE_KEY | PLAYER_FLAGS_RED_KEY | PLAYER_FLAGS_GOLD_KEY;
|
||||
}
|
||||
|
||||
|
@ -1569,7 +1569,7 @@ int FinalCheats(int key)
|
|||
Players[Player_num].flags |=PLAYER_FLAGS_AFTERBURNER;
|
||||
Players[Player_num].flags |=PLAYER_FLAGS_AMMO_RACK;
|
||||
Players[Player_num].flags |=PLAYER_FLAGS_CONVERTER;
|
||||
HUD_init_message(HM_DEFAULT, "Accessories!!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Accessories!!");
|
||||
}
|
||||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.invul)
|
||||
|
@ -1581,7 +1581,7 @@ int FinalCheats(int key)
|
|||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.shields)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_FULL_SHIELDS);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_FULL_SHIELDS);
|
||||
Players[Player_num].shields = MAX_SHIELDS;
|
||||
}
|
||||
|
||||
|
@ -1593,7 +1593,7 @@ int FinalCheats(int key)
|
|||
if (cheat_codes[gotcha].stateptr == &cheats.exitpath)
|
||||
{
|
||||
if (create_special_path())
|
||||
HUD_init_message(HM_DEFAULT, "Exit path illuminated!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Exit path illuminated!");
|
||||
}
|
||||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.levelwarp)
|
||||
|
@ -1650,17 +1650,17 @@ int FinalCheats(int key)
|
|||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.robotskillrobots)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, cheats.robotskillrobots?"Rabid robots!":"Kill the player!");
|
||||
HUD_init_message_literal(HM_DEFAULT, cheats.robotskillrobots?"Rabid robots!":"Kill the player!");
|
||||
}
|
||||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.monsterdamage)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, cheats.monsterdamage?"Oh no, there goes Tokyo!":"What have you done, I'm shrinking!!");
|
||||
HUD_init_message_literal(HM_DEFAULT, cheats.monsterdamage?"Oh no, there goes Tokyo!":"What have you done, I'm shrinking!!");
|
||||
}
|
||||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.buddyclone)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "What's this? Another buddy bot!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "What's this? Another buddy bot!");
|
||||
create_buddy_bot();
|
||||
}
|
||||
|
||||
|
@ -1681,7 +1681,7 @@ int FinalCheats(int key)
|
|||
|
||||
if (cheat_codes[gotcha].stateptr == &cheats.acid)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, cheats.acid?"Going up!":"Coming down!");
|
||||
HUD_init_message_literal(HM_DEFAULT, cheats.acid?"Going up!":"Coming down!");
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -56,5 +56,5 @@ void hostage_rescue(int blah)
|
|||
if (Newdemo_state != ND_STATE_PLAYBACK)
|
||||
digi_play_sample(SOUND_HOSTAGE_RESCUED, F1_0);
|
||||
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_HOSTAGE_RESCUED);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_HOSTAGE_RESCUED);
|
||||
}
|
||||
|
|
13
main/hud.c
13
main/hud.c
|
@ -44,6 +44,7 @@ hudmsg HUD_messages[HUD_MAX_NUM_STOR];
|
|||
static int HUD_nmessages = 0;
|
||||
int HUD_toolong = 0;
|
||||
static int HUD_color = -1;
|
||||
static int HUD_init_message_literal_worth_showing(int class_flag, const char *message);
|
||||
|
||||
void HUD_clear_messages()
|
||||
{
|
||||
|
@ -129,7 +130,6 @@ int HUD_init_message_va(int class_flag, const char * format, va_list args)
|
|||
if (!is_worth_showing(class_flag))
|
||||
return 0;
|
||||
|
||||
int i, j;
|
||||
#ifndef macintosh
|
||||
char message[HUD_MESSAGE_LENGTH+1] = "";
|
||||
#else
|
||||
|
@ -141,8 +141,13 @@ int HUD_init_message_va(int class_flag, const char * format, va_list args)
|
|||
#else
|
||||
vsprintf(message, format, args);
|
||||
#endif
|
||||
return HUD_init_message_literal_worth_showing(class_flag, message);
|
||||
}
|
||||
|
||||
|
||||
static int HUD_init_message_literal_worth_showing(int class_flag, const char *message)
|
||||
{
|
||||
int i, j;
|
||||
// check if message is already in list and bail out if so
|
||||
if (HUD_nmessages > 0)
|
||||
{
|
||||
|
@ -202,6 +207,12 @@ int HUD_init_message(int class_flag, const char * format, ... )
|
|||
return ret;
|
||||
}
|
||||
|
||||
int HUD_init_message_literal(int class_flag, const char *str)
|
||||
{
|
||||
if (!is_worth_showing(class_flag))
|
||||
return 0;
|
||||
return HUD_init_message_literal_worth_showing(class_flag, str);
|
||||
}
|
||||
|
||||
void player_dead_message(void)
|
||||
{
|
||||
|
|
|
@ -18,5 +18,6 @@ extern void HUD_clear_messages();
|
|||
extern void HUD_render_message_frame();
|
||||
int HUD_init_message(int class_flag, const char * format, ... );
|
||||
int HUD_init_message_va(int class_flag, const char * format, va_list args);
|
||||
int HUD_init_message_literal(int class_flag, const char *str);
|
||||
|
||||
#endif
|
||||
|
|
64
main/multi.c
64
main/multi.c
|
@ -654,7 +654,7 @@ void multi_compute_kill(int killer, int killed)
|
|||
if (killer_id==PMINE_ID && killer_type!=OBJ_ROBOT)
|
||||
{
|
||||
if (killed_pnum == Player_num)
|
||||
HUD_init_message(HM_MULTI, "You were killed by a mine!");
|
||||
HUD_init_message_literal(HM_MULTI, "You were killed by a mine!");
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s was killed by a mine!",killed_name);
|
||||
}
|
||||
|
@ -803,13 +803,13 @@ void multi_compute_kill(int killer, int killed)
|
|||
{
|
||||
if (killer_pnum==Player_num)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You reached the kill goal!");
|
||||
HUD_init_message_literal(HM_MULTI, "You reached the kill goal!");
|
||||
Players[Player_num].shields=i2f(200);
|
||||
}
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s has reached the kill goal!",Players[killer_pnum].callsign);
|
||||
|
||||
HUD_init_message(HM_MULTI, "The control center has been destroyed!");
|
||||
HUD_init_message_literal(HM_MULTI, "The control center has been destroyed!");
|
||||
net_destroy_controlcen (obj_find_first_of_type (OBJ_CNTRLCEN));
|
||||
}
|
||||
}
|
||||
|
@ -1138,7 +1138,7 @@ multi_message_feedback(void)
|
|||
|
||||
Assert(strlen(feedback_result) < 200);
|
||||
|
||||
HUD_init_message(HM_MULTI, "%s", feedback_result);
|
||||
HUD_init_message_literal(HM_MULTI, feedback_result);
|
||||
//sprintf (temp,"%s",colon);
|
||||
//sprintf (Network_message,"%s",temp);
|
||||
|
||||
|
@ -1167,7 +1167,7 @@ multi_send_macro(int key)
|
|||
|
||||
if (!PlayerCfg.NetworkMessageMacro[key][0])
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "%s", TXT_NO_MACRO);
|
||||
HUD_init_message_literal(HM_MULTI, TXT_NO_MACRO);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1238,7 +1238,7 @@ void multi_send_message_end()
|
|||
|
||||
if (strlen(Network_message)<=name_index)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You must specify a name to move");
|
||||
HUD_init_message_literal(HM_MULTI, "You must specify a name to move");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1247,7 +1247,7 @@ void multi_send_message_end()
|
|||
{
|
||||
if ((Game_mode & GM_CAPTURE) && (Players[i].flags & PLAYER_FLAGS_FLAG))
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Can't move player because s/he has a flag!");
|
||||
HUD_init_message_literal(HM_MULTI, "Can't move player because s/he has a flag!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1266,7 +1266,7 @@ void multi_send_message_end()
|
|||
sprintf (Network_message,"%s has changed teams!",Players[i].callsign);
|
||||
if (i==Player_num)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You have changed teams!");
|
||||
HUD_init_message_literal(HM_MULTI, "You have changed teams!");
|
||||
reset_cockpit();
|
||||
}
|
||||
else
|
||||
|
@ -1293,7 +1293,7 @@ void multi_send_message_end()
|
|||
}
|
||||
if (strlen(Network_message)<=name_index)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You must specify a name to kick");
|
||||
HUD_init_message_literal(HM_MULTI, "You must specify a name to kick");
|
||||
multi_message_index = 0;
|
||||
multi_sending_message[Player_num] = 0;
|
||||
multi_send_msgsend_state(0);
|
||||
|
@ -1306,7 +1306,7 @@ void multi_send_message_end()
|
|||
|
||||
if (Show_kill_list==1 || Show_kill_list==2) {
|
||||
if (listpos == 0 || listpos >= N_players) {
|
||||
HUD_init_message(HM_MULTI, "Invalid player number for kick.");
|
||||
HUD_init_message_literal(HM_MULTI, "Invalid player number for kick.");
|
||||
multi_message_index = 0;
|
||||
multi_sending_message[Player_num] = 0;
|
||||
multi_send_msgsend_state(0);
|
||||
|
@ -1317,7 +1317,7 @@ void multi_send_message_end()
|
|||
if ((i != Player_num) && (Players[i].connected))
|
||||
goto kick_player;
|
||||
}
|
||||
else HUD_init_message(HM_MULTI, "You cannot use # kicking with in team display.");
|
||||
else HUD_init_message_literal(HM_MULTI, "You cannot use # kicking with in team display.");
|
||||
|
||||
|
||||
multi_message_index = 0;
|
||||
|
@ -1835,9 +1835,9 @@ void multi_do_controlcen_destroy(const ubyte *buf)
|
|||
HUD_init_message(HM_MULTI, "%s %s", Players[who].callsign, TXT_HAS_DEST_CONTROL);
|
||||
}
|
||||
else if (who == Player_num)
|
||||
HUD_init_message(HM_MULTI, "%s", TXT_YOU_DEST_CONTROL);
|
||||
HUD_init_message_literal(HM_MULTI, TXT_YOU_DEST_CONTROL);
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s", TXT_CONTROL_DESTROYED);
|
||||
HUD_init_message_literal(HM_MULTI, TXT_CONTROL_DESTROYED);
|
||||
|
||||
if (objnum != -1)
|
||||
net_destroy_controlcen(Objects+objnum);
|
||||
|
@ -2020,7 +2020,7 @@ void multi_disconnect_player(int pnum)
|
|||
if (Players[i].connected) n++;
|
||||
if (n == 1)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You are the only person remaining in this netgame");
|
||||
HUD_init_message_literal(HM_MULTI, "You are the only person remaining in this netgame");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2449,11 +2449,11 @@ void
|
|||
multi_send_destroy_controlcen(int objnum, int player)
|
||||
{
|
||||
if (player == Player_num)
|
||||
HUD_init_message(HM_MULTI, "%s", TXT_YOU_DEST_CONTROL);
|
||||
HUD_init_message_literal(HM_MULTI, TXT_YOU_DEST_CONTROL);
|
||||
else if ((player > 0) && (player < N_players))
|
||||
HUD_init_message(HM_MULTI, "%s %s", Players[player].callsign, TXT_HAS_DEST_CONTROL);
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s", TXT_CONTROL_DESTROYED);
|
||||
HUD_init_message_literal(HM_MULTI, TXT_CONTROL_DESTROYED);
|
||||
|
||||
multibuf[0] = (char)MULTI_CONTROLCEN;
|
||||
PUT_INTEL_SHORT(multibuf+1, objnum);
|
||||
|
@ -3975,7 +3975,7 @@ void multi_check_for_killgoal_winner ()
|
|||
|
||||
HUD_init_message(HM_MULTI, "%s has the best score with %d kills!",Players[bestnum].callsign,best);
|
||||
|
||||
HUD_init_message(HM_MULTI, "The control center has been destroyed!");
|
||||
HUD_init_message_literal(HM_MULTI, "The control center has been destroyed!");
|
||||
|
||||
objp=obj_find_first_of_type (OBJ_CNTRLCEN);
|
||||
net_destroy_controlcen (objp);
|
||||
|
@ -4218,7 +4218,7 @@ void multi_do_capture_bonus(const ubyte *buf)
|
|||
int TheGoal;
|
||||
|
||||
if (pnum==Player_num)
|
||||
HUD_init_message(HM_MULTI, "You have Scored!");
|
||||
HUD_init_message_literal(HM_MULTI, "You have Scored!");
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s has Scored!",Players[(int)pnum].callsign);
|
||||
|
||||
|
@ -4243,13 +4243,13 @@ void multi_do_capture_bonus(const ubyte *buf)
|
|||
{
|
||||
if (pnum==Player_num)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You reached the kill goal!");
|
||||
HUD_init_message_literal(HM_MULTI, "You reached the kill goal!");
|
||||
Players[Player_num].shields=i2f(200);
|
||||
}
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s has reached the kill goal!",Players[(int)pnum].callsign);
|
||||
|
||||
HUD_init_message(HM_MULTI, "The control center has been destroyed!");
|
||||
HUD_init_message_literal(HM_MULTI, "The control center has been destroyed!");
|
||||
net_destroy_controlcen (obj_find_first_of_type (OBJ_CNTRLCEN));
|
||||
}
|
||||
}
|
||||
|
@ -4321,13 +4321,13 @@ void multi_do_orb_bonus(const ubyte *buf)
|
|||
{
|
||||
if (pnum==Player_num)
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "You reached the kill goal!");
|
||||
HUD_init_message_literal(HM_MULTI, "You reached the kill goal!");
|
||||
Players[Player_num].shields=i2f(200);
|
||||
}
|
||||
else
|
||||
HUD_init_message(HM_MULTI, "%s has reached the kill goal!",Players[(int)pnum].callsign);
|
||||
|
||||
HUD_init_message(HM_MULTI, "The control center has been destroyed!");
|
||||
HUD_init_message_literal(HM_MULTI, "The control center has been destroyed!");
|
||||
net_destroy_controlcen (obj_find_first_of_type (OBJ_CNTRLCEN));
|
||||
}
|
||||
}
|
||||
|
@ -4403,7 +4403,7 @@ void DropOrb ()
|
|||
|
||||
if (!Players[Player_num].secondary_ammo[PROXIMITY_INDEX])
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "No orbs to drop!");
|
||||
HUD_init_message_literal(HM_MULTI, "No orbs to drop!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4414,7 +4414,7 @@ void DropOrb ()
|
|||
if (objnum<0)
|
||||
return;
|
||||
|
||||
HUD_init_message(HM_MULTI, "Orb dropped!");
|
||||
HUD_init_message_literal(HM_MULTI, "Orb dropped!");
|
||||
digi_play_sample (SOUND_DROP_WEAPON,F1_0);
|
||||
|
||||
if ((Game_mode & GM_HOARD) && objnum>-1)
|
||||
|
@ -4444,12 +4444,12 @@ void DropFlag ()
|
|||
|
||||
if (!(Players[Player_num].flags & PLAYER_FLAGS_FLAG))
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "No flag to drop!");
|
||||
HUD_init_message_literal(HM_MULTI, "No flag to drop!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
HUD_init_message(HM_MULTI, "Flag dropped!");
|
||||
HUD_init_message_literal(HM_MULTI, "Flag dropped!");
|
||||
digi_play_sample (SOUND_DROP_WEAPON,F1_0);
|
||||
|
||||
seed = d_rand();
|
||||
|
@ -4900,12 +4900,12 @@ void multi_initiate_save_game()
|
|||
|
||||
if (!multi_i_am_master())
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Only host is allowed to save a game!");
|
||||
HUD_init_message_literal(HM_MULTI, "Only host is allowed to save a game!");
|
||||
return;
|
||||
}
|
||||
if (!multi_all_players_alive())
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Can't save! All players must be alive!");
|
||||
HUD_init_message_literal(HM_MULTI, "Can't save! All players must be alive!");
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < N_players; i++)
|
||||
|
@ -4914,7 +4914,7 @@ void multi_initiate_save_game()
|
|||
{
|
||||
if (i != j && !d_stricmp(Players[i].callsign, Players[j].callsign))
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Can't save! Multiple players with same callsign!");
|
||||
HUD_init_message_literal(HM_MULTI, "Can't save! Multiple players with same callsign!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -4956,12 +4956,12 @@ void multi_initiate_restore_game()
|
|||
|
||||
if (!multi_i_am_master())
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Only host is allowed to load a game!");
|
||||
HUD_init_message_literal(HM_MULTI, "Only host is allowed to load a game!");
|
||||
return;
|
||||
}
|
||||
if (!multi_all_players_alive())
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Can't load! All players must be alive!");
|
||||
HUD_init_message_literal(HM_MULTI, "Can't load! All players must be alive!");
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < N_players; i++)
|
||||
|
@ -4970,7 +4970,7 @@ void multi_initiate_restore_game()
|
|||
{
|
||||
if (i != j && !d_stricmp(Players[i].callsign, Players[j].callsign))
|
||||
{
|
||||
HUD_init_message(HM_MULTI, "Can't load! Multiple players with same callsign!");
|
||||
HUD_init_message_literal(HM_MULTI, "Can't load! Multiple players with same callsign!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2092,7 +2092,7 @@ int newdemo_read_frame_information(int rewrite)
|
|||
break;
|
||||
}
|
||||
if (Newdemo_vcr_state != ND_STATE_PAUSED)
|
||||
HUD_init_message( HM_DEFAULT, "%s", hud_msg );
|
||||
HUD_init_message_literal( HM_DEFAULT, hud_msg );
|
||||
break;
|
||||
}
|
||||
case ND_EVENT_START_GUIDED:
|
||||
|
|
|
@ -1590,9 +1590,9 @@ void dead_player_frame(void)
|
|||
if (Players[Player_num].hostages_on_board > 1)
|
||||
HUD_init_message(HM_DEFAULT, TXT_SHIP_DESTROYED_2, Players[Player_num].hostages_on_board);
|
||||
else if (Players[Player_num].hostages_on_board == 1)
|
||||
HUD_init_message(HM_DEFAULT, TXT_SHIP_DESTROYED_1);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_SHIP_DESTROYED_1);
|
||||
else
|
||||
HUD_init_message(HM_DEFAULT, TXT_SHIP_DESTROYED_0);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_SHIP_DESTROYED_0);
|
||||
Players[Player_num].hostages_on_board = 0;
|
||||
|
||||
Player_exploded = 1;
|
||||
|
|
|
@ -531,7 +531,7 @@ int do_powerup(object *obj)
|
|||
case POW_SUPER_LASER:
|
||||
if (Players[Player_num].laser_level >= MAX_SUPER_LASER_LEVEL) {
|
||||
Players[Player_num].laser_level = MAX_SUPER_LASER_LEVEL;
|
||||
HUD_init_message(HM_DEFAULT|HM_REDUNDANT|HM_MAYDUPL, "SUPER LASER MAXED OUT!");
|
||||
HUD_init_message_literal(HM_DEFAULT|HM_REDUNDANT|HM_MAYDUPL, "SUPER LASER MAXED OUT!");
|
||||
} else {
|
||||
int old_level=Players[Player_num].laser_level;
|
||||
|
||||
|
|
|
@ -751,7 +751,7 @@ int state_save_all(int secret_save, char *filename_override, int blind_save)
|
|||
char filename[PATH_MAX], desc[DESC_LENGTH+1];
|
||||
|
||||
if ((Current_level_num < 0) && (secret_save == 0)) {
|
||||
HUD_init_message(HM_DEFAULT, "Can't save in secret level!" );
|
||||
HUD_init_message_literal(HM_DEFAULT, "Can't save in secret level!" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -825,7 +825,7 @@ int state_save_all(int secret_save, char *filename_override, int blind_save)
|
|||
rval = state_save_all_sub(filename, desc);
|
||||
|
||||
if (rval && !secret_save)
|
||||
HUD_init_message(HM_DEFAULT, "Game saved");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Game saved");
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
@ -1143,7 +1143,7 @@ int state_restore_all(int in_game, int secret_restore, char *filename_override)
|
|||
int filenum = -1;
|
||||
|
||||
if (in_game && (Current_level_num < 0) && (secret_restore == 0)) {
|
||||
HUD_init_message(HM_DEFAULT, "Can't restore in secret level!" );
|
||||
HUD_init_message_literal(HM_DEFAULT, "Can't restore in secret level!" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -431,13 +431,13 @@ int check_trigger_sub(int trigger_num, int pnum,int shot)
|
|||
break;
|
||||
|
||||
if (is_SHAREWARE || is_MAC_SHARE) {
|
||||
HUD_init_message(HM_DEFAULT, "Secret Level Teleporter disabled in Descent 2 Demo");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Secret Level Teleporter disabled in Descent 2 Demo");
|
||||
digi_play_sample( SOUND_BAD_SELECTION, F1_0 );
|
||||
break;
|
||||
}
|
||||
|
||||
if (Game_mode & GM_MULTI) {
|
||||
HUD_init_message(HM_DEFAULT, "Secret Level Teleporter disabled in multiplayer!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Secret Level Teleporter disabled in multiplayer!");
|
||||
digi_play_sample( SOUND_BAD_SELECTION, F1_0 );
|
||||
break;
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ int check_trigger_sub(int trigger_num, int pnum,int shot)
|
|||
newdemo_record_secret_exit_blown(truth);
|
||||
|
||||
if ((Newdemo_state != ND_STATE_PLAYBACK) && truth) {
|
||||
HUD_init_message(HM_DEFAULT, "Secret Level destroyed. Exit disabled.");
|
||||
HUD_init_message_literal(HM_DEFAULT, "Secret Level destroyed. Exit disabled.");
|
||||
digi_play_sample( SOUND_BAD_SELECTION, F1_0 );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1118,7 +1118,7 @@ int wall_hit_process(segment *seg, int side, fix damage, int playernum, object *
|
|||
if ((w->flags & WALL_DOOR_LOCKED ) && !(special_boss_opening_allowed(seg-Segments, side)) ) {
|
||||
if ( playernum==Player_num )
|
||||
if (show_message)
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_CANT_OPEN_DOOR);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_CANT_OPEN_DOOR);
|
||||
return WHP_NO_KEY;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -465,7 +465,7 @@ void auto_select_weapon(int weapon_type)
|
|||
{
|
||||
if (looped)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_NO_PRIMARY);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_NO_PRIMARY);
|
||||
select_weapon(0, 0, 0, 1);
|
||||
try_again = 0;
|
||||
continue;
|
||||
|
@ -484,7 +484,7 @@ void auto_select_weapon(int weapon_type)
|
|||
// continue;
|
||||
|
||||
if (PlayerCfg.PrimaryOrder[cur_weapon] == Primary_weapon) {
|
||||
HUD_init_message(HM_DEFAULT, "%s", TXT_NO_PRIMARY);
|
||||
HUD_init_message_literal(HM_DEFAULT, TXT_NO_PRIMARY);
|
||||
select_weapon(0, 0, 0, 1);
|
||||
try_again = 0; // Tried all weapons!
|
||||
|
||||
|
@ -514,7 +514,7 @@ void auto_select_weapon(int weapon_type)
|
|||
{
|
||||
if (looped)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "No secondary weapons selected!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No secondary weapons selected!");
|
||||
try_again = 0;
|
||||
continue;
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ void auto_select_weapon(int weapon_type)
|
|||
cur_weapon = 0;
|
||||
|
||||
if (PlayerCfg.SecondaryOrder[cur_weapon] == Secondary_weapon) {
|
||||
HUD_init_message(HM_DEFAULT, "No secondary weapons available!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No secondary weapons available!");
|
||||
try_again = 0; // Tried all weapons!
|
||||
} else if (player_has_weapon(PlayerCfg.SecondaryOrder[cur_weapon], 1) == HAS_ALL) {
|
||||
select_weapon(PlayerCfg.SecondaryOrder[cur_weapon], 1, 1, 1 );
|
||||
|
@ -1107,7 +1107,7 @@ void DropCurrentWeapon ()
|
|||
|
||||
if (Primary_weapon==0)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "You cannot drop your base weapon!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "You cannot drop your base weapon!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ void DropSecondaryWeapon ()
|
|||
|
||||
if (Players[Player_num].secondary_ammo[Secondary_weapon] ==0)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "No secondary weapon to drop!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "No secondary weapon to drop!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1192,7 +1192,7 @@ void DropSecondaryWeapon ()
|
|||
case POW_SMART_MINE:
|
||||
if (Players[Player_num].secondary_ammo[Secondary_weapon]<4)
|
||||
{
|
||||
HUD_init_message(HM_DEFAULT, "You need at least 4 to drop!");
|
||||
HUD_init_message_literal(HM_DEFAULT, "You need at least 4 to drop!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue