Added 4th alternative HUD mode for no HUD rendering, aka Immersion mode
This commit is contained in:
parent
1e3f1c658e
commit
c361a6ef91
|
@ -1,5 +1,9 @@
|
|||
D2X-Rebirth Changelog
|
||||
|
||||
20130408
|
||||
--------
|
||||
main/gamecntl.c, main/gamerend.c, main/gauges.c, main/gauges.h: Added 4th alternative HUD mode for no HUD rendering, aka Immersion mode
|
||||
|
||||
20130407
|
||||
--------
|
||||
d2x-rebirth.xcodeproj/project.pbxproj: Updated Xcode project
|
||||
|
|
|
@ -1054,6 +1054,13 @@ int HandleGameKey(int key)
|
|||
KEY_MAC(case KEY_COMMAND+KEY_ALTED+KEY_7:)
|
||||
PlayerCfg.HudMode=(PlayerCfg.HudMode+1)%GAUGE_HUD_NUMMODES;
|
||||
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;
|
||||
}
|
||||
return 1;
|
||||
|
||||
#ifdef NETWORK
|
||||
|
|
|
@ -55,7 +55,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "ogl_init.h"
|
||||
#endif
|
||||
|
||||
extern fix Cruise_speed;
|
||||
extern int LinearSVGABuffer;
|
||||
|
||||
extern void newmenu_free_background();
|
||||
|
@ -369,35 +368,6 @@ void game_draw_hud_stuff()
|
|||
|
||||
render_countdown_gauge();
|
||||
|
||||
// this should be made part of hud code some day
|
||||
if ( Player_num > -1 && Viewer->type==OBJ_PLAYER && Viewer->id==Player_num && PlayerCfg.CockpitMode[1] != CM_REAR_VIEW) {
|
||||
int x = FSPACX(1);
|
||||
int y = grd_curcanv->cv_bitmap.bm_h;
|
||||
|
||||
gr_set_curfont( GAME_FONT );
|
||||
gr_set_fontcolor( BM_XRGB(0, 31, 0), -1 );
|
||||
if (Cruise_speed > 0) {
|
||||
if (PlayerCfg.CockpitMode[1]==CM_FULL_SCREEN) {
|
||||
if (Game_mode & GM_MULTI)
|
||||
y -= LINE_SPACING * 10;
|
||||
else
|
||||
y -= LINE_SPACING * 6;
|
||||
} else if (PlayerCfg.CockpitMode[1] == CM_STATUS_BAR) {
|
||||
if (Game_mode & GM_MULTI)
|
||||
y -= LINE_SPACING * 6;
|
||||
else
|
||||
y -= LINE_SPACING * 1;
|
||||
} else {
|
||||
if (Game_mode & GM_MULTI)
|
||||
y -= LINE_SPACING * 7;
|
||||
else
|
||||
y -= LINE_SPACING * 2;
|
||||
}
|
||||
|
||||
gr_printf( x, y, "%s %2d%%", TXT_CRUISE, f2i(Cruise_speed) );
|
||||
}
|
||||
}
|
||||
|
||||
if (GameCfg.FPSIndicator && PlayerCfg.CockpitMode[1] != CM_REAR_VIEW)
|
||||
show_framerate();
|
||||
|
||||
|
|
|
@ -342,6 +342,7 @@ fix weapon_box_fade_values[2];
|
|||
int Color_0_31_0 = -1;
|
||||
extern fix ThisLevelTime;
|
||||
extern fix Omega_charge;
|
||||
extern fix Cruise_speed;
|
||||
|
||||
typedef struct gauge_box {
|
||||
int left,top;
|
||||
|
@ -2683,6 +2684,38 @@ void show_HUD_names()
|
|||
//draw all the things on the HUD
|
||||
void draw_hud()
|
||||
{
|
||||
if (PlayerCfg.HudMode==3) // no hud, "immersion mode"
|
||||
return;
|
||||
|
||||
// Cruise speed
|
||||
if ( Player_num > -1 && Viewer->type==OBJ_PLAYER && Viewer->id==Player_num && PlayerCfg.CockpitMode[1] != CM_REAR_VIEW) {
|
||||
int x = FSPACX(1);
|
||||
int y = grd_curcanv->cv_bitmap.bm_h;
|
||||
|
||||
gr_set_curfont( GAME_FONT );
|
||||
gr_set_fontcolor( BM_XRGB(0, 31, 0), -1 );
|
||||
if (Cruise_speed > 0) {
|
||||
if (PlayerCfg.CockpitMode[1]==CM_FULL_SCREEN) {
|
||||
if (Game_mode & GM_MULTI)
|
||||
y -= LINE_SPACING * 10;
|
||||
else
|
||||
y -= LINE_SPACING * 6;
|
||||
} else if (PlayerCfg.CockpitMode[1] == CM_STATUS_BAR) {
|
||||
if (Game_mode & GM_MULTI)
|
||||
y -= LINE_SPACING * 6;
|
||||
else
|
||||
y -= LINE_SPACING * 1;
|
||||
} else {
|
||||
if (Game_mode & GM_MULTI)
|
||||
y -= LINE_SPACING * 7;
|
||||
else
|
||||
y -= LINE_SPACING * 2;
|
||||
}
|
||||
|
||||
gr_printf( x, y, "%s %2d%%", TXT_CRUISE, f2i(Cruise_speed) );
|
||||
}
|
||||
}
|
||||
|
||||
// Show score so long as not in rearview
|
||||
if ( !Rear_view && PlayerCfg.CockpitMode[1]!=CM_REAR_VIEW && PlayerCfg.CockpitMode[1]!=CM_STATUS_BAR) {
|
||||
hud_show_score();
|
||||
|
|
|
@ -79,7 +79,7 @@ extern rgb player_rgb[];
|
|||
// the top of the window.
|
||||
void do_cockpit_window_view(int win, object *viewer, int rear_view_flag, int user, const char *label);
|
||||
|
||||
#define GAUGE_HUD_NUMMODES 3
|
||||
#define GAUGE_HUD_NUMMODES 4
|
||||
|
||||
typedef struct span {
|
||||
int l,r;
|
||||
|
|
Loading…
Reference in a new issue