Added 4th alternative HUD mode for no HUD rendering, aka Immersion mode
This commit is contained in:
parent
c60b007398
commit
bf52256c8d
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-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
|
||||||
|
|
||||||
20130406
|
20130406
|
||||||
--------
|
--------
|
||||||
d1x-rebirth.xcodeproj/project.pbxproj, editor/ehostage.c, main/custom.c: Updated Xcode project, changed references to error.h to dxxerror.h, since it was renamed
|
d1x-rebirth.xcodeproj/project.pbxproj, editor/ehostage.c, main/custom.c: Updated Xcode project, changed references to error.h to dxxerror.h, since it was renamed
|
||||||
|
|
|
@ -679,6 +679,13 @@ int HandleGameKey(int key)
|
||||||
KEY_MAC(case KEY_COMMAND+KEY_ALTED+KEY_7:)
|
KEY_MAC(case KEY_COMMAND+KEY_ALTED+KEY_7:)
|
||||||
PlayerCfg.HudMode=(PlayerCfg.HudMode+1)%GAUGE_HUD_NUMMODES;
|
PlayerCfg.HudMode=(PlayerCfg.HudMode+1)%GAUGE_HUD_NUMMODES;
|
||||||
write_player_file();
|
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;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef NETWORK
|
#ifdef NETWORK
|
||||||
|
|
|
@ -56,8 +56,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||||
#include "ogl_init.h"
|
#include "ogl_init.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern fix Cruise_speed;
|
|
||||||
|
|
||||||
int netplayerinfo_on=0;
|
int netplayerinfo_on=0;
|
||||||
|
|
||||||
#ifdef NETWORK
|
#ifdef NETWORK
|
||||||
|
@ -329,35 +327,6 @@ void game_draw_hud_stuff()
|
||||||
|
|
||||||
render_countdown_gauge();
|
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)
|
if (GameCfg.FPSIndicator && PlayerCfg.CockpitMode[1] != CM_REAR_VIEW)
|
||||||
show_framerate();
|
show_framerate();
|
||||||
|
|
||||||
|
|
|
@ -337,6 +337,7 @@ int weapon_box_states[2];
|
||||||
fix weapon_box_fade_values[2];
|
fix weapon_box_fade_values[2];
|
||||||
int Color_0_31_0 = -1;
|
int Color_0_31_0 = -1;
|
||||||
extern fix ThisLevelTime;
|
extern fix ThisLevelTime;
|
||||||
|
extern fix Cruise_speed;
|
||||||
|
|
||||||
typedef struct gauge_box {
|
typedef struct gauge_box {
|
||||||
int left,top;
|
int left,top;
|
||||||
|
@ -2387,6 +2388,38 @@ void show_HUD_names()
|
||||||
|
|
||||||
void draw_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
|
// Show score so long as not in rearview
|
||||||
if ( !Rear_view && PlayerCfg.CockpitMode[1]!=CM_REAR_VIEW && PlayerCfg.CockpitMode[1]!=CM_STATUS_BAR) {
|
if ( !Rear_view && PlayerCfg.CockpitMode[1]!=CM_REAR_VIEW && PlayerCfg.CockpitMode[1]!=CM_STATUS_BAR) {
|
||||||
hud_show_score();
|
hud_show_score();
|
||||||
|
|
|
@ -59,7 +59,7 @@ typedef struct {
|
||||||
|
|
||||||
extern rgb player_rgb[];
|
extern rgb player_rgb[];
|
||||||
|
|
||||||
#define GAUGE_HUD_NUMMODES 3
|
#define GAUGE_HUD_NUMMODES 4
|
||||||
|
|
||||||
typedef struct span {
|
typedef struct span {
|
||||||
int l,r;
|
int l,r;
|
||||||
|
|
Loading…
Reference in a new issue