mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- restored most of the original user_defs.
Most of the added EDuke things were gone anyway.
This commit is contained in:
parent
43ff87f47f
commit
b6f410923e
7 changed files with 45 additions and 101 deletions
|
@ -39,54 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
|
||||
typedef struct {
|
||||
vec3_t camerapos;
|
||||
int32_t const_visibility,uw_framerate;
|
||||
int32_t camera_time,folfvel,folavel,folx,foly,fola;
|
||||
int32_t reccnt;
|
||||
|
||||
int32_t statusbarscale,weaponswitch; // JBF 20031125
|
||||
int32_t statusbarmode;
|
||||
int32_t noexits,automsg;
|
||||
int32_t althud;
|
||||
int32_t statusbarrange;
|
||||
|
||||
int32_t entered_name,screen_tilting;
|
||||
int32_t coop,screen_size,lockout,crosshair;
|
||||
int32_t angleinterpolation;
|
||||
|
||||
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
||||
int32_t m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off;
|
||||
int32_t ffire,m_player_skill,m_level_number,m_volume_number,multimode;
|
||||
int32_t player_skill,level_number,volume_number,marker;
|
||||
|
||||
uint32_t userbytever;
|
||||
|
||||
fix16_t cameraq16ang, cameraq16horiz;
|
||||
int16_t camerasect;
|
||||
int16_t pause_on,from_bonus;
|
||||
int16_t camerasprite,last_camsprite;
|
||||
int16_t last_level,secretlevel;
|
||||
|
||||
int8_t menutitle_pal, slidebar_palselected, slidebar_paldisabled;
|
||||
|
||||
struct {
|
||||
int32_t AutoAim;
|
||||
int32_t ShowOpponentWeapons;
|
||||
} config;
|
||||
|
||||
char overhead_on,last_overhead,showweapons;
|
||||
char god,warp_on,cashman,eog;
|
||||
char scrollmode,clipping;
|
||||
char display_bonus_screen;
|
||||
char show_level_text;
|
||||
|
||||
uint8_t user_map;
|
||||
uint8_t screenfade, menubackground;
|
||||
uint8_t shadow_pal;
|
||||
uint8_t wchoice[MAXPLAYERS][MAX_WEAPONS];
|
||||
} user_defs;
|
||||
|
||||
extern user_defs ud;
|
||||
extern int rtsplaying;
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ void drawstatusbar_d(int snum)
|
|||
dsb.Statusbar(snum);
|
||||
}
|
||||
|
||||
if (ud.show_level_text && hud_showmapname && levelTextTime > 1 && !M_Active())
|
||||
if (hud_showmapname && levelTextTime > 1 && !M_Active())
|
||||
{
|
||||
double alpha;
|
||||
if (levelTextTime > 16) alpha = 1.;
|
||||
|
|
|
@ -400,7 +400,7 @@ void drawstatusbar_r(int snum)
|
|||
dsb.Statusbar(snum);
|
||||
}
|
||||
|
||||
if (ud.show_level_text && hud_showmapname && levelTextTime > 1 && !M_Active())
|
||||
if (hud_showmapname && levelTextTime > 1 && !M_Active())
|
||||
{
|
||||
double alpha;
|
||||
if (levelTextTime > 16) alpha = 1.;
|
||||
|
|
|
@ -257,19 +257,10 @@ void S_GetCamera(vec3_t** c, int32_t* ca, int32_t* cs)
|
|||
{
|
||||
if (ud.camerasprite == -1)
|
||||
{
|
||||
if (ud.overhead_on != 2)
|
||||
{
|
||||
if (c) *c = &ud.camerapos;
|
||||
if (cs) *cs = ud.camerasect;
|
||||
if (ca) *ca = ud.cameraq16ang >> FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto p = &ps[screenpeek];
|
||||
if (c) *c = &p->pos;
|
||||
if (cs) *cs = p->cursectnum;
|
||||
if (ca) *ca = p->getang();
|
||||
}
|
||||
auto p = &ps[screenpeek];
|
||||
if (c) *c = &p->pos;
|
||||
if (cs) *cs = p->cursectnum;
|
||||
if (ca) *ca = p->getang();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -41,6 +41,35 @@ struct input_t // original name was input which is too generic for a type name.
|
|||
ESyncBits bits;
|
||||
};
|
||||
|
||||
struct user_defs
|
||||
{
|
||||
unsigned char god, warp_on, cashman, eog, showallmap;
|
||||
unsigned char show_help, scrollmode, clipping;
|
||||
char user_name[MAXPLAYERS][32];
|
||||
unsigned char overhead_on, last_overhead, showweapons;
|
||||
|
||||
short pause_on, from_bonus;
|
||||
short camerasprite, last_camsprite;
|
||||
short last_level, secretlevel;
|
||||
|
||||
int const_visibility;
|
||||
int camera_time, folfvel, folavel, folx, foly, fola;
|
||||
int reccnt;
|
||||
|
||||
int runkey_mode, statusbarscale, mouseaiming, weaponswitch;
|
||||
|
||||
int entered_name, shadows, fta_on, executions, auto_run;
|
||||
int coords, tickrate, levelstats, m_coop, coop, screen_size, lockout, crosshair;
|
||||
int wchoice[MAXPLAYERS][MAX_WEAPONS], playerai;
|
||||
|
||||
int respawn_monsters, respawn_items, respawn_inventory, recstat, monsters_off, brightness;
|
||||
int m_respawn_items, m_respawn_monsters, m_respawn_inventory, m_recstat, m_monsters_off, detail;
|
||||
int m_ffire, ffire, m_player_skill, m_level_number, m_volume_number, multimode;
|
||||
int player_skill, level_number, volume_number, m_marker, marker, mouseflip;
|
||||
int statusbarmode, noexits, althud, ShowOpponentWeapons;
|
||||
|
||||
};
|
||||
|
||||
struct player_orig
|
||||
{
|
||||
int ox, oy, oz;
|
||||
|
|
|
@ -164,7 +164,7 @@ void G_HandleLocalKeys(void)
|
|||
if ((g_netServer || ud.multimode > 1) && buttonMap.ButtonDown(gamefunc_Show_Opponents_Weapon))
|
||||
{
|
||||
buttonMap.ClearButton(gamefunc_Show_Opponents_Weapon);
|
||||
ud.config.ShowOpponentWeapons = ud.showweapons = 1-ud.showweapons;
|
||||
ud.ShowOpponentWeapons = ud.showweapons = 1-ud.showweapons;
|
||||
FTA(QUOTE_WEAPON_MODE_OFF-ud.showweapons,g_player[screenpeek].ps);
|
||||
}
|
||||
|
||||
|
@ -467,10 +467,7 @@ static int G_EndOfLevel(void)
|
|||
{
|
||||
ready2send = 0;
|
||||
|
||||
if (ud.display_bonus_screen == 1)
|
||||
{
|
||||
G_BonusScreen(0);
|
||||
}
|
||||
G_BonusScreen(0);
|
||||
|
||||
// Clear potentially loaded per-map ART only after the bonus screens.
|
||||
artClearMapArt();
|
||||
|
@ -493,7 +490,6 @@ static int G_EndOfLevel(void)
|
|||
}
|
||||
}
|
||||
|
||||
ud.display_bonus_screen = 1;
|
||||
ready2send = 0;
|
||||
|
||||
if (numplayers > 1)
|
||||
|
@ -583,28 +579,6 @@ static const char* actions[] = {
|
|||
"Toggle_Crouch", // This is the last one used by EDuke32.
|
||||
};
|
||||
|
||||
int32_t SetDefaults(void)
|
||||
{
|
||||
g_player[0].ps->aim_mode = 1;
|
||||
ud.config.ShowOpponentWeapons = 0;
|
||||
ud.automsg = 0;
|
||||
ud.camerasprite = -1;
|
||||
|
||||
ud.camera_time = 0;//4;
|
||||
|
||||
ud.screen_tilting = 1;
|
||||
playerteam = 0;
|
||||
ud.angleinterpolation = 0;
|
||||
|
||||
ud.display_bonus_screen = 1;
|
||||
ud.show_level_text = 1;
|
||||
ud.screenfade = 1;
|
||||
ud.menubackground = 1;
|
||||
ud.slidebar_paldisabled = 1;
|
||||
ud.shadow_pal = 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GameInterface::app_main()
|
||||
{
|
||||
for (int i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -633,8 +607,11 @@ int GameInterface::app_main()
|
|||
|
||||
checkcommandline();
|
||||
|
||||
SetDefaults();
|
||||
|
||||
g_player[0].ps->aim_mode = 1;
|
||||
ud.ShowOpponentWeapons = 0;
|
||||
ud.camerasprite = -1;
|
||||
ud.camera_time = 0;//4;
|
||||
playerteam = 0;
|
||||
|
||||
hud_size.Callback();
|
||||
hud_scale.Callback();
|
||||
|
@ -783,7 +760,7 @@ MAIN_LOOP_RESTART:
|
|||
}
|
||||
}
|
||||
|
||||
ud.showweapons = ud.config.ShowOpponentWeapons;
|
||||
ud.showweapons = ud.ShowOpponentWeapons;
|
||||
P_SetupMiscInputSettings();
|
||||
g_player[myconnectindex].pteam = playerteam;
|
||||
|
||||
|
|
|
@ -234,10 +234,6 @@ bool G_SavePlayer(FSaveGameNode *sv)
|
|||
{
|
||||
auto& fw = *fil;
|
||||
|
||||
// temporary hack
|
||||
ud.user_map = G_HaveUserMap();
|
||||
|
||||
|
||||
// SAVE!
|
||||
sv_saveandmakesnapshot(fw, 0, 0);
|
||||
|
||||
|
@ -776,7 +772,6 @@ static const dataspec_t svgm_udnetw[] =
|
|||
|
||||
{ DS_NOCHK, &ud.volume_number, sizeof(ud.volume_number), 1 },
|
||||
{ DS_NOCHK, &ud.level_number, sizeof(ud.level_number), 1 },
|
||||
{ DS_NOCHK, &ud.user_map, sizeof(ud.user_map), 1 },
|
||||
{ DS_NOCHK, &ud.player_skill, sizeof(ud.player_skill), 1 },
|
||||
|
||||
{ DS_NOCHK, &ud.from_bonus, sizeof(ud.from_bonus), 1 },
|
||||
|
@ -965,7 +960,7 @@ int32_t sv_saveandmakesnapshot(FileWriter &fil, int8_t spot, bool isAutoSave)
|
|||
h.ptrsize |= 1u << 7u;
|
||||
|
||||
h.bytever = 0;
|
||||
h.userbytever = ud.userbytever;
|
||||
h.userbytever = 0;
|
||||
h.scriptcrc = 0;
|
||||
|
||||
h.reccnt = 0;
|
||||
|
@ -1052,7 +1047,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
return -2;
|
||||
}
|
||||
|
||||
if (h->majorver != SV_MAJOR_VER || h->minorver != SV_MINOR_VER || h->bytever != 0 || h->userbytever != ud.userbytever || ScriptCode.Size())
|
||||
if (h->majorver != SV_MAJOR_VER || h->minorver != SV_MINOR_VER || h->bytever != 0 || h->userbytever != 0 || ScriptCode.Size())
|
||||
{
|
||||
if (h->majorver == SV_MAJOR_VER && h->minorver == SV_MINOR_VER)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue