mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 04:29:34 -04:00
Numerous warning fixes and ability to compile/execute without DOGS defined (nice goin' Lee :P)
This commit is contained in:
parent
031ed7d6cb
commit
0839b87ce1
@ -89,7 +89,7 @@ extern int key_map_clear; // |
|
||||
extern int key_map_grid; // phares
|
||||
|
||||
// scale on entry
|
||||
#define INITSCALEMTOF (.2*FRACUNIT)
|
||||
#define INITSCALEMTOF (int)(.2*FRACUNIT)
|
||||
// how much the automap moves window per tic in frame-buffer coordinates
|
||||
// moves 140 pixels in 1 second
|
||||
#define F_PANINC 4
|
||||
@ -168,13 +168,25 @@ mline_t cheat_player_arrow[] =
|
||||
#define NUMCHEATPLYRLINES (sizeof(cheat_player_arrow)/sizeof(mline_t))
|
||||
|
||||
#define R (FRACUNIT)
|
||||
|
||||
#define np867R (int)(-.867*R)
|
||||
#define p867R (int)(.867*R)
|
||||
#define np5R (int)(-.5*R)
|
||||
#define p5R (int)(.5*R)
|
||||
|
||||
mline_t triangle_guy[] =
|
||||
{
|
||||
{ { -.867*R, -.5*R }, { .867*R, -.5*R } },
|
||||
{ { .867*R, -.5*R } , { 0, R } },
|
||||
{ { 0, R }, { -.867*R, -.5*R } }
|
||||
{ { np867R, np5R }, { p867R, np5R } },
|
||||
{ { p867R, np5R }, { 0, R } },
|
||||
{ { 0, R }, { np867R, np5R } }
|
||||
};
|
||||
|
||||
#undef R
|
||||
#undef np867R
|
||||
#undef p867R
|
||||
#undef np5R
|
||||
#undef p5R
|
||||
|
||||
#define NUMTRIANGLEGUYLINES (sizeof(triangle_guy)/sizeof(mline_t))
|
||||
|
||||
//jff 1/5/98 new symbol for keys on automap
|
||||
@ -189,11 +201,15 @@ mline_t cross_mark[] =
|
||||
//jff 1/5/98 end of new symbol
|
||||
|
||||
#define R (FRACUNIT)
|
||||
#define np5R (int)(-.5*R)
|
||||
#define np7R (int)(-.7*R)
|
||||
#define p7R (int)(.7*R)
|
||||
|
||||
mline_t thintriangle_guy[] =
|
||||
{
|
||||
{ { -.5*R, -.7*R }, { R, 0 } },
|
||||
{ { R, 0 }, { -.5*R, .7*R } },
|
||||
{ { -.5*R, .7*R }, { -.5*R, -.7*R } }
|
||||
{ { np5R, np7R }, { R, 0 } },
|
||||
{ { R, 0 }, { np5R, p7R } },
|
||||
{ { np5R, p7R }, { np5R, np7R } }
|
||||
};
|
||||
#undef R
|
||||
#define NUMTHINTRIANGLEGUYLINES (sizeof(thintriangle_guy)/sizeof(mline_t))
|
||||
|
@ -363,8 +363,10 @@ void D_PageDrawer(void)
|
||||
while (s--)
|
||||
c = c*3 + t[s];
|
||||
V_DrawPatch(0, 0, 0, (patch_t *) t);
|
||||
#ifdef DOGS
|
||||
if (c==2119826587u || c==2391756584u)
|
||||
V_DrawPatch(0, 0, 0, W_CacheLumpName("DOGOVRLY", PU_CACHE));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
M_DrawCredits();
|
||||
|
@ -49,7 +49,7 @@ int finalecount;
|
||||
|
||||
#define TEXTSPEED 3 // original value // phares
|
||||
#define TEXTWAIT 250 // original value // phares
|
||||
#define NEWTEXTSPEED 0.01 // new value // phares
|
||||
#define NEWTEXTSPEED 0.01f // new value // phares
|
||||
#define NEWTEXTWAIT 1000 // new value // phares
|
||||
|
||||
char* finaletext;
|
||||
@ -284,7 +284,7 @@ void F_TextWrite (void)
|
||||
cy = 10;
|
||||
ch = finaletext;
|
||||
|
||||
count = (finalecount - 10)/Get_TextSpeed(); // phares
|
||||
count = (int)((finalecount - 10)/Get_TextSpeed()); // phares
|
||||
if (count < 0)
|
||||
count = 0;
|
||||
|
||||
|
@ -274,7 +274,7 @@ void G_BuildTiccmd(ticcmd_t* cmd)
|
||||
// |
|
||||
if (gamekeydown[key_reverse]) // V
|
||||
{
|
||||
cmd->angleturn += QUICKREVERSE; // ^
|
||||
cmd->angleturn += (short)QUICKREVERSE; // ^
|
||||
gamekeydown[key_reverse] = false; // |
|
||||
} // phares
|
||||
|
||||
@ -2062,10 +2062,10 @@ byte *G_WriteOptions(byte *demo_p)
|
||||
*demo_p++ = demo_insurance; // killough 3/31/98
|
||||
|
||||
// killough 3/26/98: Added rngseed. 3/31/98: moved here
|
||||
*demo_p++ = (rngseed >> 24) & 0xff;
|
||||
*demo_p++ = (rngseed >> 16) & 0xff;
|
||||
*demo_p++ = (rngseed >> 8) & 0xff;
|
||||
*demo_p++ = rngseed & 0xff;
|
||||
*demo_p++ = (byte)((rngseed >> 24) & 0xff);
|
||||
*demo_p++ = (byte)((rngseed >> 16) & 0xff);
|
||||
*demo_p++ = (byte)((rngseed >> 8) & 0xff);
|
||||
*demo_p++ = (byte) (rngseed & 0xff);
|
||||
|
||||
// Options new to v2.03 begin here
|
||||
|
||||
|
@ -1466,7 +1466,7 @@ boolean HU_Responder(event_t *ev)
|
||||
{
|
||||
eatkey = chat_on = true;
|
||||
HUlib_resetIText(&w_chat);
|
||||
HU_queueChatChar(i+1);
|
||||
HU_queueChatChar((char)(i+1));
|
||||
break;
|
||||
}
|
||||
}//jff 2/26/98 no chat functions if message review is displayed
|
||||
@ -1484,12 +1484,12 @@ boolean HU_Responder(event_t *ev)
|
||||
macromessage = chat_macros[c];
|
||||
|
||||
// kill last message with a '\n'
|
||||
HU_queueChatChar(key_enter); // DEBUG!!! // phares
|
||||
HU_queueChatChar((char)key_enter); // DEBUG!!! // phares
|
||||
|
||||
// send the macro message
|
||||
while (*macromessage)
|
||||
HU_queueChatChar(*macromessage++);
|
||||
HU_queueChatChar(key_enter); // phares
|
||||
HU_queueChatChar((char)key_enter); // phares
|
||||
|
||||
// leave chat mode and notify that it was sent
|
||||
chat_on = false;
|
||||
|
@ -2940,12 +2940,10 @@ setup_menu_t enem_settings1[] = // Enemy Settings screen
|
||||
#ifdef DOGS
|
||||
// killough 7/19/98
|
||||
{"Number Of Single-Player Helper Dogs",S_NUM|S_LEVWARN,m_null,E_X,E_Y+ enem_helpers*8, {"player_helpers"}},
|
||||
#endif
|
||||
|
||||
// killough 8/8/98
|
||||
{"Distance Friends Stay Away",S_NUM,m_null,E_X,E_Y+ enem_distfriend*8, {"friend_distance"}},
|
||||
|
||||
#ifdef DOGS
|
||||
{"Allow dogs to jump down",S_YESNO,m_null,E_X,E_Y+ enem_dog_jumping*8, {"dog_jumping"}},
|
||||
#endif
|
||||
|
||||
|
@ -2169,13 +2169,13 @@ boolean WritePCXfile(char *filename, byte *data, int width,
|
||||
pcx->bits_per_pixel = 8; // 256 color
|
||||
pcx->xmin = 0;
|
||||
pcx->ymin = 0;
|
||||
pcx->xmax = SHORT(width-1);
|
||||
pcx->ymax = SHORT(height-1);
|
||||
pcx->hres = SHORT(width);
|
||||
pcx->vres = SHORT(height);
|
||||
pcx->xmax = SHORT((short)(width-1));
|
||||
pcx->ymax = SHORT((short)(height-1));
|
||||
pcx->hres = SHORT((short)width);
|
||||
pcx->vres = SHORT((short)height);
|
||||
memset (pcx->palette,0,sizeof(pcx->palette));
|
||||
pcx->color_planes = 1; // chunky image
|
||||
pcx->bytes_per_line = SHORT(width);
|
||||
pcx->bytes_per_line = SHORT((short)width);
|
||||
pcx->palette_type = SHORT(2); // not a grey scale
|
||||
memset (pcx->filler,0,sizeof(pcx->filler));
|
||||
|
||||
|
@ -2373,7 +2373,7 @@ void A_BrainSpit(mobj_t *mo)
|
||||
// spawn brain missile
|
||||
newmobj = P_SpawnMissile(mo, targ, MT_SPAWNSHOT);
|
||||
P_SetTarget(&newmobj->target, targ);
|
||||
newmobj->reactiontime = ((targ->y-mo->y)/newmobj->momy)/newmobj->state->tics;
|
||||
newmobj->reactiontime = (short)(((targ->y-mo->y)/newmobj->momy)/newmobj->state->tics);
|
||||
|
||||
// killough 7/18/98: brain friendliness is transferred
|
||||
newmobj->flags = (newmobj->flags & ~MF_FRIEND) | (mo->flags & MF_FRIEND);
|
||||
@ -2513,12 +2513,12 @@ void A_Spawn(mobj_t *mo)
|
||||
|
||||
void A_Turn(mobj_t *mo)
|
||||
{
|
||||
mo->angle += ((ULong64) mo->state->misc1 << 32) / 360;
|
||||
mo->angle += (angle_t)(((ULong64) mo->state->misc1 << 32) / 360);
|
||||
}
|
||||
|
||||
void A_Face(mobj_t *mo)
|
||||
{
|
||||
mo->angle = ((ULong64) mo->state->misc1 << 32) / 360;
|
||||
mo->angle = (angle_t)(((ULong64) mo->state->misc1 << 32) / 360);
|
||||
}
|
||||
|
||||
void A_Scratch(mobj_t *mo)
|
||||
@ -2548,12 +2548,12 @@ void A_LineEffect(mobj_t *mo)
|
||||
if (!(mo->intflags & MIF_LINEDONE)) // Unless already used up
|
||||
{
|
||||
line_t junk = *lines; // Fake linedef set to 1st
|
||||
if ((junk.special = mo->state->misc1)) // Linedef type
|
||||
if ((junk.special = (short)mo->state->misc1)) // Linedef type
|
||||
{
|
||||
player_t player, *oldplayer = mo->player; // Remember player status
|
||||
mo->player = &player; // Fake player
|
||||
player.health = 100; // Alive player
|
||||
junk.tag = mo->state->misc2; // Sector tag for linedef
|
||||
junk.tag = (short)mo->state->misc2; // Sector tag for linedef
|
||||
if (!P_UseSpecialLine(mo, &junk, 0)) // Try using it
|
||||
P_CrossSpecialLine(&junk, 0, mo); // Try crossing it
|
||||
if (!junk.special) // If type cleared,
|
||||
|
@ -899,8 +899,8 @@ void P_RemoveSlimeTrails(void) // killough 10/98
|
||||
Long64 dxy = (l->dx >> FRACBITS) * (l->dy >> FRACBITS);
|
||||
Long64 s = dx2 + dy2;
|
||||
int x0 = v->x, y0 = v->y, x1 = l->v1->x, y1 = l->v1->y;
|
||||
v->x = (dx2 * x0 + dy2 * x1 + dxy * (y0 - y1)) / s;
|
||||
v->y = (dy2 * y0 + dx2 * y1 + dxy * (x0 - x1)) / s;
|
||||
v->x = (fixed_t)((dx2 * x0 + dy2 * x1 + dxy * (y0 - y1)) / s);
|
||||
v->y = (fixed_t)((dy2 * y0 + dx2 * y1 + dxy * (x0 - x1)) / s);
|
||||
}
|
||||
} // Obfuscated C contest entry: :)
|
||||
while ((v != segs[i].v2) && (v = segs[i].v2));
|
||||
|
@ -2598,8 +2598,8 @@ static void Add_WallScroller(Long64 dx, Long64 dy, const line_t *l,
|
||||
d = FixedDiv(x, finesine[(tantoangle[FixedDiv(y,x) >> DBITS] + ANG90)
|
||||
>> ANGLETOFINESHIFT]);
|
||||
|
||||
x = (dy * -l->dy - dx * l->dx) / d; // killough 10/98:
|
||||
y = (dy * l->dx - dx * l->dy) / d; // Use long long arithmetic
|
||||
x = (fixed_t)((dy * -l->dy - dx * l->dx) / d); // killough 10/98:
|
||||
y = (fixed_t)((dy * l->dx - dx * l->dy) / d); // Use long long arithmetic
|
||||
Add_Scroller(sc_side, x, y, control, *l->sidenum, accel);
|
||||
}
|
||||
|
||||
@ -2914,7 +2914,7 @@ boolean PIT_PushThing(mobj_t* thing)
|
||||
{
|
||||
int x = (thing->x-sx) >> FRACBITS;
|
||||
int y = (thing->y-sy) >> FRACBITS;
|
||||
speed = ((Long64) tmpusher->magnitude << 23) / (x*x+y*y+1);
|
||||
speed = (fixed_t)(((Long64) tmpusher->magnitude << 23) / (x*x+y*y+1));
|
||||
}
|
||||
|
||||
// If speed <= 0, you're outside the effective radius. You also have
|
||||
|
@ -414,7 +414,7 @@ static void R_AddLine (seg_t *line)
|
||||
// Totally off the left edge?
|
||||
if (tspan >= span)
|
||||
return;
|
||||
angle2 = -clipangle;
|
||||
angle2 = 0 - clipangle;
|
||||
}
|
||||
|
||||
// The seg is in the view range,
|
||||
@ -563,7 +563,7 @@ static boolean R_CheckBBox(fixed_t *bspcoord) // killough 1/28/98: static
|
||||
if (tspan >= span)
|
||||
return false;
|
||||
|
||||
angle2 = -clipangle;
|
||||
angle2 = 0 - clipangle;
|
||||
}
|
||||
|
||||
// Find the first clippost
|
||||
|
@ -165,7 +165,7 @@ angle_t R_PointToAngle(fixed_t x, fixed_t y)
|
||||
y >= 0 ?
|
||||
(x > y) ? tantoangle[SlopeDiv(y,x)] : // octant 0
|
||||
ANG90-1-tantoangle[SlopeDiv(x,y)] : // octant 1
|
||||
x > (y = -y) ? -tantoangle[SlopeDiv(y,x)] : // octant 8
|
||||
x > (y = -y) ? 0-tantoangle[SlopeDiv(y,x)] : // octant 8
|
||||
ANG270+tantoangle[SlopeDiv(x,y)] : // octant 7
|
||||
y >= 0 ? (x = -x) > y ? ANG180-1-tantoangle[SlopeDiv(y,x)] : // octant 3
|
||||
ANG90 + tantoangle[SlopeDiv(x,y)] : // octant 2
|
||||
@ -181,7 +181,7 @@ angle_t R_PointToAngle2(fixed_t viewx, fixed_t viewy, fixed_t x, fixed_t y)
|
||||
y >= 0 ?
|
||||
(x > y) ? tantoangle[SlopeDiv(y,x)] : // octant 0
|
||||
ANG90-1-tantoangle[SlopeDiv(x,y)] : // octant 1
|
||||
x > (y = -y) ? -tantoangle[SlopeDiv(y,x)] : // octant 8
|
||||
x > (y = -y) ? 0-tantoangle[SlopeDiv(y,x)] : // octant 8
|
||||
ANG270+tantoangle[SlopeDiv(x,y)] : // octant 7
|
||||
y >= 0 ? (x = -x) > y ? ANG180-1-tantoangle[SlopeDiv(y,x)] : // octant 3
|
||||
ANG90 + tantoangle[SlopeDiv(x,y)] : // octant 2
|
||||
|
@ -631,7 +631,7 @@ void R_StoreWallRange(const int start, const int stop)
|
||||
offsetangle = rw_normalangle-rw_angle1;
|
||||
|
||||
if (offsetangle > ANG180)
|
||||
offsetangle = -offsetangle;
|
||||
offsetangle = 0 - offsetangle;
|
||||
|
||||
if (offsetangle > ANG90)
|
||||
offsetangle = ANG90;
|
||||
|
Loading…
x
Reference in New Issue
Block a user