From 8f8bb68aceac8f362bf0fa337c654c2edba33624 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 11 Mar 2012 17:38:50 +0000 Subject: [PATCH] Rename ud.clipping to ud.noclip internally for sanity. This might now be even more confusing for users reading both the source and CON code (where the access is necessarily still via '.clipping'), but at least reading the source now makes sense :P git-svn-id: https://svn.eduke32.com/eduke32@2454 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 16 ++++++++-------- polymer/eduke32/source/demo.c | 4 ++-- polymer/eduke32/source/game.c | 4 ++-- polymer/eduke32/source/game.h | 2 +- polymer/eduke32/source/gameexec.c | 2 +- polymer/eduke32/source/gamestructures.c | 4 ++-- polymer/eduke32/source/lunatic/defs.ilua | 2 +- polymer/eduke32/source/player.c | 10 +++++----- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 372bed56b..d766036cc 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -5754,13 +5754,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 if ((sc->floorz-sc->ceilingz) < (108<<8)) { - if (ud.clipping == 0 && s->xvel >= 192) + if (ud.noclip == 0 && s->xvel >= 192) for (TRAVERSE_CONNECT(p)) if (sprite[g_player[p].ps->i].extra > 0) { k = g_player[p].ps->cursectnum; updatesector(g_player[p].ps->pos.x,g_player[p].ps->pos.y,&k); - if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) + if ((k == -1 && ud.noclip == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) { g_player[p].ps->pos.x = s->x; g_player[p].ps->pos.y = s->y; @@ -5868,13 +5868,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 if ((sc->floorz-sc->ceilingz) < (108<<8)) { - if (ud.clipping == 0 && s->xvel >= 192) + if (ud.noclip == 0 && s->xvel >= 192) for (TRAVERSE_CONNECT(p)) if (sprite[g_player[p].ps->i].extra > 0) { k = g_player[p].ps->cursectnum; updatesector(g_player[p].ps->pos.x,g_player[p].ps->pos.y,&k); - if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) + if ((k == -1 && ud.noclip == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) { g_player[p].ps->opos.x = g_player[p].ps->pos.x = s->x; g_player[p].ps->opos.y = g_player[p].ps->pos.y = s->y; @@ -5983,13 +5983,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 x = (s->xvel*sintable[s->ang&2047])>>14; if ((sc->floorz-sc->ceilingz) < (108<<8)) - if (ud.clipping == 0) + if (ud.noclip == 0) for (TRAVERSE_CONNECT(p)) if (sprite[g_player[p].ps->i].extra > 0) { k = g_player[p].ps->cursectnum; updatesector(g_player[p].ps->pos.x,g_player[p].ps->pos.y,&k); - if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) + if ((k == -1 && ud.noclip == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) { g_player[p].ps->pos.x = s->x; g_player[p].ps->pos.y = s->y; @@ -6052,13 +6052,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 if ((sc->floorz-sc->ceilingz) < (108<<8)) { - if (ud.clipping == 0) + if (ud.noclip == 0) for (TRAVERSE_CONNECT(p)) if (sprite[g_player[p].ps->i].extra > 0) { k = g_player[p].ps->cursectnum; updatesector(g_player[p].ps->pos.x,g_player[p].ps->pos.y,&k); - if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) + if ((k == -1 && ud.noclip == 0) || (k == s->sectnum && g_player[p].ps->cursectnum != s->sectnum)) { g_player[p].ps->pos.x = s->x; g_player[p].ps->pos.y = s->y; diff --git a/polymer/eduke32/source/demo.c b/polymer/eduke32/source/demo.c index ecd4def6b..545f0671b 100644 --- a/polymer/eduke32/source/demo.c +++ b/polymer/eduke32/source/demo.c @@ -115,7 +115,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine ud.reccnt = 0; ud.god = ud.cashman = ud.eog = ud.showallmap = 0; - ud.clipping = ud.scrollmode = ud.overhead_on = 0; //= ud.pause_on = 0; + ud.noclip = ud.scrollmode = ud.overhead_on = 0; //= ud.pause_on = 0; // G_NewGame(ud.volume_number,ud.level_number,ud.player_skill); // G_ResetTimers(); @@ -427,7 +427,7 @@ RECHECK: ud.reccnt = 0; // ud.god = ud.cashman = ud.eog = ud.showallmap = 0; - // ud.clipping = ud.scrollmode = ud.overhead_on = ud.pause_on = 0; + // ud.noclip = ud.scrollmode = ud.overhead_on = ud.pause_on = 0; totalclock = ototalclock = lockclock = 0; } diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 33f378958..18ef6c311 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7011,10 +7011,10 @@ FOUNDCHEAT: break; case CHEAT_CLIP: - ud.clipping = 1-ud.clipping; + ud.noclip = 1-ud.noclip; KB_FlushKeyBoardQueue(); g_player[myconnectindex].ps->cheat_phase = 0; - P_DoQuote(QUOTE_CHEAT_NOCLIP-!ud.clipping, g_player[myconnectindex].ps); + P_DoQuote(QUOTE_CHEAT_NOCLIP-!ud.noclip, g_player[myconnectindex].ps); return; case CHEAT_RESERVED2: diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index 350f1d574..6d12b79ba 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -165,7 +165,7 @@ typedef struct { char overhead_on,last_overhead,showweapons; char god,warp_on,cashman,eog,showallmap; - char show_help,scrollmode,clipping; + char show_help,scrollmode,noclip; char ridecule[10][40]; char savegame[10][22]; char pwlockout[128],rtsname[128]; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index baa95627f..47708d6b0 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -138,7 +138,7 @@ static inline int32_t VM_CheckSquished(void) { sectortype *sc = §or[vm.g_sp->sectnum]; - if ((vm.g_sp->picnum == APLAYER && ud.clipping) || sc->lotag == 23) + if ((vm.g_sp->picnum == APLAYER && ud.noclip) || sc->lotag == 23) return 0; { diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 3710da249..3c07d75c6 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -112,10 +112,10 @@ static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t case USERDEFS_CLIPPING: if (iSet) { - ud.clipping = lValue; + ud.noclip = lValue; return; } - Gv_SetVarX(lVar2, ud.clipping); + Gv_SetVarX(lVar2, ud.noclip); return; // case USERDEFS_USER_NAME: diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index 31551f896..c882f7dd4 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -241,7 +241,7 @@ typedef struct { char overhead_on,last_overhead,showweapons; char god,warp_on,cashman,eog,showallmap; - char show_help,scrollmode,clipping; + char show_help,scrollmode,noclip; char ridecule[10][40]; char savegame[10][22]; char pwlockout[128],rtsname[128]; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 3d5d97701..c6b062fa2 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -4557,7 +4557,7 @@ void P_ProcessInput(int32_t snum) if (p->cursectnum == -1) { - if (s->extra > 0 && ud.clipping == 0) + if (s->extra > 0 && ud.noclip == 0) { P_QuickKill(p); A_PlaySound(SQUISHED,p->i); @@ -4823,7 +4823,7 @@ void P_ProcessInput(int32_t snum) if (p->on_ground) p->bobcounter += sprite[p->i].xvel>>1; - if (ud.clipping == 0 && (sector[p->cursectnum].floorpicnum == MIRROR || p->cursectnum < 0 || p->cursectnum >= MAXSECTORS)) + if (ud.noclip == 0 && (sector[p->cursectnum].floorpicnum == MIRROR || p->cursectnum < 0 || p->cursectnum >= MAXSECTORS)) { p->pos.x = p->opos.x; p->pos.y = p->opos.y; @@ -5375,7 +5375,7 @@ HORIZONLY: if (p->cursectnum >= 0 && sector[p->cursectnum].lotag == 2) k = 0; else k = 1; - if (ud.clipping) + if (ud.noclip) { p->pos.x += p->vel.x>>14; p->pos.y += p->vel.y>>14; @@ -5436,7 +5436,7 @@ HORIZONLY: { // p->cursectnum = s->sectnum; - if (!ud.clipping && sector[p->cursectnum].lotag == 31) + if (!ud.noclip && sector[p->cursectnum].lotag == 31) { if (sprite[sector[p->cursectnum].hitag].xvel && actor[sector[p->cursectnum].hitag].t_data[0] == 0) { @@ -5453,7 +5453,7 @@ HORIZONLY: if (p->cursectnum >=0 && p->cursectnum != s->sectnum) changespritesect(p->i, p->cursectnum); - if (p->cursectnum >= 0 && ud.clipping == 0) + if (p->cursectnum >= 0 && ud.noclip == 0) { j = (pushmove((vec3_t *)p,&p->cursectnum,164L,(4L<<8),(4L<<8),CLIPMASK0) < 0 && A_GetFurthestAngle(p->i,8) < 512);