From 2191e5b9de6552c97dcc763a7c0cf7379a4502d7 Mon Sep 17 00:00:00 2001 From: ilag11111 Date: Wed, 1 Oct 2014 13:49:44 -0700 Subject: [PATCH 001/609] Each Time Fix: Multiple players simultaneously entering a sector, e.g. Tails carries one in. --- src/p_floor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_floor.c b/src/p_floor.c index 6d28175eb..7edf04bc8 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2222,7 +2222,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime) oldPlayersArea = oldPlayersInArea; } - if ((affectPlayer = P_HavePlayersEnteredArea(playersArea, oldPlayersArea, inAndOut)) != -1) + while ((affectPlayer = P_HavePlayersEnteredArea(playersArea, oldPlayersArea, inAndOut)) != -1) { if (GETSECSPECIAL(sec->special, 2) == 2 || GETSECSPECIAL(sec->special, 2) == 3) { @@ -2252,6 +2252,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime) // This should now run ONLY the stuff for eachtime->sourceline itself, instead of all trigger linedefs sharing the same tag. // Makes much more sense doing it this way, honestly. P_RunTriggerLinedef(eachtime->sourceline, players[affectPlayer].mo, sec); + oldPlayersArea[affectPlayer]=1; } } From 97b61eb66d3aaa426a55f0703fa7cdcfd3da1049 Mon Sep 17 00:00:00 2001 From: ilag11111 Date: Thu, 2 Oct 2014 10:26:12 -0700 Subject: [PATCH 002/609] Each Time Fix Fix: Don't infinite loop when each time is set to trigger on exit. --- src/p_floor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_floor.c b/src/p_floor.c index 7edf04bc8..760664c7b 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2252,7 +2252,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime) // This should now run ONLY the stuff for eachtime->sourceline itself, instead of all trigger linedefs sharing the same tag. // Makes much more sense doing it this way, honestly. P_RunTriggerLinedef(eachtime->sourceline, players[affectPlayer].mo, sec); - oldPlayersArea[affectPlayer]=1; + oldPlayersArea[affectPlayer]=playersArea[affectPlayer]; } } From 54f0d0c1104a2f51dced0d58a7a432d9f3c76afb Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Tue, 18 Nov 2014 18:45:57 -0600 Subject: [PATCH 003/609] IN PROGRESS: porting eternity slopes from srb2cb --- src/Makefile | 2 + src/doomdef.h | 8 + src/m_fixed.h | 23 + src/m_vector.c | 1160 ++++++++++++++++++++++++++++++++++++++++++++++ src/m_vector.h | 123 +++++ src/p_enemy.c | 13 + src/p_floor.c | 11 +- src/p_local.h | 15 + src/p_map.c | 371 ++++++++++++--- src/p_maputl.c | 205 ++++++-- src/p_mobj.c | 103 +++- src/p_mobj.h | 10 + src/p_slopes.c | 1211 ++++++++++++++++++++++++++++++++++++++++++++++++ src/p_slopes.h | 84 ++++ src/p_spec.c | 90 +++- src/p_spec.h | 5 + src/p_user.c | 81 ++++ src/r_defs.h | 54 +++ src/tables.c | 5 +- src/tables.h | 5 +- 20 files changed, 3450 insertions(+), 129 deletions(-) create mode 100644 src/m_vector.c create mode 100644 src/m_vector.h create mode 100644 src/p_slopes.c create mode 100644 src/p_slopes.h diff --git a/src/Makefile b/src/Makefile index f5d58af3a..3e0ab2f76 100644 --- a/src/Makefile +++ b/src/Makefile @@ -432,6 +432,7 @@ OBJS:=$(i_main_o) \ $(OBJDIR)/m_misc.o \ $(OBJDIR)/m_random.o \ $(OBJDIR)/m_queue.o \ + $(OBJDIR)/m_vector.o \ $(OBJDIR)/info.o \ $(OBJDIR)/p_ceilng.o \ $(OBJDIR)/p_enemy.o \ @@ -450,6 +451,7 @@ OBJS:=$(i_main_o) \ $(OBJDIR)/p_telept.o \ $(OBJDIR)/p_tick.o \ $(OBJDIR)/p_user.o \ + $(OBJDIR)/p_slopes.o \ $(OBJDIR)/tables.o \ $(OBJDIR)/r_bsp.o \ $(OBJDIR)/r_data.o \ diff --git a/src/doomdef.h b/src/doomdef.h index c4896a764..924d09685 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -436,6 +436,14 @@ extern const char *compdate, *comptime, *comprevision; /// Fun experimental slope stuff! //#define SLOPENESS +/// Kalaron/Eternity Engine slope code (SRB2CB ported) +/// Depends on NEED_FIXED_VECTORS? for a few functions. +/// However, uses own vector types for math. +#define ESLOPE + +/// Fixed and float point types +//#define NEED_FIXED_VECTOR + /// Delete file while the game is running. /// \note EXTREMELY buggy, tends to crash game. //#define DELFILE diff --git a/src/m_fixed.h b/src/m_fixed.h index e68de0308..8bf160204 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -357,6 +357,29 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedRound(fixed_t x) return INT32_MAX; } +/*! + \brief convert a fixed_t number into double floating number + */ +#define FIXED_TO_DOUBLE(f) ((double)((f) / FRACUNIT)) + +/*! + \brief convert a double floating number into fixed_t number + */ +#define DOUBLE_TO_FIXED(f) ((fixed_t)((f) * FRACUNIT)) + +/*! + \brief convert a integer into fixed_t number + */ +#define INT_TO_FIXED(x) ((int)((x) * FRACUNIT)) + +/*! + \brief convert a fixed_t number into integer + */ +#define FIXED_TO_INT(x) (((int)(x)) / (FRACUNIT)) + +static inline int DivScale32 (fixed_t a, fixed_t b) { return (fixed_t)(((INT64)a << 32) / b); } + + #ifdef NEED_FIXED_VECTOR typedef struct diff --git a/src/m_vector.c b/src/m_vector.c new file mode 100644 index 000000000..af5189853 --- /dev/null +++ b/src/m_vector.c @@ -0,0 +1,1160 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// Copyright(C) 2004 Stephen McGranahan +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//-------------------------------------------------------------------------- +// +// DESCRIPTION: +// Vectors +// SoM created 05/18/09 +// +//----------------------------------------------------------------------------- + +#include "doomdef.h" +#include "m_vector.h" +#include "r_main.h" +#include "m_fixed.h" +#include "m_misc.h" +#include "tables.h" + +#ifdef ESLOPE + +v3fixed_t *M_LoadVec(v3fixed_t *vec, fixed_t x, fixed_t y, fixed_t z) +{ + vec->x = x; + vec->y = y; + vec->z = z; + return vec; +} + +v3fixed_t *M_CopyVec(v3fixed_t *a_o, const v3fixed_t *a_i) +{ + return M_Memcpy(a_o, a_i, sizeof(v3fixed_t)); +} + +v3float_t *M_LoadVecf(v3float_t *vec, float x, float y, float z) +{ + vec->x = x; + vec->y = y; + vec->z = z; + return vec; +} + +v3float_t *M_CopyVecf(v3float_t *a_o, const v3float_t *a_i) +{ + return M_Memcpy(a_o, a_i, sizeof(v3float_t)); +} + +// +// M_MakeVec3 +// +// Given two points, create a vector between them. +// +v3fixed_t *M_MakeVec3(const v3fixed_t *point1, const v3fixed_t *point2, v3fixed_t *a_o) +{ + a_o->x = point1->x - point2->x; + a_o->y = point1->y - point2->y; + a_o->z = point1->z - point2->z; + return a_o; +} + + +// +// M_MakeVec3f +// +// Given two points, create a vector between them. +// +v3float_t *M_MakeVec3f(const v3float_t *point1, const v3float_t *point2, v3float_t *a_o) +{ + a_o->x = point1->x - point2->x; + a_o->y = point1->y - point2->y; + a_o->z = point1->z - point2->z; + return a_o; +} + +// +// M_TranslateVec3 +// +// Translates the given vector (in the game's coordinate system) to the camera +// space (in right-handed coordinate system) This function is used for slopes. +// +void M_TranslateVec3(v3fixed_t *vec) +{ + fixed_t tx, ty, tz; + + tx = vec->x - viewx; + ty = viewz - vec->y; + tz = vec->z - viewy; + + // Just like wall projection. + vec->x = (tx * viewcos) - (tz * viewsin); + vec->z = (tz * viewcos) + (tx * viewsin); + vec->y = ty; +} + +// +// M_TranslateVec3f +// +// Translates the given vector (in the game's coordinate system) to the camera +// space (in right-handed coordinate system) This function is used for slopes. +// +void M_TranslateVec3f(v3float_t *vec) +{ + float tx, ty, tz; + + tx = vec->x - viewx; // SRB2CBTODO: This may need float viewxyz + ty = viewz - vec->y; + tz = vec->z - viewy; + + // Just like wall projection. + vec->x = (tx * viewcos) - (tz * viewsin); + vec->z = (tz * viewcos) + (tx * viewsin); + vec->y = ty; +} + +#ifdef SESLOPE +// +// M_TranslateVec3d +// +// Translates the given vector (in the game's coordinate system) to the camera +// space (in right-handed coordinate system) This function is used for slopes. +// +void M_TranslateVec3d(v3double_t *vec) +{ + double tx, ty, tz; + + tx = vec->x - viewx; // SRB2CBTODO: This may need float viewxyz + ty = viewz - vec->y; + tz = vec->z - viewy; + + // Just like wall projection. + vec->x = (tx * viewcos) - (tz * viewsin); + vec->z = (tz * viewcos) + (tx * viewsin); + vec->y = ty; +} +#endif + +// +// M_AddVec3 +// +// Adds v2 to v1 stores in dest +// +void M_AddVec3(v3fixed_t *dest, const v3fixed_t *v1, const v3fixed_t *v2) +{ + dest->x = v1->x + v2->x; + dest->y = v1->y + v2->y; + dest->z = v1->z + v2->z; +} + +// +// M_AddVec3f +// +// Adds v2 to v1 stores in dest +// +void M_AddVec3f(v3float_t *dest, const v3float_t *v1, const v3float_t *v2) +{ + dest->x = v1->x + v2->x; + dest->y = v1->y + v2->y; + dest->z = v1->z + v2->z; +} + +// +// M_SubVec3 +// +// Adds v2 to v1 stores in dest +// +void M_SubVec3(v3fixed_t *dest, const v3fixed_t *v1, const v3fixed_t *v2) // SRB2CBTODO: Make a function that allows the destxyz to equal the change of 2 args +{ + dest->x = v1->x - v2->x; + dest->y = v1->y - v2->y; + dest->z = v1->z - v2->z; +} + +// +// M_SubVec3f +// +// Subtracts v2 from v1 stores in dest +// +void M_SubVec3f(v3float_t *dest, const v3float_t *v1, const v3float_t *v2) +{ + dest->x = v1->x - v2->x; + dest->y = v1->y - v2->y; + dest->z = v1->z - v2->z; +} + +// +// M_DotVec3 +// +// Returns the dot product of v1 and v2 +// +fixed_t M_DotVec3(const v3fixed_t *v1, const v3fixed_t *v2) +{ + return FixedMul(v1->x, v2->x) + FixedMul(v1->y, v2->y) + FixedMul(v1->z, v2->z); +} + +// +// M_DotVec3f +// +// Returns the dot product of v1 and v2 +// +float M_DotVec3f(const v3float_t *v1, const v3float_t *v2) +{ + if (!v1 || !v2) + I_Error("M_DotVec3f: No vertexes!"); + if (!(v1 || v2 || v1->x || v1->y || v1->z || v2->x || v2->y || v2->z)) + I_Error("M_DotVec3f: No vertexes!"); + return (v1->x * v2->x) + (v1->y * v2->y) + (v1->z * v2->z); +} + +#ifdef SESLOPE +// +// M_DotVec3d +// +// Returns the dot product of v1 and v2 +// +double M_DotVec3d(const v3double_t *v1, const v3double_t *v2) +{ + return (v1->x * v2->x) + (v1->y * v2->y) + (v1->z * v2->z); +} +#endif + +// +// M_CrossProduct3 +// +// Gets the cross product of v1 and v2 and stores in dest +// +void M_CrossProduct3(v3fixed_t *dest, const v3fixed_t *v1, const v3fixed_t *v2) +{ + v3fixed_t tmp; + tmp.x = (v1->y * v2->z) - (v1->z * v2->y); + tmp.y = (v1->z * v2->x) - (v1->x * v2->z); + tmp.z = (v1->x * v2->y) - (v1->y * v2->x); + memcpy(dest, &tmp, sizeof(v3fixed_t)); +} + +// +// M_CrossProduct3f +// +// Gets the cross product of v1 and v2 and stores in dest +// +void M_CrossProduct3f(v3float_t *dest, const v3float_t *v1, const v3float_t *v2) +{ + v3float_t tmp; + tmp.x = (v1->y * v2->z) - (v1->z * v2->y); + tmp.y = (v1->z * v2->x) - (v1->x * v2->z); + tmp.z = (v1->x * v2->y) - (v1->y * v2->x); + memcpy(dest, &tmp, sizeof(v3float_t)); +} + +fixed_t FV_Magnitude(const v3fixed_t *a_normal) +{ + fixed_t xs = FixedMul(a_normal->x,a_normal->x); + fixed_t ys = FixedMul(a_normal->y,a_normal->y); + fixed_t zs = FixedMul(a_normal->z,a_normal->z); + return FixedSqrt(xs+ys+zs); +} + +float FV_Magnitudef(const v3float_t *a_normal) +{ + float xs = (a_normal->x * a_normal->x); + float ys = (a_normal->y * a_normal->y); + float zs = (a_normal->z * a_normal->z); + return (float)sqrt(xs+ys+zs); +} + +// Vector Complex Math +v3fixed_t *FV_Midpoint(const v3fixed_t *a_1, const v3fixed_t *a_2, v3fixed_t *a_o) +{ + a_o->x = FixedDiv(a_2->x - a_1->x, 2*FRACUNIT); + a_o->y = FixedDiv(a_2->y - a_1->y, 2*FRACUNIT); + a_o->z = FixedDiv(a_2->z - a_1->z, 2*FRACUNIT); + a_o->x = a_1->x + a_o->x; + a_o->y = a_1->y + a_o->y; + a_o->z = a_1->z + a_o->z; + return a_o; +} + +fixed_t FV_Distance(const v3fixed_t *p1, const v3fixed_t *p2) +{ + fixed_t xs = FixedMul(p2->x-p1->x,p2->x-p1->x); + fixed_t ys = FixedMul(p2->y-p1->y,p2->y-p1->y); + fixed_t zs = FixedMul(p2->z-p1->z,p2->z-p1->z); + return FixedSqrt(xs+ys+zs); +} + +v3float_t *FV_Midpointf(const v3float_t *a_1, const v3float_t *a_2, v3float_t *a_o) +{ + a_o->x = (a_2->x - a_1->x / 2.0f); + a_o->y = (a_2->y - a_1->y / 2.0f); + a_o->z = (a_2->z - a_1->z / 2.0f); + a_o->x = a_1->x + a_o->x; + a_o->y = a_1->y + a_o->y; + a_o->z = a_1->z + a_o->z; + return a_o; +} + + + +// +// AngleBetweenVectors +// +// This checks to see if a point is inside the ranges of a polygon +// +angle_t FV_AngleBetweenVectors(const v3fixed_t *Vector1, const v3fixed_t *Vector2) +{ + // Remember, above we said that the Dot Product of returns the cosine of the angle + // between 2 vectors? Well, that is assuming they are unit vectors (normalize vectors). + // So, if we don't have a unit vector, then instead of just saying arcCos(DotProduct(A, B)) + // We need to divide the dot product by the magnitude of the 2 vectors multiplied by each other. + // Here is the equation: arc cosine of (V . W / || V || * || W || ) + // the || V || means the magnitude of V. This then cancels out the magnitudes dot product magnitudes. + // But basically, if you have normalize vectors already, you can forget about the magnitude part. + + // Get the dot product of the vectors + fixed_t dotProduct = M_DotVec3(Vector1, Vector2); + + // Get the product of both of the vectors magnitudes + fixed_t vectorsMagnitude = FixedMul(FV_Magnitude(Vector1), FV_Magnitude(Vector2)); + + // Return the arc cosine of the (dotProduct / vectorsMagnitude) which is the angle in RADIANS. + return FixedAcos(FixedDiv(dotProduct, vectorsMagnitude)); +} + +float FV_AngleBetweenVectorsf(const v3float_t *Vector1, const v3float_t *Vector2) +{ + // Remember, above we said that the Dot Product of returns the cosine of the angle + // between 2 vectors? Well, that is assuming they are unit vectors (normalize vectors). + // So, if we don't have a unit vector, then instead of just saying arcCos(DotProduct(A, B)) + // We need to divide the dot product by the magnitude of the 2 vectors multiplied by each other. + // Here is the equation: arc cosine of (V . W / || V || * || W || ) + // the || V || means the magnitude of V. This then cancels out the magnitudes dot product magnitudes. + // But basically, if you have normalize vectors already, you can forget about the magnitude part. + + // Get the dot product of the vectors + float dotProduct = M_DotVec3f(Vector1, Vector2); + + // Get the product of both of the vectors magnitudes + float vectorsMagnitude = FV_Magnitudef(Vector1)*FV_Magnitudef(Vector2); + + // Return the arc cosine of the (dotProduct / vectorsMagnitude) which is the angle in RADIANS. + return acos(dotProduct/vectorsMagnitude); +} + + + +// Crazy physics code + +float M_VectorYaw(v3float_t v) +{ + return atan2(v.x, v.z); +} +float M_VectorPitch(v3float_t v) +{ + return -atan2(v.y, sqrt(v.x*v.x+v.z*v.z)); +} + +#include "z_zone.h" + +// Returns pitch roll and yaw values, allows objects to align to a slope +angles3d_t *M_VectorAlignTo(float Pitch, float Yaw, float Roll, v3float_t v, byte AngleAxis, float Rate) +{ + CONS_Printf("P %f\n", Pitch); + CONS_Printf("R %f\n", Roll); + CONS_Printf("Y %f\n", Yaw); + if (AngleAxis == 1) + { + float DestYaw = (atan2(v.z,v.x)* 180 / M_PI); + float DestRoll = (atan2(v.y,v.x)* 180 / M_PI); + + Yaw = Yaw+(DestYaw-Yaw)*Rate; + Roll = Roll+(DestRoll-Roll)*Rate; + } + else if (AngleAxis == 2) + { + float DestPitch = (atan2(v.z,v.y)* 180 / M_PI); + float DestRoll = (-atan2(v.x,v.y)* 180 / M_PI); + + Pitch = Pitch+(DestPitch-Pitch)*Rate; + Roll = Roll+(DestRoll-Roll)*Rate; + } + else if (AngleAxis == 3) + { + float DestPitch = (-atan2(v.y,v.z)* 180 / M_PI); + float DestYaw = (-atan2(v.x,v.z)* 180 / M_PI); + + Pitch = Pitch+(DestPitch-Pitch)*Rate; + Yaw = Yaw+(DestYaw-Yaw)*Rate; + } + + angles3d_t *returnangles = Z_Malloc(sizeof(angles3d_t), PU_LEVEL, NULL); + memset(returnangles, 0, sizeof(*returnangles)); + returnangles->yaw = Yaw; + returnangles->pitch = Pitch; + returnangles->roll = Roll; + + return returnangles; + +} + + + + + +#if 0 // Backport +v3fixed_t *FV_SubO(const v3fixed_t *a_i, const v3fixed_t *a_c, v3fixed_t *a_o) +{ + a_o->x = a_i->x - a_c->x; + a_o->y = a_i->y - a_c->y; + a_o->z = a_i->z - a_c->z; + return a_o; +} + +boolean FV_Equal(const v3fixed_t *a_1, const v3fixed_t *a_2) +{ + fixed_t Epsilon = FRACUNIT/FRACUNIT; + + if ((abs(a_2->x - a_1->x) > Epsilon) || + (abs(a_2->y - a_1->y) > Epsilon) || + (abs(a_2->z - a_1->z) > Epsilon)) + { + return true; + } + + return false; +} + +boolean FV_Equalf(const v3float_t *a_1, const v3float_t *a_2) +{ + float Epsilon = 1.0f/1.0f; + + if ((abs(a_2->x - a_1->x) > Epsilon) || + (abs(a_2->y - a_1->y) > Epsilon) || + (abs(a_2->z - a_1->z) > Epsilon)) + { + return true; + } + + return false; +} + +// +// Normal +// +// Calculates the normal of a polygon. +// +void FV_Normal (const v3fixed_t *a_triangle, v3fixed_t *a_normal) +{ + v3fixed_t a_1; + v3fixed_t a_2; + + FV_Point2Vec(&a_triangle[2], &a_triangle[0], &a_1); + FV_Point2Vec(&a_triangle[1], &a_triangle[0], &a_2); + + FV_Cross(&a_1, &a_2, a_normal); + + FV_NormalizeO(a_normal, a_normal); +} + +// +// PlaneDistance +// +// Calculates distance between a plane and the origin. +// +fixed_t FV_PlaneDistance(const v3fixed_t *a_normal, const v3fixed_t *a_point) +{ + return -(FixedMul(a_normal->x, a_point->x) + FixedMul(a_normal->y, a_point->y) + FixedMul(a_normal->z, a_point->z)); +} + +boolean FV_IntersectedPlane(const v3fixed_t *a_triangle, const v3fixed_t *a_line, v3fixed_t *a_normal, fixed_t *originDistance) +{ + fixed_t distance1 = 0, distance2 = 0; + + FV_Normal(a_triangle, a_normal); + + *originDistance = FV_PlaneDistance(a_normal, &a_triangle[0]); + + distance1 = (FixedMul(a_normal->x, a_line[0].x) + FixedMul(a_normal->y, a_line[0].y) + + FixedMul(a_normal->z, a_line[0].z)) + *originDistance; + + distance2 = (FixedMul(a_normal->x, a_line[1].x) + FixedMul(a_normal->y, a_line[1].y) + + FixedMul(a_normal->z, a_line[1].z)) + *originDistance; + + // Positive or zero number means no intersection + if (FixedMul(distance1, distance2) >= 0) + return false; + + return true; +} + +// +// PlaneIntersection +// +// Returns the distance from +// rOrigin to where the ray +// intersects the plane. Assumes +// you already know it intersects +// the plane. +// +fixed_t FV_PlaneIntersection(const v3fixed_t *pOrigin, const v3fixed_t *pNormal, const v3fixed_t *rOrigin, const v3fixed_t *rVector) +{ + fixed_t d = -(FV_Dot(pNormal, pOrigin)); + fixed_t number = FV_Dot(pNormal,rOrigin) + d; + fixed_t denom = FV_Dot(pNormal,rVector); + return -FixedDiv(number, denom); +} + +// +// IntersectRaySphere +// Input : rO - origin of ray in world space +// rV - vector describing direction of ray in world space +// sO - Origin of sphere +// sR - radius of sphere +// Notes : Normalized directional vectors expected +// Return: distance to sphere in world units, -1 if no intersection. +// +fixed_t FV_IntersectRaySphere(const v3fixed_t *rO, const v3fixed_t *rV, const v3fixed_t *sO, fixed_t sR) +{ + v3fixed_t Q; + fixed_t c, v, d; + FV_SubO(sO, rO, &Q); + + c = FV_Magnitude(&Q); + v = FV_Dot(&Q, rV); + d = FixedMul(sR, sR) - (FixedMul(c,c) - FixedMul(v,v)); + + // If there was no intersection, return -1 + if (d < 0*FRACUNIT) + return (-1*FRACUNIT); + + // Return the distance to the [first] intersecting point + return (v - FixedSqrt(d)); +} + +// +// IntersectionPoint +// +// This returns the intersection point of the line that intersects the plane +// +v3fixed_t *FV_IntersectionPoint(const v3fixed_t *vNormal, const v3fixed_t *vLine, fixed_t distance, v3fixed_t *ReturnVec) +{ + v3fixed_t vLineDir; // Variables to hold the point and the line's direction + fixed_t Numerator = 0, Denominator = 0, dist = 0; + + // Here comes the confusing part. We need to find the 3D point that is actually + // on the plane. Here are some steps to do that: + + // 1) First we need to get the vector of our line, Then normalize it so it's a length of 1 + FV_Point2Vec(&vLine[1], &vLine[0], &vLineDir); // Get the Vector of the line + FV_NormalizeO(&vLineDir, &vLineDir); // Normalize the lines vector + + + // 2) Use the plane equation (distance = Ax + By + Cz + D) to find the distance from one of our points to the plane. + // Here I just chose a arbitrary point as the point to find that distance. You notice we negate that + // distance. We negate the distance because we want to eventually go BACKWARDS from our point to the plane. + // By doing this is will basically bring us back to the plane to find our intersection point. + Numerator = - (FixedMul(vNormal->x, vLine[0].x) + // Use the plane equation with the normal and the line + FixedMul(vNormal->y, vLine[0].y) + + FixedMul(vNormal->z, vLine[0].z) + distance); + + // 3) If we take the dot product between our line vector and the normal of the polygon, + // this will give us the cosine of the angle between the 2 (since they are both normalized - length 1). + // We will then divide our Numerator by this value to find the offset towards the plane from our arbitrary point. + Denominator = FV_Dot(vNormal, &vLineDir); // Get the dot product of the line's vector and the normal of the plane + + // Since we are using division, we need to make sure we don't get a divide by zero error + // If we do get a 0, that means that there are INFINITE points because the the line is + // on the plane (the normal is perpendicular to the line - (Normal.Vector = 0)). + // In this case, we should just return any point on the line. + + if( Denominator == 0*FRACUNIT) // Check so we don't divide by zero + { + ReturnVec->x = vLine[0].x; + ReturnVec->y = vLine[0].y; + ReturnVec->z = vLine[0].z; + return ReturnVec; // Return an arbitrary point on the line + } + + // We divide the (distance from the point to the plane) by (the dot product) + // to get the distance (dist) that we need to move from our arbitrary point. We need + // to then times this distance (dist) by our line's vector (direction). When you times + // a scalar (single number) by a vector you move along that vector. That is what we are + // doing. We are moving from our arbitrary point we chose from the line BACK to the plane + // along the lines vector. It seems logical to just get the numerator, which is the distance + // from the point to the line, and then just move back that much along the line's vector. + // Well, the distance from the plane means the SHORTEST distance. What about in the case that + // the line is almost parallel with the polygon, but doesn't actually intersect it until half + // way down the line's length. The distance from the plane is short, but the distance from + // the actual intersection point is pretty long. If we divide the distance by the dot product + // of our line vector and the normal of the plane, we get the correct length. Cool huh? + + dist = FixedDiv(Numerator, Denominator); // Divide to get the multiplying (percentage) factor + + // Now, like we said above, we times the dist by the vector, then add our arbitrary point. + // This essentially moves the point along the vector to a certain distance. This now gives + // us the intersection point. Yay! + + // Return the intersection point + ReturnVec->x = vLine[0].x + FixedMul(vLineDir.x, dist); + ReturnVec->y = vLine[0].y + FixedMul(vLineDir.y, dist); + ReturnVec->z = vLine[0].z + FixedMul(vLineDir.z, dist); + return ReturnVec; +} + +// +// PointOnLineSide +// +// If on the front side of the line, returns 1. +// If on the back side of the line, returns 0. +// 2D only. +// +unsigned int FV_PointOnLineSide(const v3fixed_t *point, const v3fixed_t *line) +{ + fixed_t s1 = FixedMul((point->y - line[0].y),(line[1].x - line[0].x)); + fixed_t s2 = FixedMul((point->x - line[0].x),(line[1].y - line[0].y)); + return s1 - s2 < 0; +} + +// +// PointInsideBox +// +// Given four points of a box, +// determines if the supplied point is +// inside the box or not. +// +boolean FV_PointInsideBox(const v3fixed_t *point, const v3fixed_t *box) +{ + v3fixed_t lastLine[2]; + + FV_Load(&lastLine[0], box[3].x, box[3].y, box[3].z); + FV_Load(&lastLine[1], box[0].x, box[0].y, box[0].z); + + if (FV_PointOnLineSide(point, &box[0]) + || FV_PointOnLineSide(point, &box[1]) + || FV_PointOnLineSide(point, &box[2]) + || FV_PointOnLineSide(point, lastLine)) + return false; + + return true; +} +// +// LoadIdentity +// +// Loads the identity matrix into a matrix +// +void FM_LoadIdentity(fmatrix_t* matrix) +{ +#define M(row,col) matrix->m[col * 4 + row] + memset(matrix, 0x00, sizeof(fmatrix_t)); + + M(0, 0) = FRACUNIT; + M(1, 1) = FRACUNIT; + M(2, 2) = FRACUNIT; + M(3, 3) = FRACUNIT; +#undef M +} + +// +// CreateObjectMatrix +// +// Creates a matrix that can be used for +// adjusting the position of an object +// +void FM_CreateObjectMatrix(fmatrix_t *matrix, fixed_t x, fixed_t y, fixed_t z, fixed_t anglex, fixed_t angley, fixed_t anglez, fixed_t upx, fixed_t upy, fixed_t upz, fixed_t radius) +{ + v3fixed_t upcross; + v3fixed_t upvec; + v3fixed_t basevec; + + FV_Load(&upvec, upx, upy, upz); + FV_Load(&basevec, anglex, angley, anglez); + FV_Cross(&upvec, &basevec, &upcross); + FV_Normalize(&upcross); + + FM_LoadIdentity(matrix); + + matrix->m[0] = upcross.x; + matrix->m[1] = upcross.y; + matrix->m[2] = upcross.z; + matrix->m[3] = 0*FRACUNIT; + + matrix->m[4] = upx; + matrix->m[5] = upy; + matrix->m[6] = upz; + matrix->m[7] = 0; + + matrix->m[8] = anglex; + matrix->m[9] = angley; + matrix->m[10] = anglez; + matrix->m[11] = 0; + + matrix->m[12] = x - FixedMul(upx,radius); + matrix->m[13] = y - FixedMul(upy,radius); + matrix->m[14] = z - FixedMul(upz,radius); + matrix->m[15] = FRACUNIT; +} + +// +// MultMatrixVec +// +// Multiplies a vector by the specified matrix +// +void FM_MultMatrixVec(const fmatrix_t *matrix, const v3fixed_t *vec, v3fixed_t *out) +{ +#define M(row,col) matrix->m[col * 4 + row] + out->x = FixedMul(vec->x,M(0, 0)) + + FixedMul(vec->y,M(0, 1)) + + FixedMul(vec->z,M(0, 2)) + + M(0, 3); + + out->y = FixedMul(vec->x,M(1, 0)) + + FixedMul(vec->y,M(1, 1)) + + FixedMul(vec->z,M(1, 2)) + + M(1, 3); + + out->z = FixedMul(vec->x,M(2, 0)) + + FixedMul(vec->y,M(2, 1)) + + FixedMul(vec->z,M(2, 2)) + + M(2, 3); +#undef M +} + +// +// MultMatrix +// +// Multiples one matrix into another +// +void FM_MultMatrix(fmatrix_t *dest, const fmatrix_t *multme) +{ + fmatrix_t result; + unsigned int i, j; +#define M(row,col) multme->m[col * 4 + row] +#define D(row,col) dest->m[col * 4 + row] +#define R(row,col) result.m[col * 4 + row] + + for (i = 0; i < 4; i++) + { + for (j = 0; j < 4; j++) + R(i, j) = FixedMul(D(i, 0),M(0, j)) + FixedMul(D(i, 1),M(1, j)) + FixedMul(D(i, 2),M(2, j)) + FixedMul(D(i, 3),M(3, j)); + } + + M_Memcpy(dest, &result, sizeof(fmatrix_t)); + +#undef R +#undef D +#undef M +} + +// +// Translate +// +// Translates a matrix +// +void FM_Translate(fmatrix_t *dest, fixed_t x, fixed_t y, fixed_t z) +{ + fmatrix_t trans; +#define M(row,col) trans.m[col * 4 + row] + + memset(&trans, 0x00, sizeof(fmatrix_t)); + + M(0, 0) = M(1, 1) = M(2, 2) = M(3, 3) = FRACUNIT; + M(0, 3) = x; + M(1, 3) = y; + M(2, 3) = z; + + FM_MultMatrix(dest, &trans); +#undef M +} + +// +// Scale +// +// Scales a matrix +// +void FM_Scale(fmatrix_t *dest, fixed_t x, fixed_t y, fixed_t z) +{ + fmatrix_t scale; +#define M(row,col) scale.m[col * 4 + row] + + memset(&scale, 0x00, sizeof(fmatrix_t)); + + M(3, 3) = FRACUNIT; + M(0, 0) = x; + M(1, 1) = y; + M(2, 2) = z; + + FM_MultMatrix(dest, &scale); +#undef M +} + + +v3fixed_t *FV_Cross(const v3fixed_t *a_1, const v3fixed_t *a_2, v3fixed_t *a_o) +{ + a_o->x = FixedMul(a_1->y, a_2->z) - FixedMul(a_1->z, a_2->y); + a_o->y = FixedMul(a_1->z, a_2->x) - FixedMul(a_1->x, a_2->z); + a_o->z = FixedMul(a_1->x, a_2->y) - FixedMul(a_1->y, a_2->x); + return a_o; +} + +// +// ClosestPointOnLine +// +// Finds the point on a line closest +// to the specified point. +// +v3fixed_t *FV_ClosestPointOnLine(const v3fixed_t *Line, const v3fixed_t *p, v3fixed_t *out) +{ + // Determine t (the length of the vector from ëLine[0]í to ëpí) + v3fixed_t c, V; + fixed_t t, d = 0; + FV_SubO(p, &Line[0], &c); + FV_SubO(&Line[1], &Line[0], &V); + FV_NormalizeO(&V, &V); + + d = FV_Distance(&Line[0], &Line[1]); + t = FV_Dot(&V, &c); + + // Check to see if ëtí is beyond the extents of the line segment + if (t < 0) + { + return FV_Copy(out, &Line[0]); + } + if (t > d) + { + return FV_Copy(out, &Line[1]); + } + + // Return the point between ëLine[0]í and ëLine[1]í + FV_Mul(&V, t); + + return FV_AddO(&Line[0], &V, out); +} + +// +// ClosestPointOnTriangle +// +// Given a triangle and a point, +// the closest point on the edge of +// the triangle is returned. +// +void FV_ClosestPointOnTriangle (const v3fixed_t *tri, const v3fixed_t *point, v3fixed_t *result) +{ + unsigned int i; + fixed_t dist, closestdist; + v3fixed_t EdgePoints[3]; + v3fixed_t Line[2]; + + FV_Copy(&Line[0], (v3fixed_t*)&tri[0]); + FV_Copy(&Line[1], (v3fixed_t*)&tri[1]); + FV_ClosestPointOnLine(Line, point, &EdgePoints[0]); + + FV_Copy(&Line[0], (v3fixed_t*)&tri[1]); + FV_Copy(&Line[1], (v3fixed_t*)&tri[2]); + FV_ClosestPointOnLine(Line, point, &EdgePoints[1]); + + FV_Copy(&Line[0], (v3fixed_t*)&tri[2]); + FV_Copy(&Line[1], (v3fixed_t*)&tri[0]); + FV_ClosestPointOnLine(Line, point, &EdgePoints[2]); + + // Find the closest one of the three + FV_Copy(result, &EdgePoints[0]); + closestdist = FV_Distance(point, &EdgePoints[0]); + for (i = 1; i < 3; i++) + { + dist = FV_Distance(point, &EdgePoints[i]); + + if (dist < closestdist) + { + closestdist = dist; + FV_Copy(result, &EdgePoints[i]); + } + } + + // We now have the closest point! Whee! +} + +// +// InsidePolygon +// +// This checks to see if a point is inside the ranges of a polygon +// +boolean FV_InsidePolygon(const fvector_t *vIntersection, const fvector_t *Poly, const int vertexCount) +{ + int i; + UINT64 Angle = 0; // Initialize the angle + fvector_t vA, vB; // Create temp vectors + + // Just because we intersected the plane, doesn't mean we were anywhere near the polygon. + // This functions checks our intersection point to make sure it is inside of the polygon. + // This is another tough function to grasp at first, but let me try and explain. + // It's a brilliant method really, what it does is create triangles within the polygon + // from the intersection point. It then adds up the inner angle of each of those triangles. + // If the angles together add up to 360 degrees (or 2 * PI in radians) then we are inside! + // If the angle is under that value, we must be outside of polygon. To further + // understand why this works, take a pencil and draw a perfect triangle. Draw a dot in + // the middle of the triangle. Now, from that dot, draw a line to each of the vertices. + // Now, we have 3 triangles within that triangle right? Now, we know that if we add up + // all of the angles in a triangle we get 360 right? Well, that is kinda what we are doing, + // but the inverse of that. Say your triangle is an isosceles triangle, so add up the angles + // and you will get 360 degree angles. 90 + 90 + 90 is 360. + + for (i = 0; i < vertexCount; i++) // Go in a circle to each vertex and get the angle between + { + FV_Point2Vec(&Poly[i], vIntersection, &vA); // Subtract the intersection point from the current vertex + // Subtract the point from the next vertex + FV_Point2Vec(&Poly[(i + 1) % vertexCount], vIntersection, &vB); + + Angle += FV_AngleBetweenVectors(&vA, &vB); // Find the angle between the 2 vectors and add them all up as we go along + } + + // Now that we have the total angles added up, we need to check if they add up to 360 degrees. + // Since we are using the dot product, we are working in radians, so we check if the angles + // equals 2*PI. We defined PI in 3DMath.h. You will notice that we use a MATCH_FACTOR + // in conjunction with our desired degree. This is because of the inaccuracy when working + // with floating point numbers. It usually won't always be perfectly 2 * PI, so we need + // to use a little twiddling. I use .9999, but you can change this to fit your own desired accuracy. + + if(Angle >= ANGLE_MAX) // If the angle is greater than 2 PI, (360 degrees) + return 1; // The point is inside of the polygon + + return 0; // If you get here, it obviously wasn't inside the polygon. +} + +// +// IntersectedPolygon +// +// This checks if a line is intersecting a polygon +// +boolean FV_IntersectedPolygon(const fvector_t *vPoly, const fvector_t *vLine, const int vertexCount, fvector_t *collisionPoint) +{ + fvector_t vNormal, vIntersection; + fixed_t originDistance = 0*FRACUNIT; + + + // First we check to see if our line intersected the plane. If this isn't true + // there is no need to go on, so return false immediately. + // We pass in address of vNormal and originDistance so we only calculate it once + + if(!FV_IntersectedPlane(vPoly, vLine, &vNormal, &originDistance)) + return false; + + // Now that we have our normal and distance passed back from IntersectedPlane(), + // we can use it to calculate the intersection point. The intersection point + // is the point that actually is ON the plane. It is between the line. We need + // this point test next, if we are inside the polygon. To get the I-Point, we + // give our function the normal of the plane, the points of the line, and the originDistance. + + FV_IntersectionPoint(&vNormal, vLine, originDistance, &vIntersection); + + // Now that we have the intersection point, we need to test if it's inside the polygon. + // To do this, we pass in : + // (our intersection point, the polygon, and the number of vertices our polygon has) + + if(FV_InsidePolygon(&vIntersection, vPoly, vertexCount)) + { + if (collisionPoint != NULL) // Optional - load the collision point. + { + collisionPoint->x = vIntersection.x; + collisionPoint->y = vIntersection.y; + collisionPoint->z = vIntersection.z; + } + return true; // We collided! + } + + // If we get here, we must have NOT collided + return false; +} + +// +// RotateVector +// +// Rotates a vector around another vector +// +void FV_Rotate(fvector_t *rotVec, const fvector_t *axisVec, const angle_t angle) +{ + // Rotate the point (x,y,z) around the vector (u,v,w) + fixed_t ux = FixedMul(axisVec->x, rotVec->x); + fixed_t uy = FixedMul(axisVec->x, rotVec->y); + fixed_t uz = FixedMul(axisVec->x, rotVec->z); + fixed_t vx = FixedMul(axisVec->y, rotVec->x); + fixed_t vy = FixedMul(axisVec->y, rotVec->y); + fixed_t vz = FixedMul(axisVec->y, rotVec->z); + fixed_t wx = FixedMul(axisVec->z, rotVec->x); + fixed_t wy = FixedMul(axisVec->z, rotVec->y); + fixed_t wz = FixedMul(axisVec->z, rotVec->z); + fixed_t sa = FINESINE(angle); + fixed_t ca = FINECOSINE(angle); + fixed_t ua = ux+vy+wz; + fixed_t ax = FixedMul(axisVec->x,ua); + fixed_t ay = FixedMul(axisVec->y,ua); + fixed_t az = FixedMul(axisVec->z,ua); + fixed_t xs = FixedMul(axisVec->x,axisVec->x); + fixed_t ys = FixedMul(axisVec->y,axisVec->y); + fixed_t zs = FixedMul(axisVec->z,axisVec->z); + fixed_t bx = FixedMul(rotVec->x,ys+zs); + fixed_t by = FixedMul(rotVec->y,xs+zs); + fixed_t bz = FixedMul(rotVec->z,xs+ys); + fixed_t cx = FixedMul(axisVec->x,vy+wz); + fixed_t cy = FixedMul(axisVec->y,ux+wz); + fixed_t cz = FixedMul(axisVec->z,ux+vy); + fixed_t dx = FixedMul(bx-cx, ca); + fixed_t dy = FixedMul(by-cy, ca); + fixed_t dz = FixedMul(bz-cz, ca); + fixed_t ex = FixedMul(vz-wy, sa); + fixed_t ey = FixedMul(wx-uz, sa); + fixed_t ez = FixedMul(uy-vx, sa); + + rotVec->x = ax+dx+ex; + rotVec->y = ay+dy+ey; + rotVec->z = az+dz+ez; +} + +void FM_Rotate(fmatrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z) +{ +#define M(row,col) dest->m[row * 4 + col] + const fixed_t sinA = FINESINE(angle>>ANGLETOFINESHIFT); + const fixed_t cosA = FINECOSINE(angle>>ANGLETOFINESHIFT); + const fixed_t invCosA = FRACUNIT - cosA; + fvector_t nrm = {x, y, z}; + fixed_t xSq, ySq, zSq; + fixed_t sx, sy, sz; + fixed_t sxy, sxz, syz; + + FV_Normalize(&nrm); + + x = nrm.x; + y = nrm.y; + z = nrm.z; + + xSq = FixedMul(x, FixedMul(invCosA,x)); + ySq = FixedMul(y, FixedMul(invCosA,y)); + zSq = FixedMul(z, FixedMul(invCosA,z)); + + sx = FixedMul(sinA, x); + sy = FixedMul(sinA, y); + sz = FixedMul(sinA, z); + + sxy = FixedMul(x, FixedMul(invCosA,y)); + sxz = FixedMul(x, FixedMul(invCosA,z)); + syz = FixedMul(y, FixedMul(invCosA,z)); + + + M(0, 0) = xSq + cosA; + M(1, 0) = sxy - sz; + M(2, 0) = sxz + sy; + M(3, 0) = 0; + + M(0, 1) = sxy + sz; + M(1, 1) = ySq + cosA; + M(2, 1) = syz - sx; + M(3, 1) = 0; + + M(0, 2) = sxz - sy; + M(1, 2) = syz + sx; + M(2, 2) = zSq + cosA; + M(3, 2) = 0; + + M(0, 3) = 0; + M(1, 3) = 0; + M(2, 3) = 0; + M(3, 3) = FRACUNIT; +#undef M +} + +#endif + + + + +float FV_Distancef(const v3float_t *p1, const v3float_t *p2) +{ + float xs = (p2->x-p1->x * p2->x-p1->x); + float ys = (p2->y-p1->y * p2->y-p1->y); + float zs = (p2->z-p1->z * p2->z-p1->z); + return sqrt(xs+ys+zs); +} + +// Also returns the magnitude +fixed_t FV_NormalizeO(const v3fixed_t *a_normal, v3fixed_t *a_o) +{ + fixed_t magnitude = FV_Magnitude(a_normal); + a_o->x = FixedDiv(a_normal->x, magnitude); + a_o->y = FixedDiv(a_normal->y, magnitude); + a_o->z = FixedDiv(a_normal->z, magnitude); + return magnitude; +} + +// Also returns the magnitude +float FV_NormalizeOf(const v3float_t *a_normal, v3float_t *a_o) +{ + float magnitude = FV_Magnitudef(a_normal); + a_o->x = (a_normal->x/magnitude); + a_o->y = (a_normal->y/magnitude); + a_o->z = (a_normal->z/magnitude); + return magnitude; +} + +fixed_t FV_Normalize(v3fixed_t *a_normal) +{ + return FV_NormalizeO(a_normal, a_normal); +} + +fixed_t FV_Normalizef(v3float_t *a_normal) +{ + return FV_NormalizeOf(a_normal, a_normal); +} + +// +// FV_Normalf +// +// Calculates the normal of a polygon. +// +void FV_Normal(const v3fixed_t *a_triangle, v3fixed_t *a_normal) +{ + v3fixed_t a_1; + v3fixed_t a_2; + + M_MakeVec3(&a_triangle[2], &a_triangle[0], &a_1); + M_MakeVec3(&a_triangle[1], &a_triangle[0], &a_2); + + M_CrossProduct3(&a_1, &a_2, a_normal); + + FV_NormalizeO(a_normal, a_normal); +} + +// +// FV_Normalf +// +// Calculates the normal of a polygon. +// +void FV_Normalf(const v3float_t *a_triangle, v3float_t *a_normal) +{ + v3float_t a_1; + v3float_t a_2; + + M_MakeVec3f(&a_triangle[2], &a_triangle[0], &a_1); + M_MakeVec3f(&a_triangle[1], &a_triangle[0], &a_2); + + M_CrossProduct3f(&a_1, &a_2, a_normal); + + FV_NormalizeOf(a_normal, a_normal); +} + + +// EOF +#endif // #ifdef ESLOPE + diff --git a/src/m_vector.h b/src/m_vector.h new file mode 100644 index 000000000..743a26023 --- /dev/null +++ b/src/m_vector.h @@ -0,0 +1,123 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// Copyright(C) 2004 Stephen McGranahan +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//-------------------------------------------------------------------------- +// +// DESCRIPTION: +// Vectors +// SoM created 05/18/09 +// +//----------------------------------------------------------------------------- + +#ifndef M_VECTOR_H__ +#define M_VECTOR_H__ + +#ifdef ESLOPE + +#include "m_fixed.h" +#include "tables.h" + +#define TWOPI M_PI*2.0 +#define HALFPI M_PI*0.5 +#define QUARTERPI M_PI*0.25 +#define EPSILON 0.000001f +#define OMEGA 10000000.0f + +typedef struct +{ + fixed_t x, y, z; +} v3fixed_t; + +typedef struct +{ + fixed_t x, y; +} v2fixed_t; + +typedef struct +{ + float x, y, z; +} v3float_t; + +typedef struct +{ + float yaw, pitch, roll; +} angles3d_t; + +typedef struct +{ + double x, y, z; +} v3double_t; + +typedef struct +{ + float x, y; +} v2float_t; + + +v3fixed_t *M_MakeVec3(const v3fixed_t *point1, const v3fixed_t *point2, v3fixed_t *a_o); +v3float_t *M_MakeVec3f(const v3float_t *point1, const v3float_t *point2, v3float_t *a_o); +void M_TranslateVec3(v3fixed_t *vec); +void M_TranslateVec3f(v3float_t *vec); +void M_AddVec3(v3fixed_t *dest, const v3fixed_t *v1, const v3fixed_t *v2); +void M_AddVec3f(v3float_t *dest, const v3float_t *v1, const v3float_t *v2); +void M_SubVec3(v3fixed_t *dest, const v3fixed_t *v1, const v3fixed_t *v2); +void M_SubVec3f(v3float_t *dest, const v3float_t *v1, const v3float_t *v2); +fixed_t M_DotVec3(const v3fixed_t *v1, const v3fixed_t *v2); +float M_DotVec3f(const v3float_t *v1, const v3float_t *v2); + +#ifdef SESLOPE +v3double_t *M_MakeVec3d(const v3double_t *point1, const v3double_t *point2, v3double_t *a_o); +double M_DotVec3d(const v3double_t *v1, const v3double_t *v2); +void M_TranslateVec3d(v3double_t *vec); +#endif + +void M_CrossProduct3(v3fixed_t *dest, const v3fixed_t *v1, const v3fixed_t *v2); +void M_CrossProduct3f(v3float_t *dest, const v3float_t *v1, const v3float_t *v2); +fixed_t FV_Magnitude(const v3fixed_t *a_normal); +float FV_Magnitudef(const v3float_t *a_normal); +fixed_t FV_NormalizeO(const v3fixed_t *a_normal, v3fixed_t *a_o); +float FV_NormalizeOf(const v3float_t *a_normal, v3float_t *a_o); +fixed_t FV_Normalize(v3fixed_t *a_normal); +fixed_t FV_Normalizef(v3float_t *a_normal); +void FV_Normal(const v3fixed_t *a_triangle, v3fixed_t *a_normal); +void FV_Normalf(const v3float_t *a_triangle, v3float_t *a_normal); +v3fixed_t *M_LoadVec(v3fixed_t *vec, fixed_t x, fixed_t y, fixed_t z); +v3fixed_t *M_CopyVec(v3fixed_t *a_o, const v3fixed_t *a_i); +v3float_t *M_LoadVecf(v3float_t *vec, float x, float y, float z); +v3float_t *M_CopyVecf(v3float_t *a_o, const v3float_t *a_i); +v3fixed_t *FV_Midpoint(const v3fixed_t *a_1, const v3fixed_t *a_2, v3fixed_t *a_o); +fixed_t FV_Distance(const v3fixed_t *p1, const v3fixed_t *p2); +v3float_t *FV_Midpointf(const v3float_t *a_1, const v3float_t *a_2, v3float_t *a_o); +angle_t FV_AngleBetweenVectors(const v3fixed_t *Vector1, const v3fixed_t *Vector2); +float FV_AngleBetweenVectorsf(const v3float_t *Vector1, const v3float_t *Vector2); +float FV_Distancef(const v3float_t *p1, const v3float_t *p2); + + +// Kalaron: something crazy, vector physics +float M_VectorYaw(v3float_t v); +float M_VectorPitch(v3float_t v); +angles3d_t *M_VectorAlignTo(float Pitch, float Yaw, float Roll, v3float_t v, byte AngleAxis, float Rate); + + + +#endif + +// EOF +#endif // #ifdef ESLOPE + diff --git a/src/p_enemy.c b/src/p_enemy.c index 54e151123..61c943d02 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -28,6 +28,10 @@ #include "hardware/hw3sound.h" #endif +#ifdef ESLOPE +#include "p_slopes.h" +#endif + #ifdef HAVE_BLUA boolean LUA_CallAction(const char *action, mobj_t *actor); #endif @@ -5614,8 +5618,17 @@ void A_MixUp(mobj_t *actor) P_SetThingPosition(players[i].mo); +#ifdef ESLOPE + players[i].mo->floorz = (players[i].mo->subsector->sector->f_slope ? + P_GetZAt(players[i].mo->subsector->sector->f_slope, players[i].mo->x, players[i].mo->y) : + players[i].mo->subsector->sector->floorheight); + players[i].mo->ceilingz = (players[i].mo->subsector->sector->c_slope ? + P_GetZAt(players[i].mo->subsector->sector->c_slope, players[i].mo->x, players[i].mo->y) : + players[i].mo->subsector->sector->ceilingheight); +#else players[i].mo->floorz = players[i].mo->subsector->sector->floorheight; players[i].mo->ceilingz = players[i].mo->subsector->sector->ceilingheight; +#endif P_CheckPosition(players[i].mo, players[i].mo->x, players[i].mo->y); } diff --git a/src/p_floor.c b/src/p_floor.c index f798174ad..65c4821ca 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -19,6 +19,9 @@ #include "z_zone.h" #include "g_game.h" #include "r_main.h" +#ifdef ESLOPE +#include "p_slopes.h" +#endif // ========================================================================== // FLOORS @@ -1174,12 +1177,18 @@ void T_SpikeSector(levelspecthink_t *spikes) if (affectsec == spikes->sector) // Applied to an actual sector { + fixed_t affectpoint = affectsec->floorheight; + +#ifdef ESLOPE + if (affectsec->f_slope) + affectpoint = P_GetZAt(affectsec->f_slope, thing->x, thing->y); +#endif if (affectsec->flags & SF_FLIPSPECIAL_FLOOR) { if (!(thing->eflags & MFE_VERTICALFLIP) && thing->momz > 0) continue; - if (thing->z == affectsec->floorheight) + if (thing->z == affectpoint) dothepain = true; } diff --git a/src/p_local.h b/src/p_local.h index 9f8918cd8..9fbab1d85 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -50,6 +50,15 @@ // above this, a height difference is considered as a 'dropoff' #define MAXSTEPMOVE (24*FRACUNIT) +#ifdef ESLOPE +// [RH] Minimum floorplane.c value for walking +// The lower the value, the steeper the slope is +#define SECPLANESTEEPSLOPE 46000 +// ESLOPE stuff - a slope of 4 or lower is so level, treat it as flat +#define LEVELSLOPE 4 +#define STEEPSLOPE 65 +#endif + #define USERANGE (64*FRACUNIT) #define MELEERANGE (64*FRACUNIT) #define MISSILERANGE (32*64*FRACUNIT) @@ -135,6 +144,12 @@ boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec); boolean P_InSpaceSector(mobj_t *mo); boolean P_InQuicksand(mobj_t *mo); +#ifdef ESLOPE +boolean P_IsObjectOnSlope(mobj_t *mo, boolean ceiling); +boolean P_SlopeGreaterThan(mobj_t *mo, boolean ceiling, int value); +boolean P_SlopeLessThan(mobj_t *mo, boolean ceiling, int value); +#endif + void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative); void P_RestoreMusic(player_t *player); void P_SpawnShieldOrb(player_t *player); diff --git a/src/p_map.c b/src/p_map.c index 62cbf7b77..f484b6a2e 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -27,6 +27,10 @@ #include "r_splats.h" +#ifdef ESLOPE +#include "p_slopes.h" +#endif + #include "z_zone.h" #include "lua_hook.h" @@ -1213,8 +1217,21 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) // that contains the point. // Any contacted lines the step closer together // will adjust them. +#ifdef ESLOPE + if (newsubsec->sector->f_slope) + { + tmfloorz = tmdropoffz = P_GetZAt(newsubsec->sector->f_slope, thing->x, thing->y); + } + else +#endif tmfloorz = tmdropoffz = newsubsec->sector->floorheight; - tmceilingz = tmdrpoffceilz = newsubsec->sector->ceilingheight; + +#ifdef ESLOPE + if (newsubsec->sector->c_slope) + tmceilingz = P_GetZAt(newsubsec->sector->c_slope, thing->x, thing->y); + else +#endif + tmceilingz = newsubsec->sector->ceilingheight; // Check list of fake floors and see if tmfloorz/tmceilingz need to be altered. if (newsubsec->sector->ffloors) @@ -1228,32 +1245,42 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) if (!(rover->flags & FF_EXISTS)) continue; + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, thing->x, thing->y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, thing->x, thing->y); +#endif*/ + if (rover->flags & FF_GOOWATER && !(thing->flags & MF_NOGRAVITY)) { // If you're inside goowater and slowing down fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale); fixed_t minspeed = FixedMul(thing->info->height/12, thing->scale); - if (thing->z < *rover->topheight && *rover->bottomheight < thingtop + if (thing->z < topheight && bottomheight < thingtop && abs(thing->momz) < minspeed) { // Oh no! The object is stick in between the surface of the goo and sinklevel! help them out! - if (!(thing->eflags & MFE_VERTICALFLIP) && thing->z > *rover->topheight - sinklevel + if (!(thing->eflags & MFE_VERTICALFLIP) && thing->z > topheight - sinklevel && thing->momz >= 0 && thing->momz < (minspeed>>2)) thing->momz += minspeed>>2; - else if (thing->eflags & MFE_VERTICALFLIP && thingtop < *rover->bottomheight + sinklevel + else if (thing->eflags & MFE_VERTICALFLIP && thingtop < bottomheight + sinklevel && thing->momz <= 0 && thing->momz > -(minspeed>>2)) thing->momz -= minspeed>>2; // Land on the top or the bottom, depending on gravity flip. - if (!(thing->eflags & MFE_VERTICALFLIP) && thing->z >= *rover->topheight - sinklevel && thing->momz <= 0) + if (!(thing->eflags & MFE_VERTICALFLIP) && thing->z >= topheight - sinklevel && thing->momz <= 0) { - if (tmfloorz < *rover->topheight - sinklevel) - tmfloorz = *rover->topheight - sinklevel; + if (tmfloorz < topheight - sinklevel) + tmfloorz = topheight - sinklevel; } - else if (thing->eflags & MFE_VERTICALFLIP && thingtop <= *rover->bottomheight + sinklevel && thing->momz >= 0) + else if (thing->eflags & MFE_VERTICALFLIP && thingtop <= bottomheight + sinklevel && thing->momz >= 0) { - if (tmceilingz > *rover->bottomheight + sinklevel) - tmceilingz = *rover->bottomheight + sinklevel; + if (tmceilingz > bottomheight + sinklevel) + tmceilingz = bottomheight + sinklevel; } } continue; @@ -1270,7 +1297,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) if (rover->flags & FF_QUICKSAND) { - if (thing->z < *rover->topheight && *rover->bottomheight < thingtop) + if (thing->z < topheight && bottomheight < thingtop) { if (tmfloorz < thing->z) tmfloorz = thing->z; @@ -1279,21 +1306,21 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) continue; } - delta1 = thing->z - (*rover->bottomheight - + ((*rover->topheight - *rover->bottomheight)/2)); - delta2 = thingtop - (*rover->bottomheight - + ((*rover->topheight - *rover->bottomheight)/2)); + delta1 = thing->z - (bottomheight + + ((topheight - bottomheight)/2)); + delta2 = thingtop - (bottomheight + + ((topheight - bottomheight)/2)); - if (*rover->topheight > tmfloorz && abs(delta1) < abs(delta2) + if (topheight > tmfloorz && abs(delta1) < abs(delta2) && !(rover->flags & FF_REVERSEPLATFORM)) { - tmfloorz = tmdropoffz = *rover->topheight; + tmfloorz = tmdropoffz = topheight; } - if (*rover->bottomheight < tmceilingz && abs(delta1) >= abs(delta2) + if (bottomheight < tmceilingz && abs(delta1) >= abs(delta2) && !(rover->flags & FF_PLATFORM) && !(thing->type == MT_SKIM && (rover->flags & FF_SWIMMABLE))) { - tmceilingz = tmdrpoffceilz = *rover->bottomheight; + tmceilingz = tmdrpoffceilz = bottomheight; } } } @@ -1470,8 +1497,21 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam) // that contains the point. // Any contacted lines the step closer together // will adjust them. +#ifdef ESLOPE + if (newsubsec->sector->f_slope) + { + tmfloorz = tmdropoffz = P_GetZAt(newsubsec->sector->f_slope, thiscam->x, thiscam->y); + } + else +#endif tmfloorz = tmdropoffz = newsubsec->sector->floorheight; - tmceilingz = tmdrpoffceilz = newsubsec->sector->ceilingheight; + +#ifdef ESLOPE + if (newsubsec->sector->c_slope) + tmceilingz = P_GetZAt(newsubsec->sector->c_slope, thiscam->x, thiscam->y); + else +#endif + tmceilingz = newsubsec->sector->ceilingheight; // Cameras use the heightsec's heights rather then the actual sector heights. // If you can see through it, why not move the camera through it too? @@ -1500,17 +1540,27 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam) if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERALL) || GETSECSPECIAL(rover->master->frontsector->special, 4) == 12) continue; - delta1 = thiscam->z - (*rover->bottomheight - + ((*rover->topheight - *rover->bottomheight)/2)); - delta2 = thingtop - (*rover->bottomheight - + ((*rover->topheight - *rover->bottomheight)/2)); - if (*rover->topheight > tmfloorz && abs(delta1) < abs(delta2)) + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, thiscam->x, thiscam->y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, thiscam->x, thiscam->y); +#endif*/ + + delta1 = thiscam->z - (bottomheight + + ((topheight - bottomheight)/2)); + delta2 = thingtop - (bottomheight + + ((topheight - bottomheight)/2)); + if (topheight > tmfloorz && abs(delta1) < abs(delta2)) { - tmfloorz = tmdropoffz = *rover->topheight; + tmfloorz = tmdropoffz = topheight; } - if (*rover->bottomheight < tmceilingz && abs(delta1) >= abs(delta2)) + if (bottomheight < tmceilingz && abs(delta1) >= abs(delta2)) { - tmceilingz = tmdrpoffceilz = *rover->bottomheight; + tmceilingz = tmdrpoffceilz = bottomheight; } } } @@ -1703,8 +1753,30 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam) } else { - tmfloorz = thiscam->subsector->sector->floorheight; - tmceilingz = thiscam->subsector->sector->ceilingheight; +#ifdef ESLOPE // SRB2CBTODO: Checking the things momx/y help with collision issues, but makes going done slopes not as smooth + if (thiscam->subsector->sector && thiscam->subsector->sector->f_slope) + { + // SRB2CBTODO: Support a mobj's gravity for this too + if (P_GetZAt(thiscam->subsector->sector->f_slope, thiscam->x+thiscam->momx, thiscam->y+thiscam->momy) > P_GetZAt(thiscam->subsector->sector->f_slope, thiscam->x, thiscam->y)) + thiscam->floorz = P_GetZAt(thiscam->subsector->sector->f_slope, thiscam->x+thiscam->momx, thiscam->y+thiscam->momy); + else + thiscam->floorz = P_GetZAt(thiscam->subsector->sector->f_slope, thiscam->x, thiscam->y); + } + else +#endif + tmfloorz = thiscam->subsector->sector->floorheight; +#ifdef ESLOPE + if (thiscam->subsector->sector && thiscam->subsector->sector->c_slope) + { + // SRB2CBTODO: Support a mobj's gravity for this too + if (P_GetZAt(thiscam->subsector->sector->c_slope, thiscam->x+thiscam->momx, thiscam->y+thiscam->momy) < P_GetZAt(thiscam->subsector->sector->c_slope, thiscam->x, thiscam->y)) + thiscam->ceilingz = P_GetZAt(thiscam->subsector->sector->c_slope, thiscam->x, thiscam->y); + else + thiscam->ceilingz = P_GetZAt(thiscam->subsector->sector->c_slope, thiscam->x+thiscam->momx, thiscam->y+thiscam->momy); + } + else +#endif + tmceilingz = thiscam->subsector->sector->ceilingheight; } // the move is ok, @@ -1966,8 +2038,111 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) // Link the thing into its new position P_UnsetThingPosition(thing); - thing->floorz = tmfloorz; - thing->ceilingz = tmceilingz; +#ifdef ESLOPE + // By virtue of being derived from SRB2 code, Kalaron's physics are GPL. + if (P_IsObjectOnSlope(thing, false)) + { + fixed_t thingspeed = P_AproxDistance(thing->momx, thing->momy); + fixed_t predictmomx = x+(thing->momx/2); + fixed_t predictmomy = y+(thing->momy/2); + sector_t *nextsector = R_PointInSubsector(predictmomx, predictmomy)->sector; + sector_t *currentsector = R_PointInSubsector(thing->x, thing->y)->sector; + fixed_t zthrust = 0; + fixed_t slopeang = currentsector->f_slope->zangle; + fixed_t nextz = nextsector->floorheight; + if (nextsector->f_slope) + nextz = P_GetZAt(nextsector->f_slope, thing->x+predictmomx+thing->momx, thing->y+predictmomy+thing->momy); + + if (nextsector != currentsector) + { + // Give a boost up from the slope you came if the next sector is lower than the first + // If your next sector does not have a slope and you're comming off of one + if (currentsector->f_slope) + if (P_GetZAt(currentsector->f_slope, thing->x, thing->y)/FRACUNIT > (nextz/FRACUNIT)+(slopeang*3)) + //&& !nextsector->f_slope // TODO: VPHYSICS height check, not this hacky check? Or is this good enough? + if (currentsector->f_slope->zangle > 9) + { + fixed_t currentz = P_GetZAt(currentsector->f_slope, thing->x, thing->y); + fixed_t predictz = P_GetZAt(currentsector->f_slope, thing->x+thing->momx, thing->y+thing->momy); + + predictz += (((thing->pitchangle/(ANGLE_45/45))+90)/70.0f)+thingspeed/9; + + // Make sure that the z doesn't go too high for steep slopes + + predictz -= ((currentsector->f_slope->zangle)/4)*FRACUNIT; + if (currentsector->f_slope->zangle > 60) // really steep + { + predictz -= ((currentsector->f_slope->zangle)/2)*FRACUNIT; + } + + zthrust = (predictz - currentz)/2; + + if (zthrust > (30*thing->scale/100)*FRACUNIT) + zthrust = (30*thing->scale/100)*FRACUNIT; + + if (zthrust < -(30*thing->scale/100)*FRACUNIT) + zthrust = -(30*thing->scale/100)*FRACUNIT; + + if (currentz/FRACUNIT > (nextz/FRACUNIT)+(slopeang*3)) + { + // Now even out the momx/momy when catapulting off a steep slope + if (currentsector->f_slope->zangle > 65) + { + thing->momx /= 4.0f; + thing->momy /= 4.0f; + } + else if (currentsector->f_slope->zangle > 60) + { + thing->momx /= 3.5f; + thing->momy /= 3.5f; + } + else if (currentsector->f_slope->zangle > 50) + { + thing->momx /= 3.4f; + thing->momy /= 3.4f; + } + else if (currentsector->f_slope->zangle > 40) + { + thing->momx /= 3.3f; + thing->momy /= 3.3f; + } + } + + thing->momz += zthrust; // VPHYSICS TODO: Make a real formula for z trajectory going off a slope + /*CONS_Printf("CurZ %i, PredictZ %i\n", currentz/FRACUNIT, predictz/FRACUNIT); + CONS_Printf("Pitch: %i\n", thing->pitchangle/(ANG45/45)+90); + CONS_Printf("ZThrust: %i\n", zthrust/FRACUNIT);*/ + } + } + } +#endif + + // P_CheckPosition sets the tmfloorz with slopes, but after P_UnsetThingPosition, recheck the function here + // TODO: Make a function for floor/ceilingz auto check with slopes? +#ifdef ESLOPE + if (thing->subsector->sector->f_slope) + { + // TODO: Support a mobj's gravity for this too + if (P_GetZAt(thing->subsector->sector->f_slope, thing->x+thing->momx, thing->y+thing->momy) > P_GetZAt(thing->subsector->sector->f_slope, thing->x, thing->y)) + thing->floorz = P_GetZAt(thing->subsector->sector->f_slope, thing->x+thing->momx, thing->y+thing->momy); + else + thing->floorz = P_GetZAt(thing->subsector->sector->f_slope, thing->x, thing->y); + } + else +#endif + thing->floorz = tmfloorz; +#ifdef ESLOPE + if (thing->subsector->sector->c_slope) + { + // SRB2CBTODO: Support a mobj's gravity for this too + if (P_GetZAt(thing->subsector->sector->c_slope, thing->x+thing->momx, thing->y+thing->momy) < P_GetZAt(thing->subsector->sector->c_slope, thing->x, thing->y)) + thing->ceilingz = P_GetZAt(thing->subsector->sector->c_slope, thing->x, thing->y); + else + thing->ceilingz = P_GetZAt(thing->subsector->sector->c_slope, thing->x+thing->momx, thing->y+thing->momy); + } + else +#endif + thing->ceilingz = tmceilingz; thing->x = x; thing->y = y; @@ -1983,6 +2158,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y) { fixed_t tryx, tryy; + tryx = thing->x; tryy = thing->y; do { @@ -2004,7 +2180,15 @@ boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y) if (!(thing->flags & MF_NOCLIP)) { - const fixed_t maxstep = MAXSTEPMOVE; + fixed_t maxstep = MAXSTEPMOVE; + +#ifdef ESLOPE // TODO: Make this collosion better + // Maxstepmove = 0 means the object bounces like a nut while going down a slope + if (thing->subsector->sector->f_slope) + { + maxstep *= thing->subsector->sector->f_slope->zangle; + } +#endif if (tmceilingz - tmfloorz < thing->height) return false; // doesn't fit @@ -2308,12 +2492,24 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle) { fixed_t platx, platy; subsector_t *glidesector; + fixed_t floorz, ceilingz; platx = P_ReturnThrustX(player->mo, angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale)); platy = P_ReturnThrustY(player->mo, angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale)); glidesector = R_PointInSubsector(player->mo->x + platx, player->mo->y + platy); + floorz = glidesector->sector->floorheight; +#ifdef ESLOPE + if (glidesector->sector->f_slope) + floorz = P_GetZAt(glidesector->sector->f_slope, player->mo->x + platx, player->mo->y + platy); +#endif + ceilingz = glidesector->sector->ceilingheight; +#ifdef ESLOPE + if (glidesector->sector->c_slope) + ceilingz = P_GetZAt(glidesector->sector->c_slope, player->mo->x + platx, player->mo->y + platy); +#endif + if (glidesector->sector != player->mo->subsector->sector) { boolean floorclimb = false; @@ -2326,34 +2522,44 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle) if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER)) continue; + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, player->mo->x, player->mo->y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, player->mo->x, player->mo->y); +#endif*/ + floorclimb = true; if (player->mo->eflags & MFE_VERTICALFLIP) { - if ((*rover->topheight < player->mo->z + player->mo->height) && ((player->mo->z + player->mo->height + player->mo->momz) < *rover->topheight)) + if ((topheight < player->mo->z + player->mo->height) && ((player->mo->z + player->mo->height + player->mo->momz) < topheight)) { floorclimb = true; } - if (*rover->topheight < player->mo->z) // Waaaay below the ledge. + if (topheight < player->mo->z) // Waaaay below the ledge. { floorclimb = false; } - if (*rover->bottomheight > player->mo->z + player->mo->height - FixedMul(16*FRACUNIT,player->mo->scale)) + if (bottomheight > player->mo->z + player->mo->height - FixedMul(16*FRACUNIT,player->mo->scale)) { floorclimb = false; } } else { - if ((*rover->bottomheight > player->mo->z) && ((player->mo->z - player->mo->momz) > *rover->bottomheight)) + if ((bottomheight > player->mo->z) && ((player->mo->z - player->mo->momz) > bottomheight)) { floorclimb = true; } - if (*rover->bottomheight > player->mo->z + player->mo->height) // Waaaay below the ledge. + if (bottomheight > player->mo->z + player->mo->height) // Waaaay below the ledge. { floorclimb = false; } - if (*rover->topheight < player->mo->z + FixedMul(16*FRACUNIT,player->mo->scale)) + if (topheight < player->mo->z + FixedMul(16*FRACUNIT,player->mo->scale)) { floorclimb = false; } @@ -2366,30 +2572,30 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle) if (player->mo->eflags & MFE_VERTICALFLIP) { - if ((glidesector->sector->floorheight <= player->mo->z + player->mo->height) - && ((player->mo->z + player->mo->height - player->mo->momz) <= glidesector->sector->floorheight)) + if ((floorz <= player->mo->z + player->mo->height) + && ((player->mo->z + player->mo->height - player->mo->momz) <= floorz)) floorclimb = true; - if ((glidesector->sector->floorheight > player->mo->z) + if ((floorz > player->mo->z) && glidesector->sector->floorpic == skyflatnum) return false; - if ((player->mo->z + player->mo->height - FixedMul(16*FRACUNIT,player->mo->scale) > glidesector->sector->ceilingheight) - || (player->mo->z + player->mo->height <= glidesector->sector->floorheight)) + if ((player->mo->z + player->mo->height - FixedMul(16*FRACUNIT,player->mo->scale) > ceilingz) + || (player->mo->z + player->mo->height <= floorz)) floorclimb = true; } else { - if ((glidesector->sector->ceilingheight >= player->mo->z) - && ((player->mo->z - player->mo->momz) >= glidesector->sector->ceilingheight)) + if ((ceilingz >= player->mo->z) + && ((player->mo->z - player->mo->momz) >= ceilingz)) floorclimb = true; - if ((glidesector->sector->ceilingheight < player->mo->z+player->mo->height) + if ((ceilingz < player->mo->z+player->mo->height) && glidesector->sector->ceilingpic == skyflatnum) return false; - if ((player->mo->z + FixedMul(16*FRACUNIT,player->mo->scale) < glidesector->sector->floorheight) - || (player->mo->z >= glidesector->sector->ceilingheight)) + if ((player->mo->z + FixedMul(16*FRACUNIT,player->mo->scale) < ceilingz) + || (player->mo->z >= ceilingz)) floorclimb = true; } @@ -2408,6 +2614,7 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle) static boolean PTR_SlideTraverse(intercept_t *in) { line_t *li; + fixed_t maxstep; I_Assert(in->isaline); @@ -2440,7 +2647,17 @@ static boolean PTR_SlideTraverse(intercept_t *in) if (opentop - slidemo->z < slidemo->height) goto isblocking; // mobj is too high - if (openbottom - slidemo->z > FixedMul(MAXSTEPMOVE, slidemo->scale)) + maxstep = FixedMul(MAXSTEPMOVE, slidemo->scale); + +#ifdef ESLOPE // TODO: Make this collosion better + // Maxstepmove = 0 means the object bounces like a nut while going down a slope + if (slidemo->subsector->sector->f_slope) + { + maxstep *= slidemo->subsector->sector->f_slope->zangle; + } +#endif + + if (openbottom - slidemo->z > maxstep) goto isblocking; // too big a step up // this line doesn't block movement @@ -2476,13 +2693,23 @@ isblocking: if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || (rover->flags & FF_BUSTUP)) continue; - if (*rover->topheight < slidemo->z) + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, slidemo->x, slidemo->y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, slidemo->x, slidemo->y); +#endif*/ + + if (topheight < slidemo->z) continue; - if (*rover->bottomheight > slidemo->z + slidemo->height) + if (bottomheight > slidemo->z + slidemo->height) continue; - // Got this far, so I guess it's climbable. + // Got this far, so I guess it's climbable. // TODO: Climbing check, also, better method to do this? if (rover->master->flags & ML_TFERLINE) { size_t linenum = li-checksector->lines[0]; @@ -3109,9 +3336,19 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush) || ((rover->flags & FF_BLOCKOTHERS) && !thing->player)) || !(rover->flags & FF_EXISTS)) continue; - delta1 = thing->z - (*rover->bottomheight + *rover->topheight)/2; - delta2 = thingtop - (*rover->bottomheight + *rover->topheight)/2; - if (*rover->bottomheight <= thing->ceilingz && abs(delta1) >= abs(delta2)) + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, thing->x, thing->y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, thing->x, thing->y); +#endif*/ + + delta1 = thing->z - (bottomheight + topheight)/2; + delta2 = thingtop - (bottomheight + topheight)/2; + if (bottomheight <= thing->ceilingz && abs(delta1) >= abs(delta2)) { if (thing->flags & MF_PUSHABLE) { @@ -3785,7 +4022,7 @@ void P_MapEnd(void) } // P_FloorzAtPos -// Returns the floorz of the XYZ position +// Returns the floorz of the XYZ position // TODO: Need ceilingpos function too // Tails 05-26-2003 fixed_t P_FloorzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height) { @@ -3806,9 +4043,19 @@ fixed_t P_FloorzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height) if ((!(rover->flags & FF_SOLID || rover->flags & FF_QUICKSAND) || (rover->flags & FF_SWIMMABLE))) continue; + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, x, y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, x, y); +#endif*/ + if (rover->flags & FF_QUICKSAND) { - if (z < *rover->topheight && *rover->bottomheight < thingtop) + if (z < topheight && bottomheight < thingtop) { if (floorz < z) floorz = z; @@ -3816,10 +4063,10 @@ fixed_t P_FloorzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height) continue; } - delta1 = z - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2)); - delta2 = thingtop - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2)); - if (*rover->topheight > floorz && abs(delta1) < abs(delta2)) - floorz = *rover->topheight; + delta1 = z - (bottomheight + ((topheight - bottomheight)/2)); + delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2)); + if (topheight > floorz && abs(delta1) < abs(delta2)) + floorz = topheight; } } diff --git a/src/p_maputl.c b/src/p_maputl.c index 48dd54e8d..f311bffce 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -20,6 +20,9 @@ #include "p_maputl.h" #include "p_polyobj.h" #include "z_zone.h" +#ifdef ESLOPE +#include "p_slopes.h" +#endif // // P_AproxDistance @@ -347,31 +350,68 @@ void P_CameraLineOpening(line_t *linedef) { frontfloor = sectors[front->camsec].floorheight; frontceiling = sectors[front->camsec].ceilingheight; +#ifdef ESLOPE + if (sectors[front->camsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) + frontfloor = P_GetZAt(sectors[front->camsec].f_slope, camera.x, camera.y); + if (sectors[front->camsec].c_slope) + frontceiling = P_GetZAt(sectors[front->camsec].c_slope, camera.x, camera.y); +#endif + } else if (front->heightsec >= 0) { frontfloor = sectors[front->heightsec].floorheight; frontceiling = sectors[front->heightsec].ceilingheight; +#ifdef ESLOPE + if (sectors[front->heightsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) + frontfloor = P_GetZAt(sectors[front->heightsec].f_slope, camera.x, camera.y); + if (sectors[front->heightsec].c_slope) + frontceiling = P_GetZAt(sectors[front->heightsec].c_slope, camera.x, camera.y); +#endif } else { frontfloor = front->floorheight; frontceiling = front->ceilingheight; +#ifdef ESLOPE + if (front->f_slope) + frontfloor = P_GetZAt(front->f_slope, camera.x, camera.y); + if (front->c_slope) + frontceiling = P_GetZAt(front->c_slope, camera.x, camera.y); +#endif } if (back->camsec >= 0) { backfloor = sectors[back->camsec].floorheight; backceiling = sectors[back->camsec].ceilingheight; +#ifdef ESLOPE + if (sectors[back->camsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) + frontfloor = P_GetZAt(sectors[back->camsec].f_slope, camera.x, camera.y); + if (sectors[back->camsec].c_slope) + frontceiling = P_GetZAt(sectors[back->camsec].c_slope, camera.x, camera.y); +#endif } else if (back->heightsec >= 0) { backfloor = sectors[back->heightsec].floorheight; backceiling = sectors[back->heightsec].ceilingheight; +#ifdef ESLOPE + if (sectors[back->heightsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) + frontfloor = P_GetZAt(sectors[back->heightsec].f_slope, camera.x, camera.y); + if (sectors[back->heightsec].c_slope) + frontceiling = P_GetZAt(sectors[back->heightsec].c_slope, camera.x, camera.y); +#endif } else { backfloor = back->floorheight; backceiling = back->ceilingheight; +#ifdef ESLOPE + if (back->f_slope) + frontfloor = P_GetZAt(back->f_slope, camera.x, camera.y); + if (back->c_slope) + frontceiling = P_GetZAt(back->c_slope, camera.x, camera.y); +#endif } { @@ -416,17 +456,28 @@ void P_CameraLineOpening(line_t *linedef) if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_RENDERALL) || !(rover->flags & FF_EXISTS) || GETSECSPECIAL(rover->master->frontsector->special, 4) == 12) continue; - delta1 = abs(mapcampointer->z - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); - delta2 = abs(thingtop - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); - if (*rover->bottomheight < lowestceiling && delta1 >= delta2) - lowestceiling = *rover->bottomheight; - else if (*rover->bottomheight < highestceiling && delta1 >= delta2) - highestceiling = *rover->bottomheight; + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; - if (*rover->topheight > highestfloor && delta1 < delta2) - highestfloor = *rover->topheight; - else if (*rover->topheight > lowestfloor && delta1 < delta2) - lowestfloor = *rover->topheight; +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, camera.x, camera.y); + + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, camera.x, camera.y); +#endif // ESLOPE*/ + + delta1 = abs(mapcampointer->z - (bottomheight + ((topheight - bottomheight)/2))); + delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); + if (bottomheight < lowestceiling && delta1 >= delta2) + lowestceiling = bottomheight; + else if (bottomheight < highestceiling && delta1 >= delta2) + highestceiling = bottomheight; + + if (topheight > highestfloor && delta1 < delta2) + highestfloor = topheight; + else if (topheight > lowestfloor && delta1 < delta2) + lowestfloor = topheight; } // Check for backsectors fake floors @@ -436,17 +487,28 @@ void P_CameraLineOpening(line_t *linedef) if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_RENDERALL) || !(rover->flags & FF_EXISTS) || GETSECSPECIAL(rover->master->frontsector->special, 4) == 12) continue; - delta1 = abs(mapcampointer->z - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); - delta2 = abs(thingtop - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); - if (*rover->bottomheight < lowestceiling && delta1 >= delta2) - lowestceiling = *rover->bottomheight; - else if (*rover->bottomheight < highestceiling && delta1 >= delta2) - highestceiling = *rover->bottomheight; + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; - if (*rover->topheight > highestfloor && delta1 < delta2) - highestfloor = *rover->topheight; - else if (*rover->topheight > lowestfloor && delta1 < delta2) - lowestfloor = *rover->topheight; +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, camera.x, camera.y); + + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, camera.x, camera.y); +#endif // ESLOPE*/ + + delta1 = abs(mapcampointer->z - (bottomheight + ((topheight - bottomheight)/2))); + delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); + if (bottomheight < lowestceiling && delta1 >= delta2) + lowestceiling = bottomheight; + else if (bottomheight < highestceiling && delta1 >= delta2) + highestceiling = bottomheight; + + if (topheight > highestfloor && delta1 < delta2) + highestfloor = topheight; + else if (topheight > lowestfloor && delta1 < delta2) + lowestfloor = topheight; } if (highestceiling < highceiling) @@ -520,6 +582,33 @@ void P_LineOpening(line_t *linedef) { fixed_t thingtop = tmthing->z + tmthing->height; +#ifdef ESLOPE + // I suspect the math here is wrong and we should be comparing the slope Zs + // if either are slopes. + // -- Fury + if (front->c_slope && front->ceilingheight < back->ceilingheight) + { + opentop = P_GetZAt(front->c_slope, tmthing->x, tmthing->y); + if (back->c_slope) highceiling = P_GetZAt(back->c_slope, tmthing->x, tmthing->y); + } + else if (back->c_slope && front->ceilingheight >= back->ceilingheight) + { + opentop = P_GetZAt(back->c_slope, tmthing->x, tmthing->y); + if (front->c_slope) highceiling = P_GetZAt(front->c_slope, tmthing->x, tmthing->y); + } + + if (front->c_slope && front->floorheight < back->floorheight) + { + openbottom = P_GetZAt(front->f_slope, tmthing->x, tmthing->y); + if (back->f_slope) lowfloor = P_GetZAt(back->f_slope, tmthing->x, tmthing->y); + } + if (back->f_slope && front->floorheight >= back->floorheight) + { + openbottom = P_GetZAt(back->f_slope, tmthing->x, tmthing->y); + if (front->f_slope) lowfloor = P_GetZAt(back->f_slope, tmthing->x, tmthing->y); + } +#endif + // Check for fake floors in the sector. if (front->ffloors || back->ffloors #ifdef POLYOBJECTS @@ -547,23 +636,34 @@ void P_LineOpening(line_t *linedef) || (rover->flags & FF_BLOCKOTHERS && !tmthing->player))) continue; - delta1 = abs(tmthing->z - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); - delta2 = abs(thingtop - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, camera.x, camera.y); + + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, camera.x, camera.y); +#endif*/ + + delta1 = abs(tmthing->z - (bottomheight + ((topheight - bottomheight)/2))); + delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); if (delta1 >= delta2 && !(rover->flags & FF_PLATFORM)) // thing is below FOF { - if (*rover->bottomheight < lowestceiling) - lowestceiling = *rover->bottomheight; - else if (*rover->bottomheight < highestceiling) - highestceiling = *rover->bottomheight; + if (bottomheight < lowestceiling) + lowestceiling = bottomheight; + else if (bottomheight < highestceiling) + highestceiling = bottomheight; } if (delta1 < delta2 && !(rover->flags & FF_REVERSEPLATFORM)) // thing is above FOF { - if (*rover->topheight > highestfloor) - highestfloor = *rover->topheight; - else if (*rover->topheight > lowestfloor) - lowestfloor = *rover->topheight; + if (topheight > highestfloor) + highestfloor = topheight; + else if (topheight > lowestfloor) + lowestfloor = topheight; } } @@ -579,23 +679,34 @@ void P_LineOpening(line_t *linedef) || (rover->flags & FF_BLOCKOTHERS && !tmthing->player))) continue; - delta1 = abs(tmthing->z - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); - delta2 = abs(thingtop - (*rover->bottomheight + ((*rover->topheight - *rover->bottomheight)/2))); + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, tmthing->x, tmthing->y); + + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, tmthing->x, tmthing->y); +#endif*/ + + delta1 = abs(tmthing->z - (bottomheight + ((topheight - bottomheight)/2))); + delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); if (delta1 >= delta2 && !(rover->flags & FF_PLATFORM)) // thing is below FOF { - if (*rover->bottomheight < lowestceiling) - lowestceiling = *rover->bottomheight; - else if (*rover->bottomheight < highestceiling) - highestceiling = *rover->bottomheight; + if (bottomheight < lowestceiling) + lowestceiling = bottomheight; + else if (bottomheight < highestceiling) + highestceiling = bottomheight; } if (delta1 < delta2 && !(rover->flags & FF_REVERSEPLATFORM)) // thing is above FOF { - if (*rover->topheight > highestfloor) - highestfloor = *rover->topheight; - else if (*rover->topheight > lowestfloor) - lowestfloor = *rover->topheight; + if (topheight > highestfloor) + highestfloor = topheight; + else if (topheight > lowestfloor) + lowestfloor = topheight; } } @@ -732,6 +843,16 @@ void P_SetThingPosition(mobj_t *thing) ss = thing->subsector = R_PointInSubsector(thing->x, thing->y); + fixed_t tfloorz, tceilz; + tfloorz = ss->sector->floorheight; + tceilz = ss->sector->ceilingheight; +#ifdef ESLOPE + if (ss->sector->f_slope) + tfloorz = P_GetZAt(ss->sector->f_slope, thing->x, thing->y); + if (ss->sector->c_slope) + tceilz = P_GetZAt(ss->sector->c_slope, thing->x, thing->y); +#endif + if (!(thing->flags & MF_NOSECTOR)) { // invisible things don't go into the sector links @@ -794,10 +915,10 @@ void P_SetThingPosition(mobj_t *thing) { if (thing->eflags & MFE_VERTICALFLIP) { - if (thing->z + thing->height >= thing->subsector->sector->ceilingheight) + if (thing->z + thing->height >= tceilz) thing->eflags |= MFE_JUSTSTEPPEDDOWN; } - else if (thing->z <= thing->subsector->sector->floorheight) + else if (thing->z <= tfloorz) thing->eflags |= MFE_JUSTSTEPPEDDOWN; } } diff --git a/src/p_mobj.c b/src/p_mobj.c index e85e25b05..9c6ce831f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -31,6 +31,9 @@ #include "i_video.h" #include "lua_hook.h" #include "b_bot.h" +#ifdef ESLOPE +#include "p_slopes.h" +#endif // protos. static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}}; @@ -700,15 +703,75 @@ boolean P_InsideANonSolidFFloor(mobj_t *mobj, ffloor_t *rover) || ((rover->flags & FF_BLOCKOTHERS) && !mobj->player))) return false; - if (mobj->z > *rover->topheight) + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, mobj->x, mobj->y); + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, mobj->x, mobj->y); +#endif*/ + + if (mobj->z > topheight) return false; - if (mobj->z + mobj->height < *rover->bottomheight) + if (mobj->z + mobj->height < bottomheight) return false; return true; } +fixed_t P_GetMobjZAtSecF(mobj_t *mobj, sector_t *sector) // SRB2CBTODO: This needs to be over all the code +{ + I_Assert(mobj != NULL); +#ifdef ESLOPE + if (sector->f_slope) + return P_GetZAt(sector->f_slope, mobj->x, mobj->y); + else +#endif + return sector->floorheight; +} + +fixed_t P_GetMobjZAtF(mobj_t *mobj) // SRB2CBTODO: This needs to be over all the code +{ + I_Assert(mobj != NULL); + sector_t *sector; + sector = R_PointInSubsector(mobj->x, mobj->y)->sector; + +#ifdef ESLOPE + if (sector->f_slope) + return P_GetZAt(sector->f_slope, mobj->x, mobj->y); + else +#endif + return sector->floorheight; +} + +fixed_t P_GetMobjZAtSecC(mobj_t *mobj, sector_t *sector) // SRB2CBTODO: This needs to be over all the code +{ + I_Assert(mobj != NULL); +#ifdef ESLOPE + if (sector->c_slope) + return P_GetZAt(sector->c_slope, mobj->x, mobj->y); + else +#endif + return sector->ceilingheight; +} + +fixed_t P_GetMobjZAtC(mobj_t *mobj) // SRB2CBTODO: This needs to be over all the code +{ + I_Assert(mobj != NULL); + sector_t *sector; + sector = R_PointInSubsector(mobj->x, mobj->y)->sector; + +#ifdef ESLOPE + if (sector->c_slope) + return P_GetZAt(sector->c_slope, mobj->x, mobj->y); + else +#endif + return sector->ceilingheight; +} + static void P_PlayerFlip(mobj_t *mo) { if (!mo->player) @@ -2455,6 +2518,11 @@ void P_MobjCheckWater(mobj_t *mobj) // Default if no water exists. mobj->watertop = mobj->waterbottom = mobj->subsector->sector->floorheight - 1000*FRACUNIT; +#ifdef ESLOPE // Set the correct waterbottom/top to be below the lowest point of the slope + if (mobj->subsector->sector->f_slope) + mobj->watertop = mobj->waterbottom = mobj->subsector->sector->f_slope->lowz - 1000*FRACUNIT; +#endif + // Reset water state. mobj->eflags &= ~(MFE_UNDERWATER|MFE_TOUCHWATER|MFE_GOOWATER); @@ -2465,34 +2533,45 @@ void P_MobjCheckWater(mobj_t *mobj) || ((rover->flags & FF_BLOCKOTHERS) && !mobj->player))) continue; + fixed_t topheight = *rover->topheight; + fixed_t bottomheight = *rover->bottomheight; + +/*#ifdef ESLOPE + if (rover->t_slope) + topheight = P_GetZAt(rover->t_slope, mobj->x, mobj->y); + + if (rover->b_slope) + bottomheight = P_GetZAt(rover->b_slope, mobj->x, mobj->y); +#endif*/ + if (mobj->eflags & MFE_VERTICALFLIP) { - if (*rover->topheight < (thingtop - FixedMul(mobj->info->height/2, mobj->scale)) - || *rover->bottomheight > thingtop) + if (topheight < (thingtop - FixedMul(mobj->info->height/2, mobj->scale)) + || bottomheight > thingtop) continue; } else { - if (*rover->topheight < mobj->z - || *rover->bottomheight > (mobj->z + FixedMul(mobj->info->height/2, mobj->scale))) + if (topheight < mobj->z + || bottomheight > (mobj->z + FixedMul(mobj->info->height/2, mobj->scale))) continue; } // Set the watertop and waterbottom - mobj->watertop = *rover->topheight; - mobj->waterbottom = *rover->bottomheight; + mobj->watertop = topheight; + mobj->waterbottom = bottomheight; // Just touching the water? - if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - FixedMul(mobj->info->height, mobj->scale) < *rover->bottomheight) - || (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + FixedMul(mobj->info->height, mobj->scale) > *rover->topheight)) + if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - FixedMul(mobj->info->height, mobj->scale) < bottomheight) + || (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + FixedMul(mobj->info->height, mobj->scale) > topheight)) { mobj->eflags |= MFE_TOUCHWATER; if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY)) mobj->eflags |= MFE_GOOWATER; } // Actually in the water? - if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - FixedMul(mobj->info->height/2, mobj->scale) > *rover->bottomheight) - || (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + FixedMul(mobj->info->height/2, mobj->scale) < *rover->topheight)) + if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - FixedMul(mobj->info->height/2, mobj->scale) > bottomheight) + || (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + FixedMul(mobj->info->height/2, mobj->scale) < topheight)) { mobj->eflags |= MFE_UNDERWATER; if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY)) diff --git a/src/p_mobj.h b/src/p_mobj.h index 6d120c473..4acdde18c 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -28,6 +28,11 @@ // Needs precompiled tables/data structures. #include "info.h" +// For slope code, we need v3float_t +#ifdef ESLOPE +#include "m_vector.h" +#endif + // // NOTES: mobj_t // @@ -349,6 +354,11 @@ typedef struct mobj_s INT32 cusval; INT32 cvmem; +#ifdef ESLOPE + angle_t pitchangle; + v3float_t vector; +#endif + // WARNING: New fields must be added separately to savegame and Lua. } mobj_t; diff --git a/src/p_slopes.c b/src/p_slopes.c new file mode 100644 index 000000000..c448b580c --- /dev/null +++ b/src/p_slopes.c @@ -0,0 +1,1211 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// Copyright(C) 2004 Stephen McGranahan +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//-------------------------------------------------------------------------- +// +// DESCRIPTION: +// Slopes +// SoM created 05/10/09 +// ZDoom + Eternity Engine Slopes, ported and enhanced by Kalaron +// +//----------------------------------------------------------------------------- + + +#include "doomdef.h" +#include "r_defs.h" +#include "r_state.h" +#include "m_bbox.h" +#include "z_zone.h" +#include "p_spec.h" +#include "p_slopes.h" +#include "r_main.h" +#include "p_maputl.h" +#include "w_wad.h" + +#ifdef ESLOPE + +// +// P_MakeSlope +// +// Alocates and fill the contents of a slope structure. +// +static pslope_t *P_MakeSlope(const v3float_t *o, const v2float_t *d, + const float zdelta, boolean isceiling) +{ + pslope_t *ret = Z_Malloc(sizeof(pslope_t), PU_LEVEL, NULL); + memset(ret, 0, sizeof(*ret)); + + ret->o.x = FLOAT_TO_FIXED(ret->of.x = o->x); + ret->o.y = FLOAT_TO_FIXED(ret->of.y = o->y); + ret->o.z = FLOAT_TO_FIXED(ret->of.z = o->z); + + ret->d.x = FLOAT_TO_FIXED(ret->df.x = d->x); + ret->d.y = FLOAT_TO_FIXED(ret->df.y = d->y); + + ret->zdelta = FLOAT_TO_FIXED(ret->zdeltaf = zdelta); + + // d = direction (v2float_t) + // + // direction.x = line->nx; + // direction.y = line->ny; + // + // o = origin (v3float_t) + // origin.x = (FIXED_TO_FLOAT(line->v2->x) + FIXED_TO_FLOAT(line->v1->x)) * 0.5f; + // origin.y = (FIXED_TO_FLOAT(line->v2->y) + FIXED_TO_FLOAT(line->v1->y)) * 0.5f; + + { + // Now calculate the normal of the plane! + v3float_t v1, v2, v3, d1, d2; + float len; + + v1.x = o->x; + v1.y = o->y; + v1.z = o->z; + + v2.x = v1.x; + v2.y = v1.y + 10.0f; + v2.z = P_GetZAtf(ret, v2.x, v2.y); + + v3.x = v1.x + 10.0f; + v3.y = v1.y; + v3.z = P_GetZAtf(ret, v3.x, v3.y); + + if (isceiling) + { + M_SubVec3f(&d1, &v1, &v3); + M_SubVec3f(&d2, &v2, &v3); + } + else + { + M_SubVec3f(&d1, &v1, &v2); + M_SubVec3f(&d2, &v3, &v2); + } + + M_CrossProduct3f(&ret->normalf, &d1, &d2); + + // Cross product length + len = (float)sqrt(ret->normalf.x * ret->normalf.x + + ret->normalf.y * ret->normalf.y + + ret->normalf.z * ret->normalf.z); + +#ifdef SLOPETHINGS + if (len == 0) + { + // Only happens when all vertices in this sector are on the same line. + // Let's just ignore this case. + CONS_Printf("Slope thing at (%d,%d) lies directly on its target line.\n", int(x>>16), int(y>>16)); + return; + } +#endif + + ret->normalf.x /= len; + ret->normalf.y /= len; + ret->normalf.z /= len; + + // ZDoom + // cross = ret->normalf + + // Fix backward normals + if ((ret->normalf.z < 0 && !isceiling) || (ret->normalf.z > 0 && isceiling)) + { + ret->normalf.x = -ret->normalf.x; + ret->normalf.y = -ret->normalf.x; + ret->normalf.z = -ret->normalf.x; + } + + } + + return ret; +} + +// +// P_CopySlope +// +// Allocates and returns a copy of the given slope structure. +// +static pslope_t *P_CopySlope(const pslope_t *src) +{ + pslope_t *ret = Z_Malloc(sizeof(pslope_t), PU_LEVEL, NULL); + memcpy(ret, src, sizeof(*ret)); + + return ret; +} + +// +// P_MakeLineNormal +// +// Calculates a 2D normal for the given line and stores it in the line +// +void P_MakeLineNormal(line_t *line) +{ + float linedx, linedy, length; + + // SRB2CBTODO: Give linedefs an fx+fy(float xy coords)? + // May cause slow downs since the float would always have to be converted/updated + linedx = FIXED_TO_FLOAT(line->v2->x) - FIXED_TO_FLOAT(line->v1->x); + linedy = FIXED_TO_FLOAT(line->v2->y) - FIXED_TO_FLOAT(line->v1->y); + + length = (float)sqrt(linedx * linedx + linedy * linedy); + line->nx = linedy / length; + line->ny = -linedx / length; + line->len = length; +} + +// +// P_GetExtent +// +// Returns the distance to the first line within the sector that +// is intersected by a line parallel to the plane normal with the point (ox, oy) +// +static float P_GetExtent(sector_t *sector, line_t *line, v3float_t *o, v2float_t *d) +{ + // ZDoom code reference: v3float_t = vertex_t + float fardist = -1.0f; + size_t i; + + // Find furthest vertex from the reference line. It, along with the two ends + // of the line, will define the plane. + // SRB2CBTODO: Use a formula to get the slope to slide objects depending on how steep + for(i = 0; i < sector->linecount; i++) + { + line_t *li = sector->lines[i]; + float dist; + + // Don't compare to the slope line. + if(li == line) + continue; + + // ZDoom code in P_AlignPlane + // dist = fabs((double(line->v1->y) - vert->y) * line->dx - (double(line->v1->x) - vert->x) * line->dy); + dist = (float)fabs((FIXED_TO_FLOAT(li->v1->x) - o->x) * d->x + (FIXED_TO_FLOAT(li->v1->y) - o->y) * d->y); + if(dist > fardist) + fardist = dist; + + dist = (float)fabs((FIXED_TO_FLOAT(li->v2->x) - o->x) * d->x + (FIXED_TO_FLOAT(li->v2->y) - o->y) * d->y); + if(dist > fardist) + fardist = dist; + } + + return fardist; +} + + +// +// P_SpawnSlope_Line +// +// Creates one or more slopes based on the given line type and front/back +// sectors. +// Kalaron: Check if dynamic slopes need recalculation +// +void P_SpawnSlope_Line(int linenum) +{ + // With dynamic slopes, it's fine to just leave this function as normal, + // because checking to see if a slope had changed will waste more memory than + // if the slope was just updated when called + line_t *line = lines + linenum; + int special = line->special; + pslope_t *fslope = NULL, *cslope = NULL; + v3float_t origin, point; + v2float_t direction; + float dz, extent; + + boolean frontfloor = (special == 386 || special == 388 || special == 393); + boolean backfloor = (special == 389 || special == 391 || special == 392); + boolean frontceil = (special == 387 || special == 388 || special == 392); + boolean backceil = (special == 390 || special == 391 || special == 393); + + if(!frontfloor && !backfloor && !frontceil && !backceil) + { + CONS_Printf("P_SpawnSlope_Line called with non-slope line special.\n"); + return; + } + + if(!line->frontsector || !line->backsector) + { + CONS_Printf("P_SpawnSlope_Line used on a line without two sides.\n"); + return; + } + + // SRB2CBTODO: Transform origin relative to the bounds of an individual FOF + origin.x = (FIXED_TO_FLOAT(line->v2->x) + FIXED_TO_FLOAT(line->v1->x)) * 0.5f; + origin.y = (FIXED_TO_FLOAT(line->v2->y) + FIXED_TO_FLOAT(line->v1->y)) * 0.5f; + + // For FOF slopes, make a special function to copy to the xy origin & direction relative to the position of the FOF on the map! + if(frontfloor || frontceil) + { + origin.z = FIXED_TO_FLOAT(line->backsector->floorheight); + direction.x = line->nx; + direction.y = line->ny; + + extent = P_GetExtent(line->frontsector, line, &origin, &direction); + + if(extent < 0.0f) + { + CONS_Printf("P_SpawnSlope_Line failed to get frontsector extent on line number %i\n", linenum); + return; + } + + // reposition the origin according to the extent + point.x = origin.x + direction.x * extent; + point.y = origin.y + direction.y * extent; + direction.x = -direction.x; + direction.y = -direction.y; + + // TODO: We take origin and point 's xy values and translate them to the center of an FOF! + + if(frontfloor) + { + + point.z = FIXED_TO_FLOAT(line->frontsector->floorheight); // Startz + dz = (FIXED_TO_FLOAT(line->backsector->floorheight) - point.z) / extent; // Destinationz + + // In P_SpawnSlopeLine the origin is the centerpoint of the sourcelinedef + + int slopeangle = 0; // All floors by default have no slope (an angle of 0, completely flat) + + v3float_t A = origin; // = line source + v3float_t B = point; // destination's value + v3float_t C = origin; // Point used to make a right triangle from A & B + + C.z = point.z; + + // To find the "angle" of a slope, we make a right triangle out of the points we have, + // point A - is point 1 of the hypotenuse, + // point B - is point 2 of the hypotenuse + // point C - has the same Z value as point b, and the same XY value as A + // + // We want to find the angle accross from the right angle + // so we use some triginometry to find the angle(fun, right?) + // We want to find the tanjent of this angle, this is: + // Opposite + // ------- = tan(x) + // Adjecent + // But actually tan doesn't do want we really want, we have to use atan to find the actual angle of the triangle's corner + float triangopplength = abs(B.z - A.z); + float triangadjlength = sqrt((B.x-C.x)*(B.x-C.x) + (B.y - C.y)*(B.y - C.y)); + //float trianghyplength = sqrt(triangopplength*triangopplength + triangadjlength*triangadjlength); // This is the hypotenuse + + // So tanjent = opposite divided by adjecent + float tanrelat = triangopplength/ triangadjlength; // tanjent = opposite / adjecent + slopeangle = atan(tanrelat)* 180 / M_PI; // Now we use atan: *180 /M_PI is needed to convert the value into degrees + + fslope = line->frontsector->f_slope = + P_MakeSlope(&point, &direction, dz, false); + + // Now remember that f_slope IS a vector + // fslope->o = origin 3D point 1 of the vector + // fslope->d = destination 3D point 2 of the vector + // fslope->normal is a 3D line perpendicular to the 3D vector + + // Sync the linedata of the line that started this slope + // SRB2CBTODO: Anything special for remote(control sector)-based slopes later? + line->frontsector->f_slope->sourceline = line; + + // To find the real highz/lowz of a slope, you need to check all the vertexes + // in the slope's sector with P_GetZAt to get the REAL lowz & highz + // Although these slopes are set by floorheights the ANGLE is what a slope is, + // so technically any slope can extend on forever (they are just bound by sectors) + // *You can use sourceline as a reference to see if two slopes really are the same + + // Default points for high and low + fixed_t highest = point.z > origin.z ? point.z : origin.z; + fixed_t lowest = point.z < origin.z ? point.z : origin.z; + highest = FLOAT_TO_FIXED(highest); + lowest = FLOAT_TO_FIXED(lowest); + + // Now check to see what the REAL high and low points of the slope inside the sector + size_t l; + + for (l = 0; l < line->frontsector->linecount; l++) + { + if (P_GetZAt(line->frontsector->f_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y) > highest) + highest = P_GetZAt(line->frontsector->f_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y); + + if (P_GetZAt(line->frontsector->f_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y) < lowest) + lowest = P_GetZAt(line->frontsector->f_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y); + } + + // Sets extra clipping data for the frontsector's slope + fslope->highz = line->frontsector->f_slope->highz = highest; + fslope->lowz = line->frontsector->f_slope->lowz = lowest; + + fslope->zangle = slopeangle; + fslope->xydirection = R_PointToAngle2(FLOAT_TO_FIXED(A.x), FLOAT_TO_FIXED(A.y), FLOAT_TO_FIXED(B.x), FLOAT_TO_FIXED(B.y))/(ANGLE_45/45); + + secplane_t *srcplane = Z_Calloc(sizeof(*srcplane), PU_LEVEL, NULL); + // ZDoom secplane port! YAY + // ret = f_slope or c_slope + srcplane->a = FLOAT_TO_FIXED (fslope->normalf.x); // cross[0] + srcplane->b = FLOAT_TO_FIXED (fslope->normalf.y); // cross[1] + srcplane->c = FLOAT_TO_FIXED (fslope->normalf.z); // cross[2] + srcplane->ic = DivScale32 (1, srcplane->c); // (1 << 32/srcplane->c) or FLOAT_TO_FIXED(1.0f/cross[2]); + + // destheight takes the destination height used in dz + srcplane->d = -TMulScale16 (srcplane->a, line->v1->x, // x + srcplane->b, line->v1->y, // y + srcplane->c, line->backsector->floorheight); // z + + // Sync the secplane! + fslope->secplane = line->frontsector->f_slope->secplane = *srcplane; + + } + if(frontceil) + { + point.z = FIXED_TO_FLOAT(line->frontsector->ceilingheight); + dz = (FIXED_TO_FLOAT(line->backsector->ceilingheight) - point.z) / extent; + + cslope = line->frontsector->c_slope = + P_MakeSlope(&point, &direction, dz, true); + + // Sync the linedata of the line that started this slope + // SRB2CBTODO: Anything special for remote(control sector)-based slopes later? + line->frontsector->c_slope->sourceline = line; + + // Remember the way the slope is formed + fixed_t highest = point.z > origin.z ? point.z : origin.z; + fixed_t lowest = point.z < origin.z ? point.z : origin.z; + highest = FLOAT_TO_FIXED(highest); + lowest = FLOAT_TO_FIXED(lowest); + size_t l; + + for (l = 0; l < line->frontsector->linecount; l++) + { + if (P_GetZAt(line->frontsector->c_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y) > highest) + highest = P_GetZAt(line->frontsector->c_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y); + + if (P_GetZAt(line->frontsector->c_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y) < lowest) + lowest = P_GetZAt(line->frontsector->c_slope, line->frontsector->lines[l]->v1->x, line->frontsector->lines[l]->v1->y); + } + + // This line special sets extra clipping data for the frontsector's slope + cslope->highz = line->frontsector->c_slope->highz = highest; + cslope->lowz = line->frontsector->c_slope->lowz = lowest; + + // SRB2CBTODO: Get XY angle of a slope and then awesome physics! // ESLOPE: + //cslope->zangle = line->frontsector->c_slope->zangle = P_GetSlopezangle(line->frontsector, highvert, lowvert); + //100*(ANG45/45);//R_PointToAngle2(direction.x, direction.y, origin.x, origin.y); + // Get slope XY angle with secplane_t + secplane_t *srcplane = Z_Calloc(sizeof(*srcplane), PU_LEVEL, NULL); + // ZDoom secplane port! + // secplane_t! woot! + // ret = f_slope or c_slope + srcplane->a = FLOAT_TO_FIXED (cslope->normalf.x); // cross[0] + srcplane->b = FLOAT_TO_FIXED (cslope->normalf.y); // cross[1] + srcplane->c = FLOAT_TO_FIXED (cslope->normalf.z); // cross[2] + //plane->ic = FLOAT_TO_FIXED (1.f/cross[2]); + srcplane->ic = DivScale32 (1, srcplane->c); // (1 << 32/srcplane->c) +#ifdef SLOPETHINGS // For setting thing-based slopes + srcplane->d = -TMulScale16 (plane->a, x, + plane->b, y, + plane->c, z); +#endif + //srcheight = isceiling ? sec->GetPlaneTexZ(sector_t::floor) : sec->GetPlaneTexZ(sector_t::ceiling); + //destheight = isceiling ? refsec->GetPlaneTexZ(sector_t::floor) : refsec->GetPlaneTexZ(sector_t::ceiling); + //P_GetZAtf(ret, v2.x, v2.y) + // destheight takes the destination height used in dz + srcplane->d = -TMulScale16 (srcplane->a, line->v1->x, + srcplane->b, line->v1->y, + srcplane->c, line->backsector->ceilingheight); + + // Sync the secplane! + cslope->secplane = line->frontsector->c_slope->secplane = *srcplane; + } + } + if(backfloor || backceil) + { + origin.z = FIXED_TO_FLOAT(line->frontsector->floorheight); + // Backsector + direction.x = -line->nx; + direction.y = -line->ny; + + extent = P_GetExtent(line->backsector, line, &origin, &direction); + + if(extent < 0.0f) + { + CONS_Printf("P_SpawnSlope_Line failed to get backsector extent on line number %i\n", linenum); + return; + } + + // reposition the origin according to the extent + point.x = origin.x + direction.x * extent; + point.y = origin.y + direction.y * extent; + direction.x = -direction.x; + direction.y = -direction.y; + + if(backfloor) + { + point.z = FIXED_TO_FLOAT(line->backsector->floorheight); + dz = (FIXED_TO_FLOAT(line->frontsector->floorheight) - point.z) / extent; + + fslope = line->backsector->f_slope = + P_MakeSlope(&point, &direction, dz, false); + + // Sync the linedata of the line that started this slope + // SRB2CBTODO: Anything special for remote(control sector)-based slopes later? + line->backsector->f_slope->sourceline = line; + + int slopeangle = 0; // All floors by default have no slope (an angle of 0) + + v3float_t A = origin; // = line source + v3float_t B = point; // destination's value + v3float_t C = origin; + + C.z = point.z; + + // To find the "angle" of a slope, we make a right triangle out of the points we have, + // point A - is point 1 of the hypotenuse, + // point B - is point 2 of the hypotenuse + // point C - has the same Z value as point b, and the same XY value as A + // + // We want to find the angle accross from the right angle + // so we use some triginometry to find the angle(fun, right?) + // We want to find the tanjent of this angle, this is: + // Opposite + // ------- = tan(x) + // Adjecent + // But actually tan doesn't do want we really want, we have to use atan to find the actual angle of the triangle's corner + float triangopplength = abs(B.z - A.z); + float triangadjlength = sqrt((B.x-C.x)*(B.x-C.x) + (B.y - C.y)*(B.y - C.y)); + //float trianghyplength = sqrt(triangopplength*triangopplength + triangadjlength*triangadjlength); // This is the hypotenuse + + // So tanjent = opposite divided by adjecent + float tanrelat = triangopplength/ triangadjlength; // tanjent = opposite / adjecent + slopeangle = atan(tanrelat)* 180 / M_PI; // Now we use atan - *180 /M_PI is needed to convert the value into degrees + + // Remember the way the slope is formed + fixed_t highest = point.z > origin.z ? point.z : origin.z; + fixed_t lowest = point.z < origin.z ? point.z : origin.z; + highest = FLOAT_TO_FIXED(highest); + lowest = FLOAT_TO_FIXED(lowest); + size_t l; + + for (l = 0; l < line->backsector->linecount; l++) + { + if (P_GetZAt(line->backsector->f_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y) > highest) + highest = P_GetZAt(line->backsector->f_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y); + + if (P_GetZAt(line->backsector->f_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y) < lowest) + lowest = P_GetZAt(line->backsector->f_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y); + } + + // This line special sets extra clipping data for the frontsector's slope + fslope->highz = line->backsector->f_slope->highz = highest; + fslope->lowz = line->backsector->f_slope->lowz = lowest; + + fslope->zangle = slopeangle; + // Get slope XY angle with secplane_t + secplane_t *srcplane = Z_Calloc(sizeof(*srcplane), PU_LEVEL, NULL); + // ZDoom secplane port! + // secplane_t! woot! + // ret = f_slope or c_slope + srcplane->a = FLOAT_TO_FIXED (fslope->normalf.x); // cross[0] + srcplane->b = FLOAT_TO_FIXED (fslope->normalf.y); // cross[1] + srcplane->c = FLOAT_TO_FIXED (fslope->normalf.z); // cross[2] + //plane->ic = FLOAT_TO_FIXED (1.f/cross[2]); + srcplane->ic = DivScale32 (1, srcplane->c); // (1 << 32/srcplane->c) +#ifdef SLOPETHINGS // For setting thing-based slopes + srcplane->d = -TMulScale16 (plane->a, x, + plane->b, y, + plane->c, z); +#endif + //srcheight = isceiling ? sec->GetPlaneTexZ(sector_t::floor) : sec->GetPlaneTexZ(sector_t::ceiling); + //destheight = isceiling ? refsec->GetPlaneTexZ(sector_t::floor) : refsec->GetPlaneTexZ(sector_t::ceiling); + //P_GetZAtf(ret, v2.x, v2.y) + // destheight takes the destination height used in dz + srcplane->d = -TMulScale16 (srcplane->a, line->v1->x, + srcplane->b, line->v1->y, + srcplane->c, line->frontsector->floorheight); + + // Sync the secplane! + fslope->secplane = line->backsector->f_slope->secplane = *srcplane; + } + if(backceil) + { + point.z = FIXED_TO_FLOAT(line->backsector->ceilingheight); + dz = (FIXED_TO_FLOAT(line->frontsector->ceilingheight) - point.z) / extent; + + cslope = line->backsector->c_slope = + P_MakeSlope(&point, &direction, dz, true); + + // Sync the linedata of the line that started this slope + // SRB2CBTODO: Anything special for remote(control sector)-based slopes later? + line->backsector->c_slope->sourceline = line; + + // Remember the way the slope is formed + fixed_t highest = point.z > origin.z ? point.z : origin.z; + fixed_t lowest = point.z < origin.z ? point.z : origin.z; + highest = FLOAT_TO_FIXED(highest); + lowest = FLOAT_TO_FIXED(lowest); + + size_t l; + + for (l = 0; l < line->backsector->linecount; l++) + { + if (P_GetZAt(line->backsector->c_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y) > highest) + highest = P_GetZAt(line->backsector->c_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y); + + if (P_GetZAt(line->backsector->c_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y) < lowest) + lowest = P_GetZAt(line->backsector->c_slope, line->backsector->lines[l]->v1->x, line->backsector->lines[l]->v1->y); + } + + // This line special sets extra clipping data for the backsector's slope + cslope->highz = line->backsector->c_slope->highz = highest; + cslope->lowz = line->backsector->c_slope->lowz = lowest; + + // SRB2CBTODO: Get XY angle of a slope and then awesome physics! // ESLOPE: + //cslope->zangle = line->backsector->c_slope->zangle = P_GetSlopezangle(line->backsector, highvert, lowvert); + //100*(ANG45/45);//R_PointToAngle2(direction.x, direction.y, origin.x, origin.y); + // Get slope XY angle with secplane_t + secplane_t *srcplane = Z_Calloc(sizeof(*srcplane), PU_LEVEL, NULL); + // ZDoom secplane port! + // secplane_t! woot! + // ret = f_slope or c_slope + srcplane->a = FLOAT_TO_FIXED (cslope->normalf.x); // cross[0] + srcplane->b = FLOAT_TO_FIXED (cslope->normalf.y); // cross[1] + srcplane->c = FLOAT_TO_FIXED (cslope->normalf.z); // cross[2] + //plane->ic = FLOAT_TO_FIXED (1.f/cross[2]); + srcplane->ic = DivScale32 (1, srcplane->c); // (1 << 32/srcplane->c) +#ifdef SLOPETHINGS // For setting thing-based slopes + srcplane->d = -TMulScale16 (plane->a, x, + plane->b, y, + plane->c, z); +#endif + //srcheight = isceiling ? sec->GetPlaneTexZ(sector_t::floor) : sec->GetPlaneTexZ(sector_t::ceiling); + //destheight = isceiling ? refsec->GetPlaneTexZ(sector_t::floor) : refsec->GetPlaneTexZ(sector_t::ceiling); + //P_GetZAtf(ret, v2.x, v2.y) + // destheight takes the destination height used in dz + srcplane->d = -TMulScale16 (srcplane->a, line->v1->x, + srcplane->b, line->v1->y, + srcplane->c, line->frontsector->ceilingheight); + + // Sync the secplane! + cslope->secplane = line->backsector->c_slope->secplane = *srcplane; + } + } + + if(!line->tag) + return; +} + + + +// +// P_CopySectorSlope +// +// Searches through tagged sectors and copies +// +void P_CopySectorSlope(line_t *line) +{ + sector_t *fsec = line->frontsector; + int i, special = line->special; + + // Check for copy linedefs + for(i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;) + { + sector_t *srcsec = sectors + i; + + if((special - 393) & 1 && !fsec->f_slope && srcsec->f_slope) + fsec->f_slope = P_CopySlope(srcsec->f_slope); + if((special - 393) & 2 && !fsec->c_slope && srcsec->c_slope) + fsec->c_slope = P_CopySlope(srcsec->c_slope); + } + + //SRB2CBTODO: ESLOPE: Maybe we do need it for another to check for a plane slope? + line->special = 0; // Linedef was use to set slopes, it finished its job, so now make it a normal linedef +} + + +#include "byteptr.h" + +/* +typedef struct +{ + fixed_t z1; + fixed_t z2; +} mapvert_t;*/ + +#include "p_setup.h" +#include "p_local.h" + +//========================================================================== +// +// P_SetSlopesFromVertexHeights +// +//========================================================================== +void P_SetSlopesFromVertexHeights(lumpnum_t lumpnum) +{ + mapthing_t *mt; + boolean vt_found = false; + size_t i, j, k, l, q; + + //size_t i; + //mapthing_t *mt; + char *data; + char *datastart; + + // SRB2CBTODO: WHAT IS (5 * sizeof (short))?! It = 10 + // anything else seems to make a map not load properly, + // but this hard-coded value MUST have some reason for being what it is + size_t snummapthings = W_LumpLength(lumpnum) / (5 * sizeof (short)); + mapthing_t *smapthings = Z_Calloc(snummapthings * sizeof (*smapthings), PU_LEVEL, NULL); + fixed_t x, y; + sector_t *sector; + // Spawn axis points first so they are + // at the front of the list for fast searching. + data = datastart = W_CacheLumpNum(lumpnum, PU_LEVEL); + mt = smapthings; + for (i = 0; i < snummapthings; i++, mt++) + { + mt->x = READINT16(data); + mt->y = READINT16(data); + mt->angle = READINT16(data); + mt->type = READINT16(data); + mt->options = READINT16(data); + // mt->z hasn't been set yet! + //mt->extrainfo = (byte)(mt->type >> 12); // slope things are special, they have a bigger range of types + + //mt->type &= 4095; // SRB2CBTODO: WHAT IS THIS???? Mobj type limits?!!!! + x = mt->x*FRACUNIT; + y = mt->y*FRACUNIT; + sector = R_PointInSubsector(x, y)->sector; + // Z for objects +#ifdef ESLOPE + if (sector->f_slope) + mt->z = (short)(P_GetZAt(sector->f_slope, x, y)>>FRACBITS); + else +#endif + mt->z = (short)(sector->floorheight>>FRACBITS); + + mt->z = mt->z + (mt->options >> ZSHIFT); + + if (mt->type == THING_VertexFloorZ || mt->type == THING_VertexCeilingZ) // THING_VertexFloorZ + { + for(l = 0; l < numvertexes; l++) + { + if (vertexes[l].x == mt->x*FRACUNIT && vertexes[l].y == mt->y*FRACUNIT) + { + if (mt->type == THING_VertexFloorZ) + { + vertexes[l].z = mt->z*FRACUNIT; + //I_Error("Z value: %i", vertexes[l].z/FRACUNIT); + + } + else + { + vertexes[l].z = mt->z*FRACUNIT; // celing floor + } + vt_found = true; + } + } + //mt->type = 0; // VPHYSICS: Dynamic slopes + + + + + + + if (vt_found) + { + for (k = 0; k < numsectors; k++) + { + sector_t *sec = §ors[k]; + if (sec->linecount != 3) continue; // only works with triangular sectors + + v3float_t vt1, vt2, vt3; // cross = ret->normalf + v3float_t vec1, vec2; + + int vi1, vi2, vi3; + + vi1 = (int)(sec->lines[0]->v1 - vertexes); + vi2 = (int)(sec->lines[0]->v2 - vertexes); + vi3 = (sec->lines[1]->v1 == sec->lines[0]->v1 || sec->lines[1]->v1 == sec->lines[0]->v2)? + (int)(sec->lines[1]->v2 - vertexes) : (int)(sec->lines[1]->v1 - vertexes); + + //if (vertexes[vi1].z) + // I_Error("OSNAP %i", vertexes[vi1].z/FRACUNIT); + //if (vertexes[vi2].z) + // I_Error("OSNAP %i", vertexes[vi2].z/FRACUNIT); + //if (vertexes[vi3].z) + // I_Error("OSNAP %i", vertexes[vi3].z/FRACUNIT); + + //I_Error("%i, %i", mt->z*FRACUNIT, vertexes[vi1].z); + + //I_Error("%i, %i, %i", mt->x, mt->y, mt->z); + //P_SpawnMobj(mt->x*FRACUNIT, mt->y*FRACUNIT, mt->z*FRACUNIT, MT_RING); + + // TODO: Make sure not to spawn in the same place 2x! (we need an object in every vertex of the + // triangle sector to setup the real vertex slopes + // Check for the vertexes of all sectors + for(q = 0; q < numvertexes; q++) + { + if (vertexes[q].x == mt->x*FRACUNIT && vertexes[q].y == mt->y*FRACUNIT) + { + //I_Error("yeah %i", vertexes[q].z); + P_SpawnMobj(vertexes[q].x, vertexes[q].y, vertexes[q].z, MT_RING); +#if 0 + if ((mt->y*FRACUNIT == vertexes[vi1].y && mt->x*FRACUNIT == vertexes[vi1].x && mt->z*FRACUNIT == vertexes[vi1].z) + && !(mt->y*FRACUNIT == vertexes[vi2].y && mt->x*FRACUNIT == vertexes[vi2].x && mt->z*FRACUNIT == vertexes[vi2].z) + && !(mt->y*FRACUNIT == vertexes[vi3].y && mt->x*FRACUNIT == vertexes[vi3].x && mt->z*FRACUNIT == vertexes[vi3].z)) + P_SpawnMobj(vertexes[vi1].x, vertexes[vi1].y, vertexes[vi1].z, MT_RING); + else if ((mt->y*FRACUNIT == vertexes[vi2].y && mt->x*FRACUNIT == vertexes[vi2].x && mt->z*FRACUNIT == vertexes[vi2].z) + && !(mt->y*FRACUNIT == vertexes[vi1].y && mt->x*FRACUNIT == vertexes[vi1].x && mt->z*FRACUNIT == vertexes[vi1].z) + && !(mt->y*FRACUNIT == vertexes[vi3].y && mt->x*FRACUNIT == vertexes[vi3].x && mt->z*FRACUNIT == vertexes[vi3].z)) + P_SpawnMobj(vertexes[vi2].x, vertexes[vi2].y, vertexes[vi2].z, MT_BOUNCETV); + else if ((mt->y*FRACUNIT == vertexes[vi3].y && mt->x*FRACUNIT == vertexes[vi3].x && mt->z*FRACUNIT == vertexes[vi3].z) + && !(mt->y*FRACUNIT == vertexes[vi2].y && mt->x*FRACUNIT == vertexes[vi2].x && mt->z*FRACUNIT == vertexes[vi2].z) + && !(mt->y*FRACUNIT == vertexes[vi1].y && mt->x*FRACUNIT == vertexes[vi1].x && mt->z*FRACUNIT == vertexes[vi1].z)) + P_SpawnMobj(vertexes[vi3].x, vertexes[vi3].y, vertexes[vi3].z, MT_GFZFLOWER1); + else +#endif + continue; + } + } + + vt1.x = FIXED_TO_FLOAT(vertexes[vi1].x); + vt1.y = FIXED_TO_FLOAT(vertexes[vi1].y); + vt2.x = FIXED_TO_FLOAT(vertexes[vi2].x); + vt2.y = FIXED_TO_FLOAT(vertexes[vi2].y); + vt3.x = FIXED_TO_FLOAT(vertexes[vi3].x); + vt3.y = FIXED_TO_FLOAT(vertexes[vi3].y); + + for(j = 0; j < 2; j++) + { + + fixed_t z3; + //I_Error("Lo hicimos"); + + vt1.z = mt->z;//FIXED_TO_FLOAT(j==0 ? sec->floorheight : sec->ceilingheight); + vt2.z = mt->z;//FIXED_TO_FLOAT(j==0? sec->floorheight : sec->ceilingheight); + z3 = mt->z;//j==0? sec->floorheight : sec->ceilingheight; // Destination height + vt3.z = FIXED_TO_FLOAT(z3); + + if (P_PointOnLineSide(vertexes[vi3].x, vertexes[vi3].y, sec->lines[0]) == 0) + { + vec1.x = vt2.x - vt3.x; + vec1.y = vt2.y - vt3.y; + vec1.z = vt2.z - vt3.z; + + vec2.x = vt1.x - vt3.x; + vec2.y = vt1.y - vt3.y; + vec2.z = vt1.z - vt3.z; + } + else + { + vec1.x = vt1.x - vt3.x; + vec1.y = vt1.y - vt3.y; + vec1.z = vt1.z - vt3.z; + + vec2.x = vt2.x - vt3.x; + vec2.y = vt2.y - vt3.y; + vec2.z = vt2.z - vt3.z; + } + + + pslope_t *ret = Z_Malloc(sizeof(pslope_t), PU_LEVEL, NULL); + memset(ret, 0, sizeof(*ret)); + + { + M_CrossProduct3f(&ret->normalf, &vec1, &vec2); + + // Cross product length + float len = (float)sqrt(ret->normalf.x * ret->normalf.x + + ret->normalf.y * ret->normalf.y + + ret->normalf.z * ret->normalf.z); + + if (len == 0) + { + // Only happens when all vertices in this sector are on the same line. + // Let's just ignore this case. + //CONS_Printf("Slope thing at (%d,%d) lies directly on its target line.\n", (int)(x>>16), (int)(y>>16)); + return; + } + // cross/len + ret->normalf.x /= len; + ret->normalf.y /= len; + ret->normalf.z /= len; + + // ZDoom cross = ret->normalf + // Fix backward normals + if ((ret->normalf.z < 0 && j == 0) || (ret->normalf.z > 0 && j == 1)) + { + // cross = -cross + ret->normalf.x = -ret->normalf.x; + ret->normalf.y = -ret->normalf.x; + ret->normalf.z = -ret->normalf.x; + } + } + + secplane_t *srcplane = Z_Calloc(sizeof(*srcplane), PU_LEVEL, NULL); + + srcplane->a = FLOAT_TO_FIXED (ret->normalf.x); + srcplane->b = FLOAT_TO_FIXED (ret->normalf.y); + srcplane->c = FLOAT_TO_FIXED (ret->normalf.z); + //srcplane->ic = DivScale32 (1, srcplane->c); + srcplane->d = -TMulScale16 (srcplane->a, vertexes[vi3].x, + srcplane->b, vertexes[vi3].y, + srcplane->c, z3); + + if (j == 0) + { + sec->f_slope = ret; + sec->f_slope->secplane = *srcplane; + } + else if (j == 1) + { + sec->c_slope = ret; + sec->c_slope->secplane = *srcplane; + } + } + } + } + + + + + + + + + } + } + Z_Free(datastart); + +#if 0 // UDMF support + for(i = 0; i < numvertexdatas; i++) + { + if (vertexdatas[i].flags & VERTEXFLAG_ZCeilingEnabled) + { + vt_heights[1][i] = vertexdatas[i].zCeiling; + vt_found = true; + } + + if (vertexdatas[i].flags & VERTEXFLAG_ZFloorEnabled) + { + vt_heights[0][i] = vertexdatas[i].zFloor; + vt_found = true; + } + } + + // If vertexdata_t is ever extended for non-slope usage, this will obviously have to be deferred or removed. + delete[] vertexdatas; + vertexdatas = NULL; + numvertexdatas = 0; +#endif + + + + +} + +#include "p_maputl.h" + +#if 0 +static void P_SlopeLineToPointo (int lineid, fixed_t x, fixed_t y, fixed_t z, boolean slopeCeil) +{ + int linenum = -1; + + while ((linenum = P_FindLineFromID (lineid, linenum)) != -1) + { + const line_t *line = &lines[linenum]; + sector_t *sec; + secplane_t *plane; + + if (P_PointOnLineSide (x, y, line) == 0) + { + sec = line->frontsector; + } + else + { + sec = line->backsector; + } + if (sec == NULL) + { + continue; + } + if (slopeCeil) + { + plane = &sec->ceilingplane; + } + else + { + plane = &sec->floorplane; + } + + FVector3 p, v1, v2, cross; + + p[0] = FIXED2FLOAT (line->v1->x); + p[1] = FIXED2FLOAT (line->v1->y); + p[2] = FIXED2FLOAT (plane->ZatPoint (line->v1->x, line->v1->y)); + v1[0] = FIXED2FLOAT (line->dx); + v1[1] = FIXED2FLOAT (line->dy); + v1[2] = FIXED2FLOAT (plane->ZatPoint (line->v2->x, line->v2->y)) - p[2]; + v2[0] = FIXED2FLOAT (x - line->v1->x); + v2[1] = FIXED2FLOAT (y - line->v1->y); + v2[2] = FIXED2FLOAT (z) - p[2]; + + cross = v1 ^ v2; + double len = cross.Length(); + if (len == 0) + { + Printf ("Slope thing at (%d,%d) lies directly on its target line.\n", int(x>>16), int(y>>16)); + return; + } + cross /= len; + // Fix backward normals + if ((cross.Z < 0 && !slopeCeil) || (cross.Z > 0 && slopeCeil)) + { + cross = -cross; + } + + plane->a = FLOAT2FIXED (cross[0]); + plane->b = FLOAT2FIXED (cross[1]); + plane->c = FLOAT2FIXED (cross[2]); + //plane->ic = FLOAT2FIXED (1.f/cross[2]); + plane->ic = DivScale32 (1, plane->c); + plane->d = -TMulScale16 (plane->a, x, + plane->b, y, + plane->c, z); + } +} +#else +#if 0 +// P_SlopeLineToPoint, start from a specific linedef number(not tag) and slope to a mapthing with the angle of the linedef +static void P_SlopeLineToPoint(int linenum) +{ + line_t *line = lines + linenum; + int special = line->special; + pslope_t *fslope = NULL, *cslope = NULL; + v3float_t origin, point; + v2float_t direction; + float dz, extent; + + boolean frontfloor = (special == 386 || special == 388 || special == 393); + boolean backfloor = (special == 389 || special == 391 || special == 392); + boolean frontceil = (special == 387 || special == 388 || special == 392); + boolean backceil = (special == 390 || special == 391 || special == 393); + + // SoM: We don't need the line to retain its special type + line->special = 0; //SRB2CBTODO: ESLOPE: Maybe we do need it for another to check for a plane slope? + + if(!frontfloor && !backfloor && !frontceil && !backceil) + { + CONS_Printf("P_SpawnSlope_Line called with non-slope line special.\n"); + return; + } + + if(!line->frontsector || !line->backsector) + { + CONS_Printf("P_SpawnSlope_Line used on a line without two sides.\n"); + return; + } + + origin.x = (FIXED_TO_FLOAT(line->v2->x) + FIXED_TO_FLOAT(line->v1->x)) * 0.5f; + origin.y = (FIXED_TO_FLOAT(line->v2->y) + FIXED_TO_FLOAT(line->v1->y)) * 0.5f; + + if(frontfloor || frontceil) + { + // Do the front sector + direction.x = line->nx; + direction.y = line->ny; + + extent = P_GetExtent(line->frontsector, line, &origin, &direction); + + if(extent < 0.0f) + { + CONS_Printf("P_SpawnSlope_Line failed to get frontsector extent on line number %i\n", linenum); + return; + } + + // reposition the origin according to the extent + point.x = origin.x + direction.x * extent; + point.y = origin.y + direction.y * extent; + direction.x = -direction.x; + direction.y = -direction.y; + + // CONS_Printf("Test: X: %f, Y: %f\n", origin.x, origin.y); + + if(frontfloor) + { + point.z = FIXED_TO_FLOAT(line->frontsector->floorheight); // Startz + dz = (FIXED_TO_FLOAT(line->backsector->floorheight) - point.z) / extent; // Destinationz + + fslope = line->frontsector->f_slope = + P_MakeSlope(&point, &direction, dz, false); + + // Sync the linedata of the line that started this slope + // SRB2CBTODO: Anything special for remote(control sector)-based slopes later? + line->frontsector->f_slope->sourceline = line; + + // Remember the way the slope is formed + fixed_t highest = line->frontsector->floorheight > line->backsector->floorheight ? + line->frontsector->floorheight : line->backsector->floorheight; + fixed_t lowest = line->frontsector->floorheight < line->backsector->floorheight ? + line->frontsector->floorheight : line->backsector->floorheight; + // This line special sets extra clipping data for the frontsector's slope + fslope->highz = line->frontsector->f_slope->highz = highest; + fslope->lowz = line->frontsector->f_slope->lowz = lowest; + + // SRB2CBTODO: Get XY angle of a slope and then awesome physics! // ESLOPE: + //fslope->zangle = line->frontsector->f_slope->zangle = P_GetSlopezangle(line->frontsector, highvert, lowvert); + //100*(ANG45/45);//R_PointToAngle2(direction.x, direction.y, origin.x, origin.y); + // Get slope XY angle with secplane_t + secplane_t *srcplane = Z_Calloc(sizeof(*srcplane), PU_LEVEL, NULL); + // ZDoom secplane port! + // secplane_t! woot! + // ret = f_slope or c_slope + srcplane->a = FLOAT_TO_FIXED (fslope->normalf.x); // cross[0] + srcplane->b = FLOAT_TO_FIXED (fslope->normalf.y); // cross[1] + srcplane->c = FLOAT_TO_FIXED (fslope->normalf.z); // cross[2] + //plane->ic = FLOAT_TO_FIXED (1.f/cross[2]); + srcplane->ic = DivScale32 (1, srcplane->c); // (1 << 32/srcplane->c) +#ifdef SLOPETHINGS // For setting thing-based slopes + srcplane->d = -TMulScale16 (plane->a, x, + plane->b, y, + plane->c, z); +#endif + //srcheight = isceiling ? sec->GetPlaneTexZ(sector_t::floor) : sec->GetPlaneTexZ(sector_t::ceiling); + //destheight = isceiling ? refsec->GetPlaneTexZ(sector_t::floor) : refsec->GetPlaneTexZ(sector_t::ceiling); + //P_GetZAtf(ret, v2.x, v2.y) + // destheight takes the destination height used in dz + srcplane->d = -TMulScale16 (srcplane->a, line->v1->x, + srcplane->b, line->v1->y, + srcplane->c, line->backsector->floorheight); + + // Sync the secplane! + fslope->secplane = line->frontsector->f_slope->secplane = *srcplane; + + } + } +} +#endif +#endif + + + +//=========================================================================== +// +// P_SpawnSlopeMakers +// +//=========================================================================== +#if 0 +void P_SpawnSlopeMakers (FMapThing *firstmt, FMapThing *lastmt) +{ + FMapThing *mt; + + for (mt = firstmt; mt < lastmt; ++mt) + { + if ((mt->type >= THING_SlopeFloorPointLine && + mt->type <= THING_SetCeilingSlope) || + mt->type==THING_VavoomFloor || mt->type==THING_VavoomCeiling) + { + fixed_t x, y, z; + secplane_t *refplane; + sector_t *sec; + + x = mt->x; + y = mt->y; + sec = P_PointInSector (x, y); + if (mt->type & 1) + { + refplane = &sec->ceilingplane; + } + else + { + refplane = &sec->floorplane; + } + z = refplane->ZatPoint (x, y) + (mt->z); + if (mt->type==THING_VavoomFloor || mt->type==THING_VavoomCeiling) + { + P_VavoomSlope(sec, mt->thingid, x, y, mt->z, mt->type & 1); + } + else if (mt->type <= THING_SlopeCeilingPointLine) + { + P_SlopeLineToPoint (mt->args[0], x, y, z, mt->type & 1); + } + else + { + P_SetSlope (refplane, mt->type & 1, mt->angle, mt->args[0], x, y, z); + } + mt->type = 0; + } + } + + for (mt = firstmt; mt < lastmt; ++mt) + { + if (mt->type == THING_CopyFloorPlane || + mt->type == THING_CopyCeilingPlane) + { + P_CopyPlane (mt->args[0], mt->x, mt->y, mt->type & 1); + mt->type = 0; + } + } + + P_SetSlopesFromVertexHeights(firstmt, lastmt); +} +#endif + + + + +// ============================================================================ +// +// Various utilities related to slopes +// + +// +// P_GetZAt +// +// Returns the height of the sloped plane at (x, y) as a fixed_t +// +fixed_t P_GetZAt(pslope_t *slope, fixed_t x, fixed_t y) +{ + fixed_t dist = FixedMul(x - slope->o.x, slope->d.x) + + FixedMul(y - slope->o.y, slope->d.y); + + return slope->o.z + FixedMul(dist, slope->zdelta); +} + +// +// P_GetZAtf +// +// Returns the height of the sloped plane at (x, y) as a float +// +float P_GetZAtf(pslope_t *slope, float x, float y) +{ + //if (!slope) // SRB2CBTODO: keep this when done with debugging + // I_Error("P_GetZAtf: slope parameter is NULL"); + + float dist = (x - slope->of.x) * slope->df.x + (y - slope->of.y) * slope->df.y; + return slope->of.z + (dist * slope->zdeltaf); +} + +// +// P_DistFromPlanef +// +float P_DistFromPlanef(const v3float_t *point, const v3float_t *pori, + const v3float_t *pnormal) +{ + return (point->x - pori->x) * pnormal->x + + (point->y - pori->y) * pnormal->y + + (point->z - pori->z) * pnormal->z; +} + +// EOF +#endif // #ifdef ESLOPE + diff --git a/src/p_slopes.h b/src/p_slopes.h new file mode 100644 index 000000000..8449c1020 --- /dev/null +++ b/src/p_slopes.h @@ -0,0 +1,84 @@ +// Emacs style mode select -*- C++ -*- +//----------------------------------------------------------------------------- +// +// Copyright(C) 2004 Stephen McGranahan +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//-------------------------------------------------------------------------- +// +// DESCRIPTION: +// Slopes +// SoM created 05/10/09 +// +//----------------------------------------------------------------------------- + +#ifndef P_SLOPES_H__ +#define P_SLOPES_H__ + +#ifdef ESLOPE +// P_MakeLineNormal +// Calculates a 2D normal for the given line and stores it in the line +void P_MakeLineNormal(line_t *line); + + +// P_SpawnSlope_Line +// Creates one or more slopes based on the given line type and front/back +// sectors. +void P_SpawnSlope_Line(int linenum); + + +// Loads just map objects that make slopes, +// terrain affecting objects have to be spawned first +void P_SetSlopesFromVertexHeights(lumpnum_t lumpnum); + +typedef enum +{ + THING_SlopeFloorPointLine = 9500, + THING_SlopeCeilingPointLine = 9501, + THING_SetFloorSlope = 9502, + THING_SetCeilingSlope = 9503, + THING_CopyFloorPlane = 9510, + THING_CopyCeilingPlane = 9511, + THING_VavoomFloor=1500, + THING_VavoomCeiling=1501, + THING_VertexFloorZ=1504, + THING_VertexCeilingZ=1505, +} slopething_e; + +// +// P_CopySectorSlope +// +// Searches through tagged sectors and copies +// +void P_CopySectorSlope(line_t *line); + +// Returns the height of the sloped plane at (x, y) as a fixed_t +fixed_t P_GetZAt(pslope_t *slope, fixed_t x, fixed_t y); + + +// Returns the height of the sloped plane at (x, y) as a float +float P_GetZAtf(pslope_t *slope, float x, float y); + + +// Returns the distance of the given point from the given origin and normal. +float P_DistFromPlanef(const v3float_t *point, const v3float_t *pori, + const v3float_t *pnormal); + +#endif + +// EOF +#endif // #ifdef ESLOPE + diff --git a/src/p_spec.c b/src/p_spec.c index 323b93c6d..228273de0 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -33,6 +33,9 @@ #include "m_misc.h" #include "m_cond.h" //unlock triggers #include "lua_hook.h" // LUAh_LinedefExecute +#ifdef ESLOPE +#include "p_slopes.h" +#endif #ifdef HW3SOUND #include "hardware/hw3sound.h" @@ -4579,16 +4582,27 @@ static void P_RunSpecialSectorCheck(player_t *player, sector_t *sector) return; } + fixed_t f_affectpoint = sector->floorheight; + fixed_t c_affectpoint = sector->ceilingheight; + +#ifdef ESLOPE + if (sector->f_slope) + f_affectpoint = P_GetZAt(sector->f_slope, player->mo->x, player->mo->y); + + if (sector->c_slope) + c_affectpoint = P_GetZAt(sector->c_slope, player->mo->x, player->mo->y); +#endif + // Only go further if on the ground - if ((sector->flags & SF_FLIPSPECIAL_FLOOR) && !(sector->flags & SF_FLIPSPECIAL_CEILING) && player->mo->z != sector->floorheight) + if ((sector->flags & SF_FLIPSPECIAL_FLOOR) && !(sector->flags & SF_FLIPSPECIAL_CEILING) && player->mo->z != f_affectpoint) return; - if ((sector->flags & SF_FLIPSPECIAL_CEILING) && !(sector->flags & SF_FLIPSPECIAL_FLOOR) && player->mo->z + player->mo->height != sector->ceilingheight) + if ((sector->flags & SF_FLIPSPECIAL_CEILING) && !(sector->flags & SF_FLIPSPECIAL_FLOOR) && player->mo->z + player->mo->height != c_affectpoint) return; if ((sector->flags & SF_FLIPSPECIAL_BOTH) - && player->mo->z != sector->floorheight - && player->mo->z + player->mo->height != sector->ceilingheight) + && player->mo->z != f_affectpoint + && player->mo->z + player->mo->height != c_affectpoint) return; P_ProcessSpecialSector(player, sector, NULL); @@ -4749,6 +4763,9 @@ void P_UpdateSpecials(void) // POINT LIMIT P_CheckPointLimit(); + // Kalaron: ...We...have dynamic slopes *YESSSS* + P_SpawnDeferredSpecials(); + // ANIMATE TEXTURES for (anim = anims; anim < lastanim; anim++) { @@ -6500,6 +6517,63 @@ void P_SpawnSpecials(INT32 fromnetsave) P_RunLevelLoadExecutors(); } +#ifdef ESLOPE +// +// P_SpawnDeferredSpecials +// +// SoM: Specials that copy slopes, ect., need to be collected in a separate +// pass +// NOTE: SRB2CBTODO: A new function, P_SpawnDeferredSpecials is needed if objects +// are to be needed in this function, because this function currently needs to be +// done before 'things' are loaded, because slopes are part of this function, +// and slope height adjustments are needed for spawning objects +void P_SpawnDeferredSpecials(void) +{ + size_t i; + line_t *line; + + for(i = 0; i < numlines; i++) + { + line = lines + i; + + switch(line->special) + { + // Slopes, Eternity engine + /*{ 386, "Slope_FrontsectorFloor" }, + { 387, "Slope_FrontsectorCeiling" }, + { 388, "Slope_FrontsectorFloorAndCeiling" }, + { 389, "Slope_BacksectorFloor" }, + { 390, "Slope_BacksectorCeiling" }, + { 391, "Slope_BacksectorFloorAndCeiling" }, + { 392, "Slope_BackFloorAndFrontCeiling" }, + { 393, "Slope_BackCeilingAndFrontFloor" }, + + { 394, "Slope_FrontFloorToTaggedSlope" }, + { 395, "Slope_FrontCeilingToTaggedSlope" }, + { 396, "Slope_FrontFloorAndCeilingToTaggedSlope" },*/ + + // SoM 05/10/09: Slopes // SRB2CBTODO:! + case 386: + case 387: + case 388: + case 389: + case 390: + case 391: + case 392: + case 393: + P_SpawnSlope_Line(i); + break; + // SoM: Copy slopes + case 394: + case 395: + case 396: + P_CopySectorSlope(line); + break; + } + } +} +#endif + /** Adds 3Dfloors as appropriate based on a common control linedef. * * \param line Control linedef to use. @@ -7399,8 +7473,12 @@ void T_Pusher(pusher_t *p) || GETSECSPECIAL(referrer->special, 3) == 3) foundfloor = true; } - else if (!(GETSECSPECIAL(sec->special, 3) == 2 - || GETSECSPECIAL(sec->special, 3) == 3)) + else if ( +#ifdef ESLOPE + (!sec->f_slope) && +#endif + (!(GETSECSPECIAL(sec->special, 3) == 2 + || GETSECSPECIAL(sec->special, 3) == 3))) return; if (p->roverpusher && foundfloor == false) // Not even a 3d floor has the PUSH_MASK. diff --git a/src/p_spec.h b/src/p_spec.h index 7b6a5655c..c8cfc76da 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -36,6 +36,11 @@ void P_SpawnSpecials(INT32 fromnetsave); // every tic void P_UpdateSpecials(void); + +#ifdef ESLOPE +void P_SpawnDeferredSpecials(void); +#endif + sector_t *P_PlayerTouchingSectorSpecial(player_t *player, INT32 section, INT32 number); void P_PlayerInSpecialSector(player_t *player); void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *roversector); diff --git a/src/p_user.c b/src/p_user.c index 3c2d34a6e..e095f2a97 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1201,6 +1201,87 @@ boolean P_IsObjectOnGround(mobj_t *mo) return false; } +#ifdef ESLOPE +// +// P_IsObjectOnSlope +// +// Returns true if the player is +// on a slope. Takes reverse +// gravity into account. +// +boolean P_IsObjectOnSlope(mobj_t *mo, boolean ceiling) +{ + if (ceiling && (mo->eflags & MFE_VERTICALFLIP)) + { + if ((mo->z + mo->height >= mo->ceilingz) && mo->subsector->sector->c_slope) // SRB2CBTODO: allow being on underside of mobj too? + return true; + } + else + { + if (mo->z <= mo->floorz && mo->subsector->sector->f_slope) + return true; + } + + return false; +} + +// +// P_SlopeGreaterThan +// +// Returns true if the object is on a slope +// that has an angle greater than the value +// +boolean P_SlopeGreaterThan(mobj_t *mo, boolean ceiling, int value) +{ + if (ceiling && (mo->eflags & MFE_VERTICALFLIP)) + { + if ((mo->z + mo->height >= mo->ceilingz) && mo->subsector->sector->c_slope) + { + if (value < mo->subsector->sector->c_slope->zangle) + return true; + } + } + else + { + if (mo->z <= mo->floorz && mo->subsector->sector->f_slope) + { + if (value < mo->subsector->sector->f_slope->zangle) + return true; + } + } + + return false; +} + +// +// P_SlopeLessThan +// +// Returns true if the object is on a slope +// that has an angle less than the value +// +boolean P_SlopeLessThan(mobj_t *mo, boolean ceiling, int value) +{ + if (ceiling && (mo->eflags & MFE_VERTICALFLIP)) + { + if ((mo->z + mo->height >= mo->ceilingz) && mo->subsector->sector->c_slope) + { + if (value < mo->subsector->sector->c_slope->zangle) + return true; + } + } + else + { + if (mo->z <= mo->floorz && mo->subsector->sector->f_slope) + { + if (value < mo->subsector->sector->f_slope->zangle) + return true; + } + } + + return false; +} +#endif + // // P_IsObjectOnGroundIn // diff --git a/src/r_defs.h b/src/r_defs.h index 7f8bd7e1d..251140a3f 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -224,6 +224,49 @@ typedef struct secplane_t fixed_t a, b, c, d, ic; } secplane_t; +// Kalaron Slopes +#ifdef ESLOPE + +#include "m_vector.h" + +typedef struct +{ + // --- Information used in clipping/projection --- + // Origin vector for the plane + // NOTE: All similarly named entries in this struct do the same thing, + // differing with just 'f' in the name for float: + // o = of, d = df, zdelta = zdeltaf; the only difference is that one's fixed, + // and the one with the 'f' is floating point, for easier reference elsewhere in the code + v3fixed_t o; + v3float_t of; + + // The normal of the 3d plane the slope creates. + v3float_t normalf; + + // 2-Dimentional vector (x, y) normalized. Used to determine distance from + // the origin in 2d mapspace. + v2fixed_t d; + v2float_t df; + + // The rate at which z changes based on distance from the origin plane. + fixed_t zdelta; + float zdeltaf; + + // For comparing when a slope should be rendered + fixed_t lowz; + fixed_t highz; + + // SRB2CBTODO: This could be used for something? + // Determining the relative z values in a slope? + struct line_s *sourceline; + + // This values only check and must be updated if the slope itself is modified + USHORT zangle; // Angle of the plane going up from the ground (not mesured in degrees) + angle_t xydirection; // The direction the slope is facing (north, west, south, etc.) + secplane_t secplane; // Extra data for collision and stuff +} pslope_t; +#endif + typedef enum { SF_FLIPSPECIAL_FLOOR = 1, @@ -337,6 +380,11 @@ typedef struct sector_s precipmobj_t *preciplist; struct mprecipsecnode_s *touching_preciplist; +#ifdef ESLOPE + // Eternity engine slope + pslope_t *f_slope; // floor slope + pslope_t *c_slope; // ceiling slope +#endif // these are saved for netgames, so do not let Lua touch these! // offsets sector spawned with (via linedef type 7) @@ -396,6 +444,12 @@ typedef struct line_s char *text; // a concatination of all front and back texture names, for linedef specials that require a string. INT16 callcount; // no. of calls left before triggering, for the "X calls" linedef specials, defaults to 0 + +#ifdef ESLOPE + // SoM 05/11/09: Pre-calculated 2D normal for the line + float nx, ny; + float len; +#endif } line_t; // diff --git a/src/tables.c b/src/tables.c index fa71effef..cfc17c9c9 100644 --- a/src/tables.c +++ b/src/tables.c @@ -2225,9 +2225,6 @@ angle_t tantoangle[2049] = 536870912 }; - -#ifdef NEED_FIXED_VECTOR - static angle_t fineacon[65536*2] = { ANGLE_MAX, 2143707442, 2142143280, 2140943052, 2139931208, 2139039753, 2138233813, 2137492672, 2136802831, 2136154917, 2135542102, 2134959233, 2134402306, 2133868139, 2133354148, 2132858208, 2132378539, 2131913638, 2131462220, 2131023174, 2130595537, 2130178462, 2129771202, 2129373097, 2128983555, 2128602046, 2128228092, 2127861261, 2127501162, 2127147436, 2126799757, 2126457825, @@ -10429,6 +10426,8 @@ FUNCMATH angle_t FixedAcos(fixed_t x) return fineacon[((x<<(FINE_FRACBITS-FRACBITS)))+FRACUNIT]; } +#ifdef NEED_FIXED_VECTOR + // // AngleBetweenVectors // diff --git a/src/tables.h b/src/tables.h index 219d668b9..cd6a17ff5 100644 --- a/src/tables.h +++ b/src/tables.h @@ -96,12 +96,11 @@ FUNCMATH angle_t FixedAngle(fixed_t fa); // and with a factor, with +factor for (fa/factor) and -factor for (fa*factor) FUNCMATH angle_t FixedAngleC(fixed_t fa, fixed_t factor); - -#ifdef NEED_FIXED_VECTOR - /// The FixedAcos function FUNCMATH angle_t FixedAcos(fixed_t x); +#ifdef NEED_FIXED_VECTOR + /// Fixed Point Vector functions angle_t FV2_AngleBetweenVectors(const vector2_t *Vector1, const vector2_t *Vector2); angle_t FV3_AngleBetweenVectors(const vector3_t *Vector1, const vector3_t *Vector2); From 7535bb261fa7ad2c4ab8db5991a526911875c42f Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Thu, 1 Jan 2015 07:09:23 +0000 Subject: [PATCH 004/609] Account for the separation of F11 and F12 in the keycodes list --- src/sdl/i_video.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index cddc9e83d..faee1bc69 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -271,12 +271,17 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code) { return '0'; } - if (code >= SDL_SCANCODE_F1 && code <= SDL_SCANCODE_F12) + if (code >= SDL_SCANCODE_F1 && code <= SDL_SCANCODE_F10) { return KEY_F1 + (code - SDL_SCANCODE_F1); } switch (code) { + case SDL_SCANCODE_F11: // F11 and F12 are + return KEY_F11; // separated from the + case SDL_SCANCODE_F12: // rest of the function + return KEY_F12; // keys + case SDL_SCANCODE_KP_0: return KEY_KEYPAD0; case SDL_SCANCODE_KP_1: From 8bee6bef59f46951b60d839480cbf150ad367460 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Tue, 6 Jan 2015 13:13:25 +0000 Subject: [PATCH 005/609] Make sure clear_conditionsets feeds in 1 to MAXCONDITIONSETS instead of 0 to MAXCONDITIONSETS-1, so that M_ClearConditionSet can use them all properly AND clear all condition sets properly. Apparently the mistake also caused myargc to be cleared in Linux64 SDL2 (as pointed out by that ilag11111 guy on GitHub), so that should be fixed now too. --- src/dehacked.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dehacked.c b/src/dehacked.c index 2dc9d742e..a332da5df 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -351,7 +351,7 @@ static void clear_conditionsets(void) { UINT8 i; for (i = 0; i < MAXCONDITIONSETS; ++i) - M_ClearConditionSet(i); + M_ClearConditionSet(i+1); } static void clear_levels(void) From 0c106a4cccca45418b03818fb72c9edd09a57cb7 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Sat, 10 Jan 2015 02:36:05 +0000 Subject: [PATCH 006/609] I await the rise of AltimitOS because seriously, fuck this nonsense --- src/sdl/i_system.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 9c13b716c..8675301e8 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -312,9 +312,9 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num) switch (num) { - case SIGINT: - sigmsg = "SIGINT - interrupted"; - break; +// case SIGINT: +// sigmsg = "SIGINT - interrupted"; +// break; case SIGILL: sigmsg = "SIGILL - illegal instruction - invalid function image"; break; @@ -324,14 +324,12 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num) case SIGSEGV: sigmsg = "SIGSEGV - segment violation"; break; - case SIGTERM: - sigmsg = "SIGTERM - Software termination signal from kill"; - break; -#if !(defined (__unix_) || defined (UNIXCOMMON)) - case SIGBREAK: - sigmsg = "SIGBREAK - Ctrl-Break sequence"; - break; -#endif +// case SIGTERM: +// sigmsg = "SIGTERM - Software termination signal from kill"; +// break; +// case SIGBREAK: +// sigmsg = "SIGBREAK - Ctrl-Break sequence"; +// break; case SIGABRT: sigmsg = "SIGABRT - abnormal termination triggered by abort call"; break; @@ -743,11 +741,18 @@ static inline void I_ShutdownConsole(void){} void I_StartupKeyboard (void) { #if !defined (DC) +#ifdef SIGINT + signal(SIGINT , quit_handler); +#endif +#ifdef SIGBREAK + signal(SIGBREAK , quit_handler); +#endif +#ifdef SIGTERM + signal(SIGTERM , quit_handler); +#endif + // If these defines don't exist, // then compilation would have failed above us... - signal(SIGINT , quit_handler); - signal(SIGBREAK , quit_handler); - signal(SIGTERM , quit_handler); signal(SIGILL , signal_handler); signal(SIGSEGV , signal_handler); signal(SIGABRT , signal_handler); @@ -2332,9 +2337,7 @@ static boolean shutdowning = false; void I_Error(const char *error, ...) { va_list argptr; -#if (defined (MAC_ALERT) || defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX) char buffer[8192]; -#endif // recursive error detecting if (shutdowning) From f5cd1d5ebcb565f2a9944d78b4026db36555081f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 10 Jan 2015 17:26:29 -0500 Subject: [PATCH 007/609] add check on write failed in old TGA screenshot code --- src/hardware/hw_draw.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index 313bc6c2f..e6a26e605 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -726,7 +726,11 @@ static inline boolean saveTGA(const char *file_name, void *buffer, tga_hdr.image_type = 2; tga_hdr.image_descriptor = 32; - write(fd, &tga_hdr, sizeof (TGAHeader)); + if ( -1 == write(fd, &tga_hdr, sizeof (TGAHeader))) + { + close(fd); + return false; + } // format to 888 BGR for (i = 0; i < width * height * 3; i+=3) { @@ -734,7 +738,11 @@ static inline boolean saveTGA(const char *file_name, void *buffer, buf8[i] = buf8[i+2]; buf8[i+2] = temp; } - write(fd, buffer, width * height * 3); + if ( -1 == write(fd, buffer, width * height * 3)) + { + close(fd); + return false; + } close(fd); return true; } From e28882a56d88b6ac54bd176efd7c49001602ed30 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 10 Jan 2015 17:27:24 -0500 Subject: [PATCH 008/609] oh, nPlaneVerts is a size_t?, well, then we need to use sizeu#() --- src/hardware/hw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9d7101db8..db812c0df 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2651,7 +2651,7 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, fixed_t fixedheight if (nrPlaneVerts > UINT16_MAX) // FIXME: exceeds plVerts size { - CONS_Debug(DBG_RENDER, "polygon size of %d exceeds max value of %d vertices\n", nrPlaneVerts, UINT16_MAX); + CONS_Debug(DBG_RENDER, "polygon size of %s exceeds max value of %d vertices\n", sizeu1(nrPlaneVerts), UINT16_MAX); return; } From 45e8ec34a6f553ff5ac7e3ca97375f74637c5057 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 10 Jan 2015 17:35:36 -0500 Subject: [PATCH 009/609] always turn on LFS support when compiling for a Linux/GNU system with libpng support --- src/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile b/src/Makefile index f5d58af3a..d4cc64a4b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -305,6 +305,10 @@ PNG_LDFLAGS?=$(shell $(PNG_CONFIG) --ldflags) endif endif +ifdef LINUX +PNG_CFLAGS+=-D_LARGEFILE64_SOURCE +endif + LIBS+=$(PNG_LDFLAGS) CFLAGS+=$(PNG_CFLAGS) endif From 05f5ec664a9d10c88502d454f69a6ed87b90b028 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Tue, 27 Jan 2015 23:46:39 -0600 Subject: [PATCH 010/609] Initial CMake support pass Compiles the SDL2 target on Windows successfully --- CMakeLists.txt | 202 ++++------------- cmake/Modules/FindSDL2.cmake | 34 +++ cmake/Modules/LibFindMacros.cmake | 265 +++++++++++++++++++++++ src/CMakeLists.txt | 347 ++++++++++++++++++++++++++++++ src/Makefile | 2 + src/sdl/CMakeLists.txt | 111 ++++++++++ src/win32/CMakeLists.txt | 13 ++ 7 files changed, 808 insertions(+), 166 deletions(-) create mode 100644 cmake/Modules/FindSDL2.cmake create mode 100644 cmake/Modules/LibFindMacros.cmake create mode 100644 src/CMakeLists.txt create mode 100644 src/sdl/CMakeLists.txt create mode 100644 src/win32/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cffa367e..30ef1338a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,173 +1,43 @@ -# -# Simple CMakeLists for Sonic Robo Blast 2 -# -PROJECT(SRB2) +cmake_minimum_required(VERSION 3.0) +project(SRB2 + VERSION 2.1.14) -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +# Set up CMAKE path +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") -# -# Dependencies -# -FIND_PACKAGE(SDL) -FIND_PACKAGE(SDL_mixer) -FIND_PACKAGE(PNG) +### Useful functions -# -# Common stuff -# +# Prepend sources with current source directory +function(prepend_sources SOURCE_FILES) + foreach(SOURCE_FILE ${${SOURCE_FILES}}) + set(MODIFIED ${MODIFIED} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE}) + endforeach() + set(${SOURCE_FILES} ${MODIFIED} PARENT_SCOPE) +endfunction() -# not added defines: -# -DHAVE_PNG - does not build (incorrect use of PNG_EXPORT etc.) -ADD_DEFINITIONS(-DDIRECTFULLSCREEN -DSDL -DHAVE_MIXER -DNOHW -DHW3SOUND -DHAVE_BLUA -DNOASM) +# 64-bit check +if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) + message(STATUS "Target is 64-bit") + set(SRB2_SYSTEM_BITS 64) +else() + set(SRB2_SYSTEM_BITS 32) +endif() -SET(SDL_DIR sdl) # may be set to SDL2 optionally +# DO NOT ALLOW MSVC! +if(MSVC) + message(FATAL_ERROR "MSVC is not supported!") +endif() -SET(COMMON_SRCS - src/${SDL_DIR}/dosstr.c - src/${SDL_DIR}/endtxt.c - src/${SDL_DIR}/hwsym_sdl.c - src/${SDL_DIR}/i_cdmus.c - src/${SDL_DIR}/i_main.c - src/${SDL_DIR}/i_net.c - src/${SDL_DIR}/i_system.c - src/${SDL_DIR}/i_video.c - src/${SDL_DIR}/mixer_sound.c - src/am_map.c - src/b_bot.c - src/blua/lapi.c - src/blua/lauxlib.c - src/blua/lbaselib.c - src/blua/lcode.c - src/blua/ldebug.c - src/blua/ldo.c - src/blua/ldump.c - src/blua/lfunc.c - src/blua/lgc.c - src/blua/linit.c - src/blua/llex.c - src/blua/lmem.c - src/blua/lobject.c - src/blua/lopcodes.c - src/blua/lparser.c - src/blua/lstate.c - src/blua/lstring.c - src/blua/lstrlib.c - src/blua/ltable.c - src/blua/ltablib.c - src/blua/ltm.c - src/blua/lundump.c - src/blua/lvm.c - src/blua/lzio.c - src/command.c - src/comptime.c - src/console.c - src/d_clisrv.c - src/d_main.c - src/d_net.c - src/d_netcmd.c - src/d_netfil.c - src/dehacked.c - src/f_finale.c - src/f_wipe.c - src/filesrch.c - src/g_game.c - src/g_input.c - src/hardware/hw3sound.c - src/hu_stuff.c - src/i_tcp.c - src/info.c - src/lua_baselib.c - src/lua_consolelib.c - src/lua_hooklib.c - src/lua_hudlib.c - src/lua_infolib.c - src/lua_maplib.c - src/lua_mathlib.c - src/lua_mobjlib.c - src/lua_playerlib.c - src/lua_script.c - src/lua_skinlib.c - src/lua_thinkerlib.c - src/lzf.c - src/m_anigif.c - src/m_argv.c - src/m_bbox.c - src/m_cheat.c - src/m_cond.c - src/m_fixed.c - src/m_menu.c - src/m_misc.c - src/m_queue.c - src/m_random.c - src/md5.c - src/mserv.c - src/p_ceilng.c - src/p_enemy.c - src/p_fab.c - src/p_floor.c - src/p_inter.c - src/p_lights.c - src/p_map.c - src/p_maputl.c - src/p_mobj.c - src/p_polyobj.c - src/p_saveg.c - src/p_setup.c - src/p_sight.c - src/p_spec.c - src/p_telept.c - src/p_tick.c - src/p_user.c - src/r_bsp.c - src/r_data.c - src/r_draw.c - src/r_main.c - src/r_plane.c - src/r_segs.c - src/r_sky.c - src/r_splats.c - src/r_things.c - src/s_sound.c - src/screen.c - src/sounds.c - src/st_stuff.c - src/string.c - src/tables.c - src/v_video.c - src/w_wad.c - src/y_inter.c - src/z_zone.c -) +# OS macros +if (UNIX) + add_definitions(-DUNIXCOMMON) +endif() +if(${CMAKE_SYSTEM} MATCHES "Linux") + add_definitions(-DLINUX) + if(${SRB2_SYSTEM_BITS} EQUAL 64) + add_definitions(-DLINUX64) + endif() +endif() +# TODO support MacOSX builds -# -# Platform-specific stuff -# - -MACRO(EXTRALIB NAME) - FIND_LIBRARY(${NAME}_LIBRARY NAMES ${NAME}) - IF(${NAME}_LIBRARY) - MESSAGE(STATUS "Found lib${NAME}: ${${NAME}_LIBRARY}") - SET(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} ${${NAME}_LIBRARY}) - ELSE(${NAME}_LIBRARY) - MESSAGE(FATAL_ERROR "Could not find lib${NAME}!") - ENDIF(${NAME}_LIBRARY) -ENDMACRO(EXTRALIB) - -IF(${CMAKE_SYSTEM} MATCHES "FreeBSD") - ADD_DEFINITIONS(-DUNIXCOMMON -DLINUX -DFREEBSD) - EXTRALIB(kvm) -ELSEIF(${CMAKE_SYSTEM} MATCHES "Linux") - ADD_DEFINITIONS(-DUNIXCOMMON -DLINUX) - EXTRALIB(m) - EXTRALIB(rt) -ELSE(${CMAKE_SYSTEM} MATCHES "FreeBSD") - ADD_DEFINITIONS(-DUNIXCOMMON -DLINUX) - MESSAGE(WARNING "No specific settings for you system, it may be not supported!") -ENDIF(${CMAKE_SYSTEM} MATCHES "FreeBSD") - -# -# Targets -# -INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIRS} ${SDL_INCLUDE_DIR} ${SDL_MIXER_INCLUDE_DIRS}) -ADD_EXECUTABLE(SRB2 ${COMMON_SRCS}) -TARGET_LINK_LIBRARIES(SRB2 ${SDL_LIBRARY} ${SDL_MIXER_LIBRARIES} ${EXTRA_LIBRARIES}) +add_subdirectory(src/) diff --git a/cmake/Modules/FindSDL2.cmake b/cmake/Modules/FindSDL2.cmake new file mode 100644 index 000000000..faa556a88 --- /dev/null +++ b/cmake/Modules/FindSDL2.cmake @@ -0,0 +1,34 @@ +# Find SDL2 +# Once done, this will define +# +# SDL2_FOUND - system has SDL2 +# SDL2_INCLUDE_DIRS - SDL2 include directories +# SDL2_LIBRARIES - link libraries + +include(LibFindMacros) + +libfind_pkg_check_modules(SDL2_PKGCONF SDL2) + +# includes +find_path(SDL2_INCLUDE_DIR + NAMES SDL.h + PATHS + ${SDL2_PKGCONF_INCLUDE_DIRS} + "/usr/include/SDL2" + "/usr/local/include/SDL2" +) + +# library +find_library(SDL2_LIBRARY + NAMES SDL2 + PATHS + ${SDL2_PKGCONF_LIBRARY_DIRS} + "/usr/lib" + "/usr/local/lib" +) + + +# set include dir variables +set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR) +set(SDL2_PROCESS_LIBS SDL2_LIBRARY) +libfind_process(SDL2) diff --git a/cmake/Modules/LibFindMacros.cmake b/cmake/Modules/LibFindMacros.cmake new file mode 100644 index 000000000..f6800aa7b --- /dev/null +++ b/cmake/Modules/LibFindMacros.cmake @@ -0,0 +1,265 @@ +# Version 2.2 +# Public Domain, originally written by Lasse Kärkkäinen +# Maintained at https://github.com/Tronic/cmake-modules +# Please send your improvements as pull requests on Github. + +# Find another package and make it a dependency of the current package. +# This also automatically forwards the "REQUIRED" argument. +# Usage: libfind_package( [extra args to find_package]) +macro (libfind_package PREFIX PKG) + set(${PREFIX}_args ${PKG} ${ARGN}) + if (${PREFIX}_FIND_REQUIRED) + set(${PREFIX}_args ${${PREFIX}_args} REQUIRED) + endif() + find_package(${${PREFIX}_args}) + set(${PREFIX}_DEPENDENCIES ${${PREFIX}_DEPENDENCIES};${PKG}) + unset(${PREFIX}_args) +endmacro() + +# A simple wrapper to make pkg-config searches a bit easier. +# Works the same as CMake's internal pkg_check_modules but is always quiet. +macro (libfind_pkg_check_modules) + find_package(PkgConfig QUIET) + if (PKG_CONFIG_FOUND) + pkg_check_modules(${ARGN} QUIET) + endif() +endmacro() + +# Avoid useless copy&pasta by doing what most simple libraries do anyway: +# pkg-config, find headers, find library. +# Usage: libfind_pkg_detect( FIND_PATH [other args] FIND_LIBRARY [other args]) +# E.g. libfind_pkg_detect(SDL2 sdl2 FIND_PATH SDL.h PATH_SUFFIXES SDL2 FIND_LIBRARY SDL2) +function (libfind_pkg_detect PREFIX) + # Parse arguments + set(argname pkgargs) + foreach (i ${ARGN}) + if ("${i}" STREQUAL "FIND_PATH") + set(argname pathargs) + elseif ("${i}" STREQUAL "FIND_LIBRARY") + set(argname libraryargs) + else() + set(${argname} ${${argname}} ${i}) + endif() + endforeach() + if (NOT pkgargs) + message(FATAL_ERROR "libfind_pkg_detect requires at least a pkg_config package name to be passed.") + endif() + # Find library + libfind_pkg_check_modules(${PREFIX}_PKGCONF ${pkgargs}) + if (pathargs) + find_path(${PREFIX}_INCLUDE_DIR NAMES ${pathargs} HINTS ${${PREFIX}_PKGCONF_INCLUDE_DIRS}) + endif() + if (libraryargs) + find_library(${PREFIX}_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}) + endif() +endfunction() + +# Extracts a version #define from a version.h file, output stored to _VERSION. +# Usage: libfind_version_header(Foobar foobar/version.h FOOBAR_VERSION_STR) +# Fourth argument "QUIET" may be used for silently testing different define names. +# This function does nothing if the version variable is already defined. +function (libfind_version_header PREFIX VERSION_H DEFINE_NAME) + # Skip processing if we already have a version or if the include dir was not found + if (${PREFIX}_VERSION OR NOT ${PREFIX}_INCLUDE_DIR) + return() + endif() + set(quiet ${${PREFIX}_FIND_QUIETLY}) + # Process optional arguments + foreach(arg ${ARGN}) + if (arg STREQUAL "QUIET") + set(quiet TRUE) + else() + message(AUTHOR_WARNING "Unknown argument ${arg} to libfind_version_header ignored.") + endif() + endforeach() + # Read the header and parse for version number + set(filename "${${PREFIX}_INCLUDE_DIR}/${VERSION_H}") + if (NOT EXISTS ${filename}) + if (NOT quiet) + message(AUTHOR_WARNING "Unable to find ${${PREFIX}_INCLUDE_DIR}/${VERSION_H}") + endif() + return() + endif() + file(READ "${filename}" header) + string(REGEX REPLACE ".*#[ \t]*define[ \t]*${DEFINE_NAME}[ \t]*\"([^\n]*)\".*" "\\1" match "${header}") + # No regex match? + if (match STREQUAL header) + if (NOT quiet) + message(AUTHOR_WARNING "Unable to find \#define ${DEFINE_NAME} \"\" from ${${PREFIX}_INCLUDE_DIR}/${VERSION_H}") + endif() + return() + endif() + # Export the version string + set(${PREFIX}_VERSION "${match}" PARENT_SCOPE) +endfunction() + +# Do the final processing once the paths have been detected. +# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain +# all the variables, each of which contain one include directory. +# Ditto for ${PREFIX}_PROCESS_LIBS and library files. +# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. +# Also handles errors in case library detection was required, etc. +function (libfind_process PREFIX) + # Skip processing if already processed during this configuration run + if (${PREFIX}_FOUND) + return() + endif() + + set(found TRUE) # Start with the assumption that the package was found + + # Did we find any files? Did we miss includes? These are for formatting better error messages. + set(some_files FALSE) + set(missing_headers FALSE) + + # Shorthands for some variables that we need often + set(quiet ${${PREFIX}_FIND_QUIETLY}) + set(required ${${PREFIX}_FIND_REQUIRED}) + set(exactver ${${PREFIX}_FIND_VERSION_EXACT}) + set(findver "${${PREFIX}_FIND_VERSION}") + set(version "${${PREFIX}_VERSION}") + + # Lists of config option names (all, includes, libs) + unset(configopts) + set(includeopts ${${PREFIX}_PROCESS_INCLUDES}) + set(libraryopts ${${PREFIX}_PROCESS_LIBS}) + + # Process deps to add to + foreach (i ${PREFIX} ${${PREFIX}_DEPENDENCIES}) + if (DEFINED ${i}_INCLUDE_OPTS OR DEFINED ${i}_LIBRARY_OPTS) + # The package seems to export option lists that we can use, woohoo! + list(APPEND includeopts ${${i}_INCLUDE_OPTS}) + list(APPEND libraryopts ${${i}_LIBRARY_OPTS}) + else() + # If plural forms don't exist or they equal singular forms + if ((NOT DEFINED ${i}_INCLUDE_DIRS AND NOT DEFINED ${i}_LIBRARIES) OR + ({i}_INCLUDE_DIR STREQUAL ${i}_INCLUDE_DIRS AND ${i}_LIBRARY STREQUAL ${i}_LIBRARIES)) + # Singular forms can be used + if (DEFINED ${i}_INCLUDE_DIR) + list(APPEND includeopts ${i}_INCLUDE_DIR) + endif() + if (DEFINED ${i}_LIBRARY) + list(APPEND libraryopts ${i}_LIBRARY) + endif() + else() + # Oh no, we don't know the option names + message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes and libs. Aieeh!") + endif() + endif() + endforeach() + + if (includeopts) + list(REMOVE_DUPLICATES includeopts) + endif() + + if (libraryopts) + list(REMOVE_DUPLICATES libraryopts) + endif() + + string(REGEX REPLACE ".*[ ;]([^ ;]*(_INCLUDE_DIRS|_LIBRARIES))" "\\1" tmp "${includeopts} ${libraryopts}") + if (NOT tmp STREQUAL "${includeopts} ${libraryopts}") + message(AUTHOR_WARNING "Plural form ${tmp} found in config options of ${PREFIX}. This works as before but is now deprecated. Please only use singular forms INCLUDE_DIR and LIBRARY, and update your find scripts for LibFindMacros > 2.0 automatic dependency system (most often you can simply remove the PROCESS variables entirely).") + endif() + + # Include/library names separated by spaces (notice: not CMake lists) + unset(includes) + unset(libs) + + # Process all includes and set found false if any are missing + foreach (i ${includeopts}) + list(APPEND configopts ${i}) + if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND") + list(APPEND includes "${${i}}") + else() + set(found FALSE) + set(missing_headers TRUE) + endif() + endforeach() + + # Process all libraries and set found false if any are missing + foreach (i ${libraryopts}) + list(APPEND configopts ${i}) + if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND") + list(APPEND libs "${${i}}") + else() + set (found FALSE) + endif() + endforeach() + + # Version checks + if (found AND findver) + if (NOT version) + message(WARNING "The find module for ${PREFIX} does not provide version information, so we'll just assume that it is OK. Please fix the module or remove package version requirements to get rid of this warning.") + elseif (version VERSION_LESS findver OR (exactver AND NOT version VERSION_EQUAL findver)) + set(found FALSE) + set(version_unsuitable TRUE) + endif() + endif() + + # If all-OK, hide all config options, export variables, print status and exit + if (found) + foreach (i ${configopts}) + mark_as_advanced(${i}) + endforeach() + if (NOT quiet) + message(STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") + if (LIBFIND_DEBUG) + message(STATUS " ${PREFIX}_DEPENDENCIES=${${PREFIX}_DEPENDENCIES}") + message(STATUS " ${PREFIX}_INCLUDE_OPTS=${includeopts}") + message(STATUS " ${PREFIX}_INCLUDE_DIRS=${includes}") + message(STATUS " ${PREFIX}_LIBRARY_OPTS=${libraryopts}") + message(STATUS " ${PREFIX}_LIBRARIES=${libs}") + endif() + set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE) + set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE) + set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE) + set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE) + set (${PREFIX}_FOUND TRUE PARENT_SCOPE) + endif() + return() + endif() + + # Format messages for debug info and the type of error + set(vars "Relevant CMake configuration variables:\n") + foreach (i ${configopts}) + mark_as_advanced(CLEAR ${i}) + set(val ${${i}}) + if ("${val}" STREQUAL "${i}-NOTFOUND") + set (val "") + elseif (val AND NOT EXISTS ${val}) + set (val "${val} (does not exist)") + else() + set(some_files TRUE) + endif() + set(vars "${vars} ${i}=${val}\n") + endforeach() + set(vars "${vars}You may use CMake GUI, cmake -D or ccmake to modify the values. Delete CMakeCache.txt to discard all values and force full re-detection if necessary.\n") + if (version_unsuitable) + set(msg "${PREFIX} ${${PREFIX}_VERSION} was found but") + if (exactver) + set(msg "${msg} only version ${findver} is acceptable.") + else() + set(msg "${msg} version ${findver} is the minimum requirement.") + endif() + else() + if (missing_headers) + set(msg "We could not find development headers for ${PREFIX}. Do you have the necessary dev package installed?") + elseif (some_files) + set(msg "We only found some files of ${PREFIX}, not all of them. Perhaps your installation is incomplete or maybe we just didn't look in the right place?") + if(findver) + set(msg "${msg} This could also be caused by incompatible version (if it helps, at least ${PREFIX} ${findver} should work).") + endif() + else() + set(msg "We were unable to find package ${PREFIX}.") + endif() + endif() + + # Fatal error out if REQUIRED + if (required) + set(msg "REQUIRED PACKAGE NOT FOUND\n${msg} This package is REQUIRED and you need to install it or adjust CMake configuration in order to continue building ${CMAKE_PROJECT_NAME}.") + message(FATAL_ERROR "${msg}\n${vars}") + endif() + # Otherwise just print a nasty warning + if (NOT quiet) + message(WARNING "WARNING: MISSING PACKAGE\n${msg} This package is NOT REQUIRED and you may ignore this warning but by doing so you may miss some functionality of ${CMAKE_PROJECT_NAME}. \n${vars}") + endif() +endfunction() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..e9f52321a --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,347 @@ +# SRB2 Core + +# Core sources +set(SRB2_CORE_SOURCES + am_map.c + b_bot.c + command.c + comptime.c + console.c + d_clisrv.c + d_main.c + d_net.c + d_netcmd.c + d_netfil.c + dehacked.c + f_finale.c + f_wipe.c + filesrch.c + g_game.c + g_input.c + hu_stuff.c + i_tcp.c + info.c + lzf.c + m_anigif.c + m_argv.c + m_bbox.c + m_cheat.c + m_cond.c + m_fixed.c + m_menu.c + m_misc.c + m_queue.c + m_random.c + md5.c + mserv.c + p_ceilng.c + p_enemy.c + p_fab.c + p_floor.c + p_inter.c + p_lights.c + p_map.c + p_maputl.c + p_mobj.c + p_polyobj.c + p_saveg.c + p_setup.c + p_sight.c + p_spec.c + p_telept.c + p_tick.c + p_user.c + r_bsp.c + r_data.c + r_draw.c + r_main.c + r_plane.c + r_segs.c + r_sky.c + r_splats.c + r_things.c + s_sound.c + screen.c + sounds.c + st_stuff.c + string.c + tables.c + v_video.c + w_wad.c + y_inter.c + z_zone.c +) + +set(SRB2_CORE_HEADERS + am_map.h + b_bot.h + byteptr.h + command.h + comptime.h + console.h + d_clisrv.h + d_event.h + d_main.h + d_net.h + d_netcmd.h + d_netfil.h + d_player.h + d_think.h + d_ticcmd.h + dehacked.h + doomdata.h + doomdef.h + doomstat.h + doomtype.h + endian.h + f_finale.h + fastcmp.h + filesrch.h + g_game.h + g_input.h + g_state.h + hu_stuff.h + i_joy.h + i_net.h + i_sound.h + i_system.h + i_tcp.h + i_video.h + info.h + keys.h + lzf.h + m_anigif.h + m_argv.h + m_bbox.h + m_cheat.h + m_cond.h + m_dllist.h + m_fixed.h + m_menu.h + m_misc.h + m_queue.h + m_random.h + m_swap.h + md5.h + mserv.h + p5prof.h + p_local.h + p_maputl.h + p_mobj.h + p_polyobj.h + p_pspr.h + p_saveg.h + p_setup.h + p_spec.h + p_tick.h + r_bsp.h + r_data.h + r_defs.h + r_draw.h + r_local.h + r_main.h + r_plane.h + r_segs.h + r_sky.h + r_splats.h + r_state.h + r_things.h + s_sound.h + screen.h + sounds.h + st_stuff.h + tables.h + v_video.h + w_wad.h + y_inter.h + z_zone.h +) + +prepend_sources(SRB2_CORE_SOURCES) +prepend_sources(SRB2_CORE_HEADERS) + +set(SRB2_HWRENDER_SOURCES + hardware/hw_bsp.c + hardware/hw_cache.c + hardware/hw_draw.c + hardware/hw_light.c + hardware/hw_main.c + hardware/hw_md2.c + hardware/hw_trick.c +) + +set (SRB2_HWRENDER_HEADERS + hardware/hw_data.h + hardware/hw_defs.h + hardware/hw_dll.h + hardware/hw_drv.h + hardware/hw_glide.h + hardware/hw_glob.h + hardware/hw_light.h + hardware/hw_main.h + hardware/hw_md2.h +) + +prepend_sources(SRB2_HWRENDER_SOURCES) +prepend_sources(SRB2_HWRENDER_HEADERS) + +set(SRB2_R_OPENGL_SOURCES + hardware/r_opengl/r_opengl.c +) + +set(SRB2_R_OPENGL_HEADERS + hardware/r_opengl/r_opengl.h +) + +prepend_sources(SRB2_R_OPENGL_SOURCES) +prepend_sources(SRB2_R_OPENGL_HEADERS) + +### Configuration +set(SRB2_CONFIG_HAVE_BLUA ON CACHE BOOL + "Enable Lua interpreter support") +set(SRB2_CONFIG_HAVE_PNG ON CACHE BOOL + "Enable PNG support. Depends on zlib, so will be disabled if you don't enable that too.") +set(SRB2_CONFIG_HAVE_ZLIB ON CACHE BOOL + "Enable zlib support") +set(SRB2_CONFIG_HAVE_LIBGME ON CACHE BOOL + "Enable GME support") +set(SRB2_CONFIG_HWRENDER ON CACHE BOOL + "Enable hardware rendering through OpenGL") +set(SRB2_CONFIG_USEASM OFF CACHE BOOL + "Enable nasm-implemented blit functions for moderate speedup") + +if(${SRB2_CONFIG_HAVE_BLUA}) + add_definitions(-DHAVE_BLUA) + set(SRB2_LUA_SOURCES + lua_baselib.c + lua_consolelib.c + lua_hooklib.c + lua_hudlib.c + lua_infolib.c + lua_maplib.c + lua_mathlib.c + lua_mobjlib.c + lua_playerlib.c + lua_script.c + lua_skinlib.c + lua_thinkerlib.c + ) + set(SRB2_LUA_HEADERS + lua_hook.h + lua_hud.h + lua_libs.h + lua_script.h + ) + + prepend_sources(SRB2_LUA_SOURCES) + prepend_sources(SRB2_LUA_HEADERS) + + set(SRB2_BLUA_SOURCES + blua/lapi.c + blua/lauxlib.c + blua/lbaselib.c + blua/lcode.c + blua/ldebug.c + blua/ldo.c + blua/ldump.c + blua/lfunc.c + blua/lgc.c + blua/linit.c + blua/llex.c + blua/lmem.c + blua/lobject.c + blua/lopcodes.c + blua/lparser.c + blua/lstate.c + blua/lstring.c + blua/lstrlib.c + blua/ltable.c + blua/ltablib.c + blua/ltm.c + blua/lundump.c + blua/lvm.c + blua/lzio.c + ) + set(SRB2_BLUA_HEADERS + blua/lapi.h + blua/lauxlib.h + blua/lcode.h + blua/ldebug.h + blua/ldo.h + blua/lfunc.h + blua/lgc.h + blua/llex.h + blua/llimits.h + blua/lmem.h + blua/lobject.h + blua/lopcodes.h + blua/lparser.h + blua/lstate.h + blua/lstring.h + blua/ltable.h + blua/ltm.h + blua/lua.h + blua/luaconf.h + blua/lualib.h + blua/lundump.h + blua/lvm.h + blua/lzio.h + ) + prepend_sources(SRB2_BLUA_SOURCES) + prepend_sources(SRB2_BLUA_HEADERS) +endif() + +if(${SRB2_CONFIG_HAVE_LIBGME}) + # ??? +endif() + +if(${SRB2_CONFIG_HAVE_ZLIB}) + find_package(ZLIB) + if(${ZLIB_FOUND}) + set(SRB2_HAVE_ZLIB ON) + else() + message(WARNING "You have specified that ZLIB is available but it was not found. SRB2 may not compile correctly.") + endif() +endif() + +if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB}) + if (${ZLIB_FOUND}) + find_package(PNG) + if(${PNG_FOUND}) + set(SRB2_HAVE_PNG ON) + add_definitions(-DHAVE_PNG) + add_definitions(-D_LARGEFILE64_SOURCE) + else() + message(WARNING "You have specified that PNG is available but it was not found. SRB2 may not compile correctly.") + endif() + endif() +endif() + +if(${SRB2_CONFIG_HWRENDER}) + find_package(OpenGL) + if(${OPENGL_FOUND}) + add_definitions(-DHWRENDER) + else() + message(WARNING "You have specified HWRENDER but opengl was not found. Not setting HWRENDER.") + endif() +endif() + +if(${SRB2_CONFIG_USEASM}) + set(SRB2_USEASM ON) + add_definitions(-DUSEASM) +else() + set(SRB2_USEASM OFF) + add_definitions(-DNOASM -DNONX86) +endif() + +# Targets + +if(${CMAKE_SYSTEM} MATCHES Windows) + add_subdirectory(win32) +endif() + +# Compatibility flag with later versions of GCC +# We should really fix our code to not need this +add_compile_options(-mno-ms-bitfields) + +add_subdirectory(sdl) diff --git a/src/Makefile b/src/Makefile index d4cc64a4b..a1a8804e7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -585,6 +585,8 @@ $(BIN)/$(EXENAME): $(POS) $(OBJS) -$(MKDIR) $(BIN) @echo Linking $(EXENAME)... $(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS) + @echo $(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS) + @echo $(CFLAGS) ifndef VALGRIND ifndef NOOBJDUMP @echo Dumping debugging info diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt new file mode 100644 index 000000000..66dfeb998 --- /dev/null +++ b/src/sdl/CMakeLists.txt @@ -0,0 +1,111 @@ +# Declare SDL2 interface sources + +set(SRB2_CONFIG_SDL2_USEMIXER ON CACHE BOOL "Use SDL2_mixer or regular sdl sound") + +if(${SRB2_CONFIG_SDL2_USEMIXER}) + set(SRB2_SDL2_SOUNDIMPL mixer_sound.c) +else() + set(SRB2_SDL2_SOUNDIMPL sdl_sound.c) +endif() + +set(SRB2_SDL2_SOURCES + dosstr.c + endtxt.c + hwsym_sdl.c + i_cdmus.c + i_main.c + i_net.c + i_system.c + i_ttf.c + i_video.c + #IMG_xpm.c + ogl_sdl.c + + ${SRB2_SDL2_SOUNDIMPL} +) + +set(SRB2_SDL2_HEADERS + endtxt.h + hwsym_sdl.h + i_ttf.h + ogl_sdl.h + sdlmain.h +) + +prepend_sources(SRB2_SDL2_SOURCES) +prepend_sources(SRB2_SDL2_HEADERS) + +# Binary name +set(SRB2_SDL2_EXE_NAME srb2sdl2) +if(${CMAKE_SYSTEM} MATCHES "Windows") + set(SRB2_SDL2_EXE_NAME srb2win) +endif() + +# Dependency +find_package(SDL2) + +if(${SDL2_FOUND}) + set(SRB2_SDL2_TOTAL_SOURCES + ${SRB2_CORE_SOURCES} + ${SRB2_CORE_HEADERS} + ${SRB2_SDL2_SOURCES} + ${SRB2_SDL2_HEADERS} + ) + + if(${SRB2_CONFIG_HWRENDER} AND ${OPENGL_FOUND}) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + ${SRB2_HWRENDER_SOURCES} + ${SRB2_HWRENDER_HEADERS} + ${SRB2_R_OPENGL_SOURCES} + ${SRB2_R_OPENGL_HEADERS} + ) + endif() + + if(${SRB2_CONFIG_HAVE_BLUA}) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + ${SRB2_LUA_SOURCES} + ${SRB2_LUA_HEADERS} + ${SRB2_BLUA_SOURCES} + ${SRB2_BLUA_HEADERS} + ) + endif() + + if(${CMAKE_SYSTEM} MATCHES Windows) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + ${CMAKE_SOURCE_DIR}/src/win32/win_dbg.c + ) + endif() + + add_executable(${SRB2_SDL2_EXE_NAME} WIN32 ${SRB2_SDL2_TOTAL_SOURCES}) + + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + ${SDL2_LIBRARIES} + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${OPENGL_LIBRARIES} + ) + + if(${CMAKE_SYSTEM} MATCHES Windows) + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + ws2_32 + ) + target_compile_options(${SRB2_SDL2_EXE_NAME} PRIVATE + -U_WINDOWS + ) + endif() + + target_include_directories(${SRB2_SDL2_EXE_NAME} PRIVATE + ${SDL2_INCLUDE_DIRS} + ${SDL2_MAIN_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIRS} + ${OPENGL_INCLUDE_DIRS} + ) + + target_compile_definitions(${SRB2_SDL2_EXE_NAME} PRIVATE + -DHAVE_SDL + -DNDEBUG + ) +else() + message(WARNING "SDL2 wasn't found, so ${SRB2_SDL2_EXE_NAME} won't be available") +endif() diff --git a/src/win32/CMakeLists.txt b/src/win32/CMakeLists.txt new file mode 100644 index 000000000..4800852c9 --- /dev/null +++ b/src/win32/CMakeLists.txt @@ -0,0 +1,13 @@ +set(SRB2_WIN_EXE_NAME srb2dd) + +add_executable(${SRB2_WIN_EXE_NAME} EXCLUDE_FROM_ALL + ${SRB2_CORE_SOURCES} + ${SRB2_CORE_HEADERS} + ${SRB2_LUA_SOURCES} + ${SRB2_LUA_HEADERS} + ${SRB2_BLUA_SOURCES} + ${SRB2_BLUA_HEADERS}) + +target_compile_definitions(${SRB2_WIN_EXE_NAME} PRIVATE + -D_WINDOWS +) \ No newline at end of file From 479ebc3f94200db78ac56d3abc53e59d23d5bfc0 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 00:58:30 -0600 Subject: [PATCH 011/609] Add Xcode target support It is really messy at the moment. There is no support for copying the necessary frameworks and dylibs out to the bundle for distribution, and it is a frankenstein of manual find_library and find_package which can sometimes pick up Homebrew dylibs. --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ src/CMakeLists.txt | 6 ++++-- src/sdl/CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++------- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30ef1338a..dc511c7e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,24 @@ function(prepend_sources SOURCE_FILES) set(${SOURCE_FILES} ${MODIFIED} PARENT_SCOPE) endfunction() +# Macro to add OSX framework +macro(add_framework fwname appname) + find_library(FRAMEWORK_${fwname} + NAMES ${fwname} + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + ${CMAKE_OSX_SYSROOT}/Library + /System/Library + /Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH) + if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND) + MESSAGE(ERROR ": Framework ${fwname} not found") + else() + TARGET_LINK_LIBRARIES(${appname} PRIVATE "${FRAMEWORK_${fwname}}/${fwname}") + MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}") + endif() +endmacro() + # 64-bit check if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) message(STATUS "Target is 64-bit") @@ -32,12 +50,21 @@ endif() if (UNIX) add_definitions(-DUNIXCOMMON) endif() + if(${CMAKE_SYSTEM} MATCHES "Linux") add_definitions(-DLINUX) if(${SRB2_SYSTEM_BITS} EQUAL 64) add_definitions(-DLINUX64) endif() endif() + +if(${CMAKE_SYSTEM} MATCHES "Darwin") + add_definitions(-DMACOSX) + if(${CMAKE_C_COMPILER_ID} MATCHES "Clang") + set(CLANG ON) + endif() +endif() + # TODO support MacOSX builds add_subdirectory(src/) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e9f52321a..442ddca6c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,7 +64,7 @@ set(SRB2_CORE_SOURCES screen.c sounds.c st_stuff.c - string.c + #string.c tables.c v_video.c w_wad.c @@ -342,6 +342,8 @@ endif() # Compatibility flag with later versions of GCC # We should really fix our code to not need this -add_compile_options(-mno-ms-bitfields) +if(NOT CLANG) + add_compile_options(-mno-ms-bitfields) +endif() add_subdirectory(sdl) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 66dfeb998..e445eb72a 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -40,6 +40,9 @@ set(SRB2_SDL2_EXE_NAME srb2sdl2) if(${CMAKE_SYSTEM} MATCHES "Windows") set(SRB2_SDL2_EXE_NAME srb2win) endif() +if(CLANG) + set(SRB2_SDL2_EXE_NAME SRB2) +endif() # Dependency find_package(SDL2) @@ -76,14 +79,36 @@ if(${SDL2_FOUND}) ) endif() - add_executable(${SRB2_SDL2_EXE_NAME} WIN32 ${SRB2_SDL2_TOTAL_SOURCES}) + if(${CMAKE_SYSTEM} MATCHES Darwin) + set(MACOSX_BUNDLE_ICON_FILE Srb2mac.icns) + set_source_files_properties(macosx/Srb2mac.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + macosx/mac_alert.c + macosx/mac_alert.h + macosx/Srb2mac.icns + ) + endif() - target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE - ${SDL2_LIBRARIES} - ${PNG_LIBRARIES} - ${ZLIB_LIBRARIES} - ${OPENGL_LIBRARIES} - ) + if(CLANG) + add_executable(${SRB2_SDL2_EXE_NAME} MACOSX_BUNDLE ${SRB2_SDL2_TOTAL_SOURCES}) + add_framework(CoreFoundation ${SRB2_SDL2_EXE_NAME}) + add_framework(SDL2 ${SRB2_SDL2_EXE_NAME}) + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${OPENGL_LIBRARIES} + ) + else() + add_executable(${SRB2_SDL2_EXE_NAME} WIN32 ${SRB2_SDL2_TOTAL_SOURCES}) + + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + ${SDL2_LIBRARIES} + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${OPENGL_LIBRARIES} + ) + + endif() if(${CMAKE_SYSTEM} MATCHES Windows) target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE From 495ea65cc55ddbdfa44ca3c4a76f8aba22cc21b0 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 01:20:43 -0600 Subject: [PATCH 012/609] Add GME and SDL2_mixer Also support dynamic/static opengl switching --- cmake/Modules/FindGME.cmake | 23 ++++++++++++++++++++ cmake/Modules/FindSDL2_mixer.cmake | 34 ++++++++++++++++++++++++++++++ src/CMakeLists.txt | 20 ++++++++++++++---- src/sdl/CMakeLists.txt | 20 +++++++++++++++--- 4 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 cmake/Modules/FindGME.cmake create mode 100644 cmake/Modules/FindSDL2_mixer.cmake diff --git a/cmake/Modules/FindGME.cmake b/cmake/Modules/FindGME.cmake new file mode 100644 index 000000000..3b0c68de7 --- /dev/null +++ b/cmake/Modules/FindGME.cmake @@ -0,0 +1,23 @@ +include(LibFindMacros) + +libfind_pkg_check_modules(GME_PKGCONF GME) + +find_path(GME_INCLUDE_DIR + NAMES gme.h + PATHS + ${GME_PKGCONF_INCLUDE_DIRS} + /usr/include/gme + /usr/local/include/gme +) + +find_library(GME_LIBRARY + NAMES gme + PATHS + ${GME_PKGCONF_LIBRARY_DIRS} + /usr/lib + /usr/local/lib +) + +set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR) +set(GME_PROCESS_LIBS GME_LIBRARY) +libfind_process(GME) \ No newline at end of file diff --git a/cmake/Modules/FindSDL2_mixer.cmake b/cmake/Modules/FindSDL2_mixer.cmake new file mode 100644 index 000000000..59b4823ed --- /dev/null +++ b/cmake/Modules/FindSDL2_mixer.cmake @@ -0,0 +1,34 @@ +# Find SDL2 +# Once done, this will define +# +# SDL2_MIXER_FOUND - system has SDL2 +# SDL2_MIXER_INCLUDE_DIRS - SDL2 include directories +# SDL2_MIXER_LIBRARIES - link libraries + +include(LibFindMacros) + +libfind_pkg_check_modules(SDL2_MIXER_PKGCONF SDL2_mixer) + +# includes +find_path(SDL2_MIXER_INCLUDE_DIR + NAMES SDL_mixer.h + PATHS + ${SDL2_MIXER_PKGCONF_INCLUDE_DIRS} + "/usr/include/SDL2" + "/usr/local/include/SDL2" +) + +# library +find_library(SDL2_MIXER_LIBRARY + NAMES SDL2_mixer + PATHS + ${SDL2_MIXER_PKGCONF_LIBRARY_DIRS} + "/usr/lib" + "/usr/local/lib" +) + + +# set include dir variables +set(SDL2_MIXER_PROCESS_INCLUDES SDL2_MIXER_INCLUDE_DIR) +set(SDL2_MIXER_PROCESS_LIBS SDL2_MIXER_LIBRARY) +libfind_process(SDL2_MIXER) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 442ddca6c..2772ba8a9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -203,12 +203,14 @@ set(SRB2_CONFIG_HAVE_PNG ON CACHE BOOL "Enable PNG support. Depends on zlib, so will be disabled if you don't enable that too.") set(SRB2_CONFIG_HAVE_ZLIB ON CACHE BOOL "Enable zlib support") -set(SRB2_CONFIG_HAVE_LIBGME ON CACHE BOOL +set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL "Enable GME support") set(SRB2_CONFIG_HWRENDER ON CACHE BOOL "Enable hardware rendering through OpenGL") set(SRB2_CONFIG_USEASM OFF CACHE BOOL "Enable nasm-implemented blit functions for moderate speedup") +set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL + "Use statically linked OpenGL. NOT RECOMMENDED.") if(${SRB2_CONFIG_HAVE_BLUA}) add_definitions(-DHAVE_BLUA) @@ -291,8 +293,13 @@ if(${SRB2_CONFIG_HAVE_BLUA}) prepend_sources(SRB2_BLUA_HEADERS) endif() -if(${SRB2_CONFIG_HAVE_LIBGME}) - # ??? +if(${SRB2_CONFIG_HAVE_GME}) + find_package(GME) + if(${GME_FOUND}) + set(SRB2_HAVE_GME ON) + else() + message(WARNING "You have specified that GME is available but it was not found.") + endif() endif() if(${SRB2_CONFIG_HAVE_ZLIB}) @@ -318,11 +325,16 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB}) endif() if(${SRB2_CONFIG_HWRENDER}) + add_definitions(-DHWRENDER) +endif() + +if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL}) find_package(OpenGL) if(${OPENGL_FOUND}) add_definitions(-DHWRENDER) + add_definitions(-DSTATIC_OPENGL) else() - message(WARNING "You have specified HWRENDER but opengl was not found. Not setting HWRENDER.") + message(WARNING "You have specified static opengl but opengl was not found. Not setting HWRENDER.") endif() endif() diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index e445eb72a..9996922fd 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -3,7 +3,14 @@ set(SRB2_CONFIG_SDL2_USEMIXER ON CACHE BOOL "Use SDL2_mixer or regular sdl sound") if(${SRB2_CONFIG_SDL2_USEMIXER}) - set(SRB2_SDL2_SOUNDIMPL mixer_sound.c) + find_package(SDL2_MIXER) + if(${SDL2_MIXER_FOUND}) + set(SRB2_HAVE_MIXER ON) + set(SRB2_SDL2_SOUNDIMPL mixer_sound.c) + else() + message(WARNING "You specified that SDL2_mixer is available, but it was not found. Falling back to sdl sound.") + set(SRB2_SDL2_SOUNDIMPL sdl_sound.c) + endif() else() set(SRB2_SDL2_SOUNDIMPL sdl_sound.c) endif() @@ -55,7 +62,7 @@ if(${SDL2_FOUND}) ${SRB2_SDL2_HEADERS} ) - if(${SRB2_CONFIG_HWRENDER} AND ${OPENGL_FOUND}) + if(${SRB2_CONFIG_HWRENDER}) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${SRB2_HWRENDER_SOURCES} ${SRB2_HWRENDER_HEADERS} @@ -76,6 +83,7 @@ if(${SDL2_FOUND}) if(${CMAKE_SYSTEM} MATCHES Windows) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${CMAKE_SOURCE_DIR}/src/win32/win_dbg.c + ${CMAKE_SOURCE_DIR}/src/string.c ) endif() @@ -93,6 +101,7 @@ if(${SDL2_FOUND}) add_executable(${SRB2_SDL2_EXE_NAME} MACOSX_BUNDLE ${SRB2_SDL2_TOTAL_SOURCES}) add_framework(CoreFoundation ${SRB2_SDL2_EXE_NAME}) add_framework(SDL2 ${SRB2_SDL2_EXE_NAME}) + add_framework(SDL2_mixer ${SRB2_SDL2_EXE_NAME}) target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} @@ -103,6 +112,7 @@ if(${SDL2_FOUND}) target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE ${SDL2_LIBRARIES} + ${SDL2_MIXER_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENGL_LIBRARIES} @@ -121,12 +131,16 @@ if(${SDL2_FOUND}) target_include_directories(${SRB2_SDL2_EXE_NAME} PRIVATE ${SDL2_INCLUDE_DIRS} - ${SDL2_MAIN_INCLUDE_DIRS} + ${SDL2_MIXER_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} ) + if(${SRB2_HAVE_MIXER}) + target_compile_definitions(${SRB2_SDL2_EXE_NAME} PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER) + endif() + target_compile_definitions(${SRB2_SDL2_EXE_NAME} PRIVATE -DHAVE_SDL -DNDEBUG From 2f1367aab6c7ea2823a035498ac5d7602c06ac3f Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 02:09:03 -0600 Subject: [PATCH 013/609] cmake: Fixes to allow MSVC to compile running is another story --- CMakeLists.txt | 6 +++--- cmake/Modules/FindSDL2.cmake | 11 +++++++++++ src/CMakeLists.txt | 2 +- src/doomdef.h | 1 + src/f_wipe.c | 7 +++++-- src/sdl/CMakeLists.txt | 13 +++++++++++++ src/sdl/i_system.c | 2 +- src/sdl/sdlmain.h | 6 +++++- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc511c7e4..808cdca3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(SRB2 - VERSION 2.1.14) + VERSION 2.1.14 + LANGUAGES C) # Set up CMAKE path set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") @@ -41,9 +42,8 @@ else() set(SRB2_SYSTEM_BITS 32) endif() -# DO NOT ALLOW MSVC! if(MSVC) - message(FATAL_ERROR "MSVC is not supported!") + message(WARNING "!! MSVC BUILDS OF SRB2 CANNOT PLAY MULTIPLAYER !! You're more than welcome to try and fix this!") endif() # OS macros diff --git a/cmake/Modules/FindSDL2.cmake b/cmake/Modules/FindSDL2.cmake index faa556a88..7939b7d52 100644 --- a/cmake/Modules/FindSDL2.cmake +++ b/cmake/Modules/FindSDL2.cmake @@ -27,8 +27,19 @@ find_library(SDL2_LIBRARY "/usr/local/lib" ) +find_library(SDL2_MAIN_LIBRARY + NAMES SDL2_main + PATHS + ${SDL2_PKGCONF_LIBRARY_DIRS} + /usr/lib + /usr/local/lib +) + # set include dir variables set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR) set(SDL2_PROCESS_LIBS SDL2_LIBRARY) +set(SDL2_MAIN_PROCESS_INCLUDES SDL2_INCLUDE_DIR) +set(SDL2_MAIN_PROCESS_LIBS SDL2_MAIN_LIBRARY) libfind_process(SDL2) +libfind_process(SDL2_MAIN) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2772ba8a9..6915071e5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -354,7 +354,7 @@ endif() # Compatibility flag with later versions of GCC # We should really fix our code to not need this -if(NOT CLANG) +if(NOT CLANG AND NOT MSVC) add_compile_options(-mno-ms-bitfields) endif() diff --git a/src/doomdef.h b/src/doomdef.h index d14cd5ddb..4a6d6e576 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -146,6 +146,7 @@ extern FILE *logstream; #define VERSION 201 // Game version #define SUBVERSION 14 // more precise version number #define VERSIONSTRING "v2.1.14" +#define VERSIONSTRINGW L"v2.1.14" // Hey! If you change this, add 1 to the MODVERSION below! // Otherwise we can't force updates! #endif diff --git a/src/f_wipe.c b/src/f_wipe.c index 69e956216..69c980880 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -210,8 +210,8 @@ static void F_DoWipe(fademask_t *fademask) UINT32 draw_linestogo, draw_rowstogo; // rectangle coordinates, etc. - UINT16 scrxpos[fademask->width + 1]; - UINT16 scrypos[fademask->height + 1]; + UINT16* scrxpos = (UINT16*)malloc(fademask->width + 1); //[fademask->width + 1]; + UINT16* scrypos = (UINT16*)malloc(fademask->height + 1);// [fademask->height + 1]; UINT16 maskx, masky; UINT32 relativepos; @@ -263,6 +263,9 @@ static void F_DoWipe(fademask_t *fademask) if (++maskx >= fademask->width) ++masky, maskx = 0; } while (++mask < maskend); + + free(scrxpos); + free(scrypos); } } #endif diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 9996922fd..9c8b03132 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -129,6 +129,19 @@ if(${SDL2_FOUND}) ) endif() + if(MSVC) + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + ${SDL2_MAIN_LIBRARIES} + ) + target_compile_options(${SRB2_SDL2_EXE_NAME} PRIVATE + /Umain + /D_CRT_SECURE_NO_WARNINGS # something about string functions. + /D_CRT_NONSTDC_NO_DEPRECATE + /DSDLMAIN + /D_WINSOCK_DEPRECATED_NO_WARNINGS # Don't care + ) + endif() + target_include_directories(${SRB2_SDL2_EXE_NAME} PRIVATE ${SDL2_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS} diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 8675301e8..19b6262b3 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1661,7 +1661,7 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) return; if(mumble->uiVersion != 2) { - wcsncpy(mumble->name, L"SRB2 "VERSIONSTRING, 256); + wcsncpy(mumble->name, L"SRB2 "VERSIONSTRINGW, 256); wcsncpy(mumble->description, L"Sonic Robo Blast 2 with integrated Mumble Link support.", 2048); mumble->uiVersion = 2; } diff --git a/src/sdl/sdlmain.h b/src/sdl/sdlmain.h index af4e48f75..7ac32f4b3 100644 --- a/src/sdl/sdlmain.h +++ b/src/sdl/sdlmain.h @@ -25,7 +25,11 @@ extern SDL_bool framebuffer; #include "../m_fixed.h" // SDL2 stub macro -#define SDL2STUB(name) CONS_Printf("SDL2: stubbed: %s:%d\n", __func__, __LINE__) +#ifdef _MSC_VER +#define SDL2STUB() CONS_Printf("SDL2: stubbed: %s:%d\n", __FUNCTION__, __LINE__) +#else +#define SDL2STUB() CONS_Printf("SDL2: stubbed: %s:%d\n", __func__, __LINE__) +#endif /** \brief The JoyInfo_s struct From 20d6a7e675b16818acf3f8a15398c6517eef3272 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 02:12:14 -0600 Subject: [PATCH 014/609] cmake: exe icon on windows --- src/sdl/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 9c8b03132..1b8ad5f5d 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -83,6 +83,7 @@ if(${SDL2_FOUND}) if(${CMAKE_SYSTEM} MATCHES Windows) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${CMAKE_SOURCE_DIR}/src/win32/win_dbg.c + ${CMAKE_SOURCE_DIR}/src/win32/Srb2win.rc ${CMAKE_SOURCE_DIR}/src/string.c ) endif() From 1c9de50ad28b958a1d2009562f166eb748212577 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 15:33:29 -0600 Subject: [PATCH 015/609] cmake: Search SDL2_main separately for MSVC --- cmake/Modules/FindSDL2_main.cmake | 34 +++++++++++++++++++++++++++++++ src/sdl/CMakeLists.txt | 1 + 2 files changed, 35 insertions(+) create mode 100644 cmake/Modules/FindSDL2_main.cmake diff --git a/cmake/Modules/FindSDL2_main.cmake b/cmake/Modules/FindSDL2_main.cmake new file mode 100644 index 000000000..da9e7770f --- /dev/null +++ b/cmake/Modules/FindSDL2_main.cmake @@ -0,0 +1,34 @@ +# Find SDL2 +# Once done, this will define +# +# SDL2_MAIN_FOUND - system has SDL2 +# SDL2_MAIN_INCLUDE_DIRS - SDL2 include directories +# SDL2_MAIN_LIBRARIES - link libraries + +include(LibFindMacros) + +libfind_pkg_check_modules(SDL2_MAIN_PKGCONF SDL2) + +# includes +find_path(SDL2_MAIN_INCLUDE_DIR + NAMES SDL_main.h + PATHS + ${SDL2_MAIN_PKGCONF_INCLUDE_DIRS} + "/usr/include/SDL2" + "/usr/local/include/SDL2" +) + +# library +find_library(SDL2_MAIN_LIBRARY + NAMES SDL2_main + PATHS + ${SDL2_MAIN_PKGCONF_LIBRARY_DIRS} + "/usr/lib" + "/usr/local/lib" +) + + +# set include dir variables +set(SDL2_MAIN_PROCESS_INCLUDES SDL2_MAIN_INCLUDE_DIR) +set(SDL2_MAIN_PROCESS_LIBS SDL2_MAIN_LIBRARY) +libfind_process(SDL2_MAIN) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 1b8ad5f5d..b6b120568 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -131,6 +131,7 @@ if(${SDL2_FOUND}) endif() if(MSVC) + find_package(SDL2_MAIN REQUIRED) target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE ${SDL2_MAIN_LIBRARIES} ) From 53799eb390dc3748efac2b1976f0d2c36951acae Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 16:42:05 -0600 Subject: [PATCH 016/609] cmake: Add CPack Package Generation Generates zips only at the moment --- CMakeLists.txt | 25 +++++++++++++++++++++-- assets/CMakeLists.txt | 29 +++++++++++++++++++++++++++ src/sdl/CMakeLists.txt | 43 +++++++++++++++++++++++++++++++--------- src/win32/CMakeLists.txt | 2 -- 4 files changed, 86 insertions(+), 13 deletions(-) create mode 100644 assets/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 808cdca3e..7672655fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,27 @@ if(${CMAKE_SYSTEM} MATCHES "Darwin") endif() endif() -# TODO support MacOSX builds +# Set EXE names so the assets CMakeLists can refer to its target +set(SRB2_SDL2_EXE_NAME srb2) +set(SRB2_WIN_EXE_NAME srb2dd) -add_subdirectory(src/) +add_subdirectory(src) +add_subdirectory(assets) + + + +##### PACKAGE CONFIGURATION ##### + +if(${CMAKE_SYSTEM} MATCHES "Windows") + set(CPACK_GENERATOR "ZIP") +endif() + +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2") +set(CPACK_PACKAGE_VENDOR "Sonic Team Jr.") +#set(CPACK_PACKAGE_DESCRIPTION_FILE ) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH}) +set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}") +include(CPack) diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt new file mode 100644 index 000000000..cbcb6ba1c --- /dev/null +++ b/assets/CMakeLists.txt @@ -0,0 +1,29 @@ +## Assets Target Configuration ## + +# MD5 generation +set(SRB2_ASSET_ALL + ${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb + ${CMAKE_CURRENT_SOURCE_DIR}/player.dta + ${CMAKE_CURRENT_SOURCE_DIR}/rings.dta + ${CMAKE_CURRENT_SOURCE_DIR}/zones.dta + ${CMAKE_CURRENT_SOURCE_DIR}/patch.dta + ${CMAKE_CURRENT_SOURCE_DIR}/music.dta +) + +set(SRB2_ASSET_HASHED + ${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb + ${CMAKE_CURRENT_SOURCE_DIR}/player.dta + ${CMAKE_CURRENT_SOURCE_DIR}/rings.dta + ${CMAKE_CURRENT_SOURCE_DIR}/zones.dta + ${CMAKE_CURRENT_SOURCE_DIR}/patch.dta +) + +foreach(SRB2_ASSET ${SRB2_ASSET_HASHED}) + file(MD5 ${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH") +endforeach() + +# Installation + +install(FILES ${SRB2_ASSET_ALL} + DESTINATION . +) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index b6b120568..7d540b6c3 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -42,15 +42,6 @@ set(SRB2_SDL2_HEADERS prepend_sources(SRB2_SDL2_SOURCES) prepend_sources(SRB2_SDL2_HEADERS) -# Binary name -set(SRB2_SDL2_EXE_NAME srb2sdl2) -if(${CMAKE_SYSTEM} MATCHES "Windows") - set(SRB2_SDL2_EXE_NAME srb2win) -endif() -if(CLANG) - set(SRB2_SDL2_EXE_NAME SRB2) -endif() - # Dependency find_package(SDL2) @@ -160,6 +151,40 @@ if(${SDL2_FOUND}) -DHAVE_SDL -DNDEBUG ) + + #### Installation #### + install(TARGETS ${SRB2_SDL2_EXE_NAME} ${SRB2_SDL2_EXE_NAME} + RUNTIME DESTINATION . + ) + + if(${CMAKE_SYSTEM} MATCHES Windows) + find_library(SRB2_SDL2_DLL_SDL2 "SDL2.dll") + if(${SRB2_CONFIG_SDL2_USEMIXER}) + find_library(SRB2_SDL2_DLL_SDL2_mixer "SDL2_mixer.dll") + find_library(SRB2_SDL2_DLL_libmikmod-2 "libmikmod-2.dll") + find_library(SRB2_SDL2_DLL_libogg_0 "libogg-0.dll") + find_library(SRB2_SDL2_DLL_libvorbis_0 "libvorbis-0.dll") + find_library(SRB2_SDL2_DLL_libvorbisfile_3 "libvorbisfile-3.dll") + find_library(SRB2_SDL2_DLL_smpeg2 "smpeg2.dll") + endif() + if(${SRB2_CONFIG_HAVE_GME}) + find_library(SRB2_SDL2_DLL_libgme "libgme.dll") + endif() + + install(PROGRAMS + ${SRB2_SDL2_DLL_SDL2} + + ${SRB2_SDL2_DLL_SDL2_mixer} + ${SRB2_SDL2_DLL_libmikmod} + ${SRB2_SDL2_DLL_libogg_0} + ${SRB2_SDL2_DLL_libvorbis_0} + ${SRB2_SDL2_DLL_libvorbisfile_3} + ${SRB2_SDL2_DLL_smpeg2} + + ${SRB2_SDL2_DLL_libgme} + DESTINATION . + ) + endif() else() message(WARNING "SDL2 wasn't found, so ${SRB2_SDL2_EXE_NAME} won't be available") endif() diff --git a/src/win32/CMakeLists.txt b/src/win32/CMakeLists.txt index 4800852c9..94c198299 100644 --- a/src/win32/CMakeLists.txt +++ b/src/win32/CMakeLists.txt @@ -1,5 +1,3 @@ -set(SRB2_WIN_EXE_NAME srb2dd) - add_executable(${SRB2_WIN_EXE_NAME} EXCLUDE_FROM_ALL ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS} From 0909fce2e39d331cacb44c805f5c9d829f41dcc1 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 18:03:41 -0600 Subject: [PATCH 017/609] cmake: Configure source via cmake silently fixing a bad malloc here too shhhhhhhhh --- CMakeLists.txt | 9 +++++++++ assets/CMakeLists.txt | 13 +++++++------ cmake/Modules/GitUtilities.cmake | 22 ++++++++++++++++++++++ src/CMakeLists.txt | 4 ++++ src/comptime.c | 8 +++++++- src/config.h.in | 25 +++++++++++++++++++++++++ src/d_main.c | 14 ++++++++++---- src/f_wipe.c | 4 ++-- 8 files changed, 86 insertions(+), 13 deletions(-) create mode 100644 cmake/Modules/GitUtilities.cmake create mode 100644 src/config.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 7672655fe..2ba9611b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,10 +69,19 @@ endif() set(SRB2_SDL2_EXE_NAME srb2) set(SRB2_WIN_EXE_NAME srb2dd) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/src) + add_subdirectory(src) add_subdirectory(assets) +## config.h generation +set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary") +include(GitUtilities) +git_describe(SRB2_COMP_REVISION "${CMAKE_CURRENT_SOURCE_DIR}") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) + + ##### PACKAGE CONFIGURATION ##### diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt index cbcb6ba1c..8d149bf3f 100644 --- a/assets/CMakeLists.txt +++ b/assets/CMakeLists.txt @@ -11,15 +11,16 @@ set(SRB2_ASSET_ALL ) set(SRB2_ASSET_HASHED - ${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb - ${CMAKE_CURRENT_SOURCE_DIR}/player.dta - ${CMAKE_CURRENT_SOURCE_DIR}/rings.dta - ${CMAKE_CURRENT_SOURCE_DIR}/zones.dta - ${CMAKE_CURRENT_SOURCE_DIR}/patch.dta + srb2.srb + player.dta + rings.dta + zones.dta + patch.dta ) foreach(SRB2_ASSET ${SRB2_ASSET_HASHED}) - file(MD5 ${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH") + file(MD5 ${CMAKE_CURRENT_SOURCE_DIR}/${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH") + set(SRB2_ASSET_${SRB2_ASSET}_HASH ${SRB2_ASSET_${SRB2_ASSET}_HASH} PARENT_SCOPE) endforeach() # Installation diff --git a/cmake/Modules/GitUtilities.cmake b/cmake/Modules/GitUtilities.cmake new file mode 100644 index 000000000..de4015b0d --- /dev/null +++ b/cmake/Modules/GitUtilities.cmake @@ -0,0 +1,22 @@ +# Git utilities + +if(__GitUtilities) + return() +endif() + +set(__GitUtilities ON) + +function(git_describe variable path) + execute_process(COMMAND "${GIT_EXECUTABLE}" "describe" + WORKING_DIRECTORY "${path}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + #if(NOT result EQUAL 0) + # set(${variable} "GITERROR-${result}-NOTFOUND" CACHE STRING "revision" FORCE) + #endif() + + set(${variable} "${output}" PARENT_SCOPE) +endfunction() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6915071e5..b3e01ccef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,6 +160,8 @@ set(SRB2_CORE_HEADERS prepend_sources(SRB2_CORE_SOURCES) prepend_sources(SRB2_CORE_HEADERS) +set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/config.h) + set(SRB2_HWRENDER_SOURCES hardware/hw_bsp.c hardware/hw_cache.c @@ -358,4 +360,6 @@ if(NOT CLANG AND NOT MSVC) add_compile_options(-mno-ms-bitfields) endif() +add_definitions(-DCMAKECONFIG) + add_subdirectory(sdl) diff --git a/src/comptime.c b/src/comptime.c index cd6bfd9bb..a4dc5b0f9 100644 --- a/src/comptime.c +++ b/src/comptime.c @@ -7,10 +7,16 @@ * */ -#ifdef COMPVERSION +#if (defined(CMAKECONFIG)) +#include "config.h" +const char *comprevision = SRB2_COMP_REVISION; + +#elif (defined(COMPVERSION)) #include "comptime.h" + #else const char *comprevision = "illegal"; + #endif const char *compdate = __DATE__; diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 000000000..9c98d36e7 --- /dev/null +++ b/src/config.h.in @@ -0,0 +1,25 @@ +/** SRB2 CMake Configuration */ + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +#ifdef CMAKECONFIG + +#define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}" +#define ASSET_HASH_PLAYER_DTA "${SRB2_ASSET_player.dta_HASH}" +#define ASSET_HASH_RINGS_DTA "${SRB2_ASSET_rings.dta_HASH}" +#define ASSET_HASH_ZONES_DTA "${SRB2_ASSET_zones.dta_HASH}" +#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}" + +#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" + +#else + +#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7" +#define ASSET_HASH_ZONES_DTA "303838c6c534d9540288360fa49cca60" +#define ASSET_HASH_PLAYER_DTA "cfca0f1c73023cbbd8f844f45480f799" +#define ASSET_HASH_RINGS_DTA "85901ad4bf94637e5753d2ac2c03ea26" + +#define +#endif +#endif diff --git a/src/d_main.c b/src/d_main.c index 95808b274..a959a8632 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -74,6 +74,12 @@ int snprintf(char *str, size_t n, const char *fmt, ...); #include "m_cond.h" // condition initialization #include "fastcmp.h" +#ifdef CMAKECONFIG +#include "config.h" +#else +#include "config.h.in" +#endif + #ifdef _XBOX #include "sdl/SRB2XBOX/xboxhelp.h" #endif @@ -1115,10 +1121,10 @@ void D_SRB2Main(void) #if 1 // md5s last updated 12/14/14 // Check MD5s of autoloaded files - W_VerifyFileMD5(0, "c1b9577687f8a795104aef4600720ea7"); // srb2.srb/srb2.wad - W_VerifyFileMD5(1, "303838c6c534d9540288360fa49cca60"); // zones.dta - W_VerifyFileMD5(2, "cfca0f1c73023cbbd8f844f45480f799"); // player.dta - W_VerifyFileMD5(3, "85901ad4bf94637e5753d2ac2c03ea26"); // rings.dta + W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad + W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta + W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta + W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.dta //W_VerifyFileMD5(4, "0c66790502e648bfce90fdc5bb15722e"); // patch.dta // don't check music.dta because people like to modify it, and it doesn't matter if they do // ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for. diff --git a/src/f_wipe.c b/src/f_wipe.c index 69c980880..8e7c622c4 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -210,8 +210,8 @@ static void F_DoWipe(fademask_t *fademask) UINT32 draw_linestogo, draw_rowstogo; // rectangle coordinates, etc. - UINT16* scrxpos = (UINT16*)malloc(fademask->width + 1); //[fademask->width + 1]; - UINT16* scrypos = (UINT16*)malloc(fademask->height + 1);// [fademask->height + 1]; + UINT16* scrxpos = (UINT16*)malloc((fademask->width + 1) * sizeof(UINT16)); + UINT16* scrypos = (UINT16*)malloc((fademask->height + 1) * sizeof(UINT16)); UINT16 maskx, masky; UINT32 relativepos; From 68f8a5b0f94fa9593f7e794767581281b219d45c Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 19:29:16 -0600 Subject: [PATCH 018/609] cmake: build bundle and dmg on install/package --- CMakeLists.txt | 16 ++++++++++++++++ assets/CMakeLists.txt | 13 ++++++++++--- src/sdl/CMakeLists.txt | 15 ++++++++++++--- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ba9611b2..fafcde394 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,12 +82,28 @@ git_describe(SRB2_COMP_REVISION "${CMAKE_CURRENT_SOURCE_DIR}") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) +# Mac bundle fixup +if(CLANG) + install(CODE " + include(BundleUtilities) + fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\" + \"\" + /Library/Frameworks + )" + ) +endif() ##### PACKAGE CONFIGURATION ##### if(${CMAKE_SYSTEM} MATCHES "Windows") set(CPACK_GENERATOR "ZIP") endif() +if(${CMAKE_SYSTEM} MATCHES "Linux") + set(CPACK_GENERATOR "TGZ") +endif() +if(${CMAKE_SYSTEM} MATCHES "Darwin") + set(CPACK_GENERATOR "DragNDrop") +endif() set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2") set(CPACK_PACKAGE_VENDOR "Sonic Team Jr.") diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt index 8d149bf3f..3ce133c6a 100644 --- a/assets/CMakeLists.txt +++ b/assets/CMakeLists.txt @@ -25,6 +25,13 @@ endforeach() # Installation -install(FILES ${SRB2_ASSET_ALL} - DESTINATION . -) +if(CLANG) + get_target_property(outname ${SRB2_SDL2_EXE_NAME} OUTPUT_NAME) + install(FILES ${SRB2_ASSET_ALL} + DESTINATION "${outname}.app/Contents/Resources" + ) +else() + install(FILES ${SRB2_ASSET_ALL} + DESTINATION . + ) +endif() diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 7d540b6c3..52a47dad5 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -99,6 +99,7 @@ if(${SDL2_FOUND}) ${ZLIB_LIBRARIES} ${OPENGL_LIBRARIES} ) + set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES OUTPUT_NAME "Sonic Robo Blast 2") else() add_executable(${SRB2_SDL2_EXE_NAME} WIN32 ${SRB2_SDL2_TOTAL_SOURCES}) @@ -112,6 +113,8 @@ if(${SDL2_FOUND}) endif() + set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES VERSION ${SRB2_VERSION}) + if(${CMAKE_SYSTEM} MATCHES Windows) target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE ws2_32 @@ -153,9 +156,15 @@ if(${SDL2_FOUND}) ) #### Installation #### - install(TARGETS ${SRB2_SDL2_EXE_NAME} ${SRB2_SDL2_EXE_NAME} - RUNTIME DESTINATION . - ) + if (CLANG) + install(TARGETS ${SRB2_SDL2_EXE_NAME} + BUNDLE DESTINATION . + ) + else() + install(TARGETS ${SRB2_SDL2_EXE_NAME} ${SRB2_SDL2_EXE_NAME} + RUNTIME DESTINATION . + ) + endif() if(${CMAKE_SYSTEM} MATCHES Windows) find_library(SRB2_SDL2_DLL_SDL2 "SDL2.dll") From 57037e412400ae960cf14449c99804f052f076a9 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 20:15:24 +0000 Subject: [PATCH 019/609] cmake: fixes to enable linux compilation string.c, capitalization, find fixes --- cmake/Modules/FindSDL2.cmake | 11 ----------- cmake/Modules/FindSDL2_main.cmake | 2 +- src/sdl/CMakeLists.txt | 8 +++++++- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/cmake/Modules/FindSDL2.cmake b/cmake/Modules/FindSDL2.cmake index 7939b7d52..faa556a88 100644 --- a/cmake/Modules/FindSDL2.cmake +++ b/cmake/Modules/FindSDL2.cmake @@ -27,19 +27,8 @@ find_library(SDL2_LIBRARY "/usr/local/lib" ) -find_library(SDL2_MAIN_LIBRARY - NAMES SDL2_main - PATHS - ${SDL2_PKGCONF_LIBRARY_DIRS} - /usr/lib - /usr/local/lib -) - # set include dir variables set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR) set(SDL2_PROCESS_LIBS SDL2_LIBRARY) -set(SDL2_MAIN_PROCESS_INCLUDES SDL2_INCLUDE_DIR) -set(SDL2_MAIN_PROCESS_LIBS SDL2_MAIN_LIBRARY) libfind_process(SDL2) -libfind_process(SDL2_MAIN) diff --git a/cmake/Modules/FindSDL2_main.cmake b/cmake/Modules/FindSDL2_main.cmake index da9e7770f..280e51e2e 100644 --- a/cmake/Modules/FindSDL2_main.cmake +++ b/cmake/Modules/FindSDL2_main.cmake @@ -11,7 +11,7 @@ libfind_pkg_check_modules(SDL2_MAIN_PKGCONF SDL2) # includes find_path(SDL2_MAIN_INCLUDE_DIR - NAMES SDL_main.h + NAMES SDL.h PATHS ${SDL2_MAIN_PKGCONF_INCLUDE_DIRS} "/usr/include/SDL2" diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 52a47dad5..446f7fdc8 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -3,7 +3,7 @@ set(SRB2_CONFIG_SDL2_USEMIXER ON CACHE BOOL "Use SDL2_mixer or regular sdl sound") if(${SRB2_CONFIG_SDL2_USEMIXER}) - find_package(SDL2_MIXER) + find_package(SDL2_mixer) if(${SDL2_MIXER_FOUND}) set(SRB2_HAVE_MIXER ON) set(SRB2_SDL2_SOUNDIMPL mixer_sound.c) @@ -75,6 +75,10 @@ if(${SDL2_FOUND}) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${CMAKE_SOURCE_DIR}/src/win32/win_dbg.c ${CMAKE_SOURCE_DIR}/src/win32/Srb2win.rc + ) + endif() + if(NOT CLANG) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${CMAKE_SOURCE_DIR}/src/string.c ) endif() @@ -109,6 +113,8 @@ if(${SDL2_FOUND}) ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENGL_LIBRARIES} + m #need math lol + rt # this too ) endif() From e54338ef01902bc68bbd704276d7dc2a6dbb01e0 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 23:20:21 -0600 Subject: [PATCH 020/609] cmake: fix Windows linking --- src/sdl/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 446f7fdc8..1228fd2c5 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -113,10 +113,15 @@ if(${SDL2_FOUND}) ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENGL_LIBRARIES} - m #need math lol - rt # this too ) + if(${CMAKE_SYSTEM} MATCHES Linux) + target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + m + rt + ) + endif() + endif() set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES VERSION ${SRB2_VERSION}) From 70f046a32088f9e8930de1b8e117df4e203f8e86 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 28 Jan 2015 23:02:18 -0600 Subject: [PATCH 021/609] cmake: on mac, check Resources in bundle first. on non debug, check assets folder in src as well --- CMakeLists.txt | 12 ------------ src/config.h.in | 2 ++ src/sdl/CMakeLists.txt | 14 ++++++++++++++ src/sdl/i_system.c | 28 ++++++++++++++++++++++++++++ src/sdl/macosx/mac_resources.c | 31 +++++++++++++++++++++++++++++++ src/sdl/macosx/mac_resources.h | 5 +++++ 6 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 src/sdl/macosx/mac_resources.c create mode 100644 src/sdl/macosx/mac_resources.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fafcde394..6902829fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,18 +81,6 @@ include(GitUtilities) git_describe(SRB2_COMP_REVISION "${CMAKE_CURRENT_SOURCE_DIR}") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) - -# Mac bundle fixup -if(CLANG) - install(CODE " - include(BundleUtilities) - fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\" - \"\" - /Library/Frameworks - )" - ) -endif() - ##### PACKAGE CONFIGURATION ##### if(${CMAKE_SYSTEM} MATCHES "Windows") diff --git a/src/config.h.in b/src/config.h.in index 9c98d36e7..6e7c64da3 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -13,6 +13,8 @@ #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" +#define CMAKE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/assets" + #else #define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7" diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 1228fd2c5..567a1ba97 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -89,6 +89,8 @@ if(${SDL2_FOUND}) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} macosx/mac_alert.c macosx/mac_alert.h + macosx/mac_resources.c + macosx/mac_resources.h macosx/Srb2mac.icns ) endif() @@ -205,6 +207,18 @@ if(${SDL2_FOUND}) DESTINATION . ) endif() + + + # Mac bundle fixup + if(CLANG) + install(CODE " + include(BundleUtilities) + fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\" + \"\" + /Library/Frameworks + )" + ) + endif() else() message(WARNING "SDL2 wasn't found, so ${SRB2_SDL2_EXE_NAME} won't be available") endif() diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 19b6262b3..08cccfc6d 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -20,6 +20,8 @@ /// \file /// \brief SRB2 system stuff for SDL +#include "config.h" + #ifndef _WIN32_WCE #include #endif @@ -145,6 +147,10 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #define O_BINARY 0 #endif +#ifdef __APPLE__ +#include "macosx/mac_resources.h" +#endif + // Locations for searching the srb2.srb #ifdef _arch_dreamcast #define DEFAULTWADLOCATION1 "/cd" @@ -2758,6 +2764,28 @@ static const char *locateWad(void) if (isWadPathOk(returnWadPath)) return NULL; #endif + + +#ifdef CMAKECONFIG +#ifndef NDEBUG + I_OutputMsg(","CMAKE_ASSETS_DIR); + strcpy(returnWadPath, CMAKE_ASSETS_DIR); + if (isWadPathOk(returnWadPath)) + { + return returnWadPath; + } +#endif +#endif + +#ifdef __APPLE__ + OSX_GetResourcesPath(returnWadPath); + I_OutputMsg(",%s", returnWadPath); + if (isWadPathOk(returnWadPath)) + { + return returnWadPath; + } + +#endif // examine default dirs #ifdef DEFAULTWADLOCATION1 diff --git a/src/sdl/macosx/mac_resources.c b/src/sdl/macosx/mac_resources.c new file mode 100644 index 000000000..dacc8014b --- /dev/null +++ b/src/sdl/macosx/mac_resources.c @@ -0,0 +1,31 @@ +#include "mac_resources.h" +#include + +#include + +void OSX_GetResourcesPath(char * buffer) +{ + CFBundleRef mainBundle; + mainBundle = CFBundleGetMainBundle(); + if (mainBundle) + { + CFURLRef appUrlRef = CFBundleCopyBundleURL(mainBundle); + CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle); + CFStringRef resources = CFStringCreateWithCString(kCFAllocatorMalloc, "/Contents/Resources", kCFStringEncodingASCII); + const void* rawarray[2] = {macPath, resources}; + CFArrayRef array = CFArrayCreate(kCFAllocatorMalloc, rawarray, 2, NULL); + CFStringRef separator = CFStringCreateWithCString(kCFAllocatorMalloc, "", kCFStringEncodingASCII); + CFStringRef fullPath = CFStringCreateByCombiningStrings(kCFAllocatorMalloc, array, separator); + const char * path = CFStringGetCStringPtr(fullPath, kCFStringEncodingASCII); + strcpy(buffer, path); + CFRelease(fullPath); + path = NULL; + CFRelease(array); + CFRelease(resources); + CFRelease(macPath); + CFRelease(appUrlRef); + //CFRelease(mainBundle); + CFRelease(separator); + } + +} \ No newline at end of file diff --git a/src/sdl/macosx/mac_resources.h b/src/sdl/macosx/mac_resources.h new file mode 100644 index 000000000..727ac9f6b --- /dev/null +++ b/src/sdl/macosx/mac_resources.h @@ -0,0 +1,5 @@ +#ifndef __MAC_RESOURCES_H__ +#define __MAC_RESOURCES_H__ + +void OSX_GetResourcesPath(char * buffer); +#endif \ No newline at end of file From 4d3a7dd8fb57347efa50ebef7b6a4f998231ac1a Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 29 Jan 2015 00:17:47 -0600 Subject: [PATCH 022/609] cmake: fix NDEBUG on Debug wow i'm stupid --- src/sdl/CMakeLists.txt | 1 - src/sdl/i_system.c | 9 --------- 2 files changed, 10 deletions(-) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 567a1ba97..77b6d1075 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -165,7 +165,6 @@ if(${SDL2_FOUND}) target_compile_definitions(${SRB2_SDL2_EXE_NAME} PRIVATE -DHAVE_SDL - -DNDEBUG ) #### Installation #### diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 08cccfc6d..567611ec5 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -667,17 +667,9 @@ static void I_StartupConsole(void) { HANDLE ci, co; const INT32 ded = M_CheckParm("-dedicated"); -#ifdef SDLMAIN BOOL gotConsole = FALSE; if (M_CheckParm("-console") || ded) gotConsole = AllocConsole(); -#else - BOOL gotConsole = TRUE; - if (M_CheckParm("-detachconsole")) - { - FreeConsole(); - gotConsole = AllocConsole(); - } #ifdef _DEBUG else if (M_CheckParm("-noconsole") && !ded) #else @@ -687,7 +679,6 @@ static void I_StartupConsole(void) FreeConsole(); gotConsole = FALSE; } -#endif if (gotConsole) { From ec79756c425b101ee21fa94d2bee67d603de8aba Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sat, 31 Jan 2015 22:40:36 -0600 Subject: [PATCH 023/609] cmake: copy DLLs to build directory in MSVC this is done as a POST_BUILD step --- CMakeLists.txt | 16 ++++++++++++++++ src/sdl/CMakeLists.txt | 36 ++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6902829fa..844555c12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,22 @@ macro(add_framework fwname appname) endif() endmacro() +# Macro to copy Windows DLLs to Debug/Release folder for easy debugging +# Note: this is general purpose, we could copy anything. Just using for DLLs on MSVC though +macro(copy_files_to_build_dir target dlllist_var) + if(MSVC) + # http://stackoverflow.com/a/26983405/3064195 + foreach(dlllist_item ${${dlllist_var}}) + get_filename_component(dllname ${dlllist_item} NAME) + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${dlllist_item} + ${CMAKE_CURRENT_BINARY_DIR}/\$\(Configuration\)/${dllname} + ) + endforeach() + endif() +endmacro() + # 64-bit check if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) message(STATUS "Target is 64-bit") diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 77b6d1075..383e50258 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -179,32 +179,32 @@ if(${SDL2_FOUND}) endif() if(${CMAKE_SYSTEM} MATCHES Windows) - find_library(SRB2_SDL2_DLL_SDL2 "SDL2.dll") + set(win_extra_dll_list "") + macro(getwinlib dllname defaultname) + find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}") + list(APPEND win_extra_dll_list ${SRB2_SDL2_DLL_${dllname}}) + endmacro() + getwinlib(SDL2 "SDL2.dll") if(${SRB2_CONFIG_SDL2_USEMIXER}) - find_library(SRB2_SDL2_DLL_SDL2_mixer "SDL2_mixer.dll") - find_library(SRB2_SDL2_DLL_libmikmod-2 "libmikmod-2.dll") - find_library(SRB2_SDL2_DLL_libogg_0 "libogg-0.dll") - find_library(SRB2_SDL2_DLL_libvorbis_0 "libvorbis-0.dll") - find_library(SRB2_SDL2_DLL_libvorbisfile_3 "libvorbisfile-3.dll") - find_library(SRB2_SDL2_DLL_smpeg2 "smpeg2.dll") + getwinlib(SDL2_mixer "SDL2_mixer.dll") + getwinlib(libmikmod-2 "libmikmod-2.dll") + getwinlib(libogg_0 "libogg-0.dll") + getwinlib(libvorbis_0 "libvorbis-0.dll") + getwinlib(libvorbisfile_3 "libvorbisfile-3.dll") + getwinlib(smpeg2 "smpeg2.dll") endif() if(${SRB2_CONFIG_HAVE_GME}) - find_library(SRB2_SDL2_DLL_libgme "libgme.dll") + getwinlib(libgme "libgme.dll") endif() install(PROGRAMS - ${SRB2_SDL2_DLL_SDL2} - - ${SRB2_SDL2_DLL_SDL2_mixer} - ${SRB2_SDL2_DLL_libmikmod} - ${SRB2_SDL2_DLL_libogg_0} - ${SRB2_SDL2_DLL_libvorbis_0} - ${SRB2_SDL2_DLL_libvorbisfile_3} - ${SRB2_SDL2_DLL_smpeg2} - - ${SRB2_SDL2_DLL_libgme} + ${win_extra_dll_list} DESTINATION . ) + + # We also want to copy those DLLs to build directories on MSVC. + # So we'll add a post_build step. + copy_files_to_build_dir(${SRB2_SDL2_EXE_NAME} win_extra_dll_list) endif() From 8d3b948e1b19b9a62734e0afb8bef3c83e69b569 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 1 Feb 2015 19:02:08 -0600 Subject: [PATCH 024/609] cmake: Fix compilation for MSVC 2015 snprintf is now available in MSVC 2015! --- src/doomtype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doomtype.h b/src/doomtype.h index 6bc563527..ff4199775 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -100,9 +100,9 @@ typedef long ssize_t; #if defined (_MSC_VER) || defined (__OS2__) // Microsoft VisualC++ -#ifdef _MSC_VER +#if (_MSC_VER <= 1800) // MSVC 2013 and back #define snprintf _snprintf -#if (_MSC_VER <= 1200) +#if (_MSC_VER <= 1200) // MSVC 2012 and back #define vsnprintf _vsnprintf #endif #endif From 194ce626e1b29717ef2746448b9bc43a9bf2b85f Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 1 Feb 2015 19:18:25 -0600 Subject: [PATCH 025/609] cmake: Add nasm support Enables ASM-NASM and adds tmap*.nas to sdl target. No idea if this actually works. --- src/CMakeLists.txt | 10 +++++++++- src/sdl/CMakeLists.txt | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3e01ccef..b1e8e6f57 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -198,6 +198,13 @@ set(SRB2_R_OPENGL_HEADERS prepend_sources(SRB2_R_OPENGL_SOURCES) prepend_sources(SRB2_R_OPENGL_HEADERS) +set(SRB2_NASM_SOURCES + tamp_mmx.nas + tmap.nas +) + +prepend_sources(SRB2_NASM_SOURCES) + ### Configuration set(SRB2_CONFIG_HAVE_BLUA ON CACHE BOOL "Enable Lua interpreter support") @@ -210,7 +217,7 @@ set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL set(SRB2_CONFIG_HWRENDER ON CACHE BOOL "Enable hardware rendering through OpenGL") set(SRB2_CONFIG_USEASM OFF CACHE BOOL - "Enable nasm-implemented blit functions for moderate speedup") + "Enable NASM tmap implementation for software mode speedup.") set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL "Use statically linked OpenGL. NOT RECOMMENDED.") @@ -341,6 +348,7 @@ if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL}) endif() if(${SRB2_CONFIG_USEASM}) + enable_language(ASM-NASM) set(SRB2_USEASM ON) add_definitions(-DUSEASM) else() diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 383e50258..7df73acff 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -71,6 +71,12 @@ if(${SDL2_FOUND}) ) endif() + if(${SRB2_USEASM}) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + ${SRB2_NASM_SOURCES} + ) + endif() + if(${CMAKE_SYSTEM} MATCHES Windows) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${CMAKE_SOURCE_DIR}/src/win32/win_dbg.c From d7015d14929337b003d33d5fff2a2a840b5e4f16 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 1 Feb 2015 21:25:02 -0600 Subject: [PATCH 026/609] cmake: Fix nasm/add yasm support Tested to work on MSVC, mingw-gcc --- cmake/Modules/CMakeASM_YASMInformation.cmake | 46 +++++++++++++++++++ .../CMakeDetermineASM_YASMCompiler.cmake | 27 +++++++++++ cmake/Modules/CMakeTestASM_YASMCompiler.cmake | 23 ++++++++++ src/CMakeLists.txt | 33 +++++++++++-- src/sdl/CMakeLists.txt | 35 ++++++++++++++ 5 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 cmake/Modules/CMakeASM_YASMInformation.cmake create mode 100644 cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake create mode 100644 cmake/Modules/CMakeTestASM_YASMCompiler.cmake diff --git a/cmake/Modules/CMakeASM_YASMInformation.cmake b/cmake/Modules/CMakeASM_YASMInformation.cmake new file mode 100644 index 000000000..176518085 --- /dev/null +++ b/cmake/Modules/CMakeASM_YASMInformation.cmake @@ -0,0 +1,46 @@ + +#============================================================================= +# Copyright 2010 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# support for the yasm assembler + +set(CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS nasm yasm asm) + +if(NOT CMAKE_ASM_YASM_OBJECT_FORMAT) + if(WIN32) + if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) + set(CMAKE_ASM_YASM_OBJECT_FORMAT win64) + else() + set(CMAKE_ASM_YASM_OBJECT_FORMAT win32) + endif() + elseif(APPLE) + if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) + set(CMAKE_ASM_YASM_OBJECT_FORMAT macho64) + else() + set(CMAKE_ASM_YASM_OBJECT_FORMAT macho) + endif() + else() + if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) + set(CMAKE_ASM_YASM_OBJECT_FORMAT elf64) + else() + set(CMAKE_ASM_YASM_OBJECT_FORMAT elf) + endif() + endif() +endif() + +set(CMAKE_ASM_YASM_COMPILE_OBJECT " -f ${CMAKE_ASM_YASM_OBJECT_FORMAT} -o ") + +# Load the generic ASMInformation file: +set(ASM_DIALECT "_YASM") +include(CMakeASMInformation) +set(ASM_DIALECT) diff --git a/cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake b/cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake new file mode 100644 index 000000000..a5e7c9e58 --- /dev/null +++ b/cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake @@ -0,0 +1,27 @@ + +#============================================================================= +# Copyright 2010 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible + +set(CMAKE_ASM_YASM_COMPILER_LIST nasm yasm) + +if(NOT CMAKE_ASM_YASM_COMPILER) + find_program(CMAKE_ASM_YASM_COMPILER yasm + "$ENV{ProgramFiles}/YASM") +endif() + +# Load the generic DetermineASM compiler file with the DIALECT set properly: +set(ASM_DIALECT "_YASM") +include(CMakeDetermineASMCompiler) +set(ASM_DIALECT) diff --git a/cmake/Modules/CMakeTestASM_YASMCompiler.cmake b/cmake/Modules/CMakeTestASM_YASMCompiler.cmake new file mode 100644 index 000000000..745f7125c --- /dev/null +++ b/cmake/Modules/CMakeTestASM_YASMCompiler.cmake @@ -0,0 +1,23 @@ + +#============================================================================= +# Copyright 2010 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This file is used by EnableLanguage in cmGlobalGenerator to +# determine that the selected ASM_NASM "compiler" works. +# For assembler this can only check whether the compiler has been found, +# because otherwise there would have to be a separate assembler source file +# for each assembler on every architecture. + +set(ASM_DIALECT "_YASM") +include(CMakeTestASMCompiler) +set(ASM_DIALECT) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b1e8e6f57..6c57440f1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -198,13 +198,32 @@ set(SRB2_R_OPENGL_HEADERS prepend_sources(SRB2_R_OPENGL_SOURCES) prepend_sources(SRB2_R_OPENGL_HEADERS) +set(SRB2_ASM_SOURCES + vid_copy.s +) + set(SRB2_NASM_SOURCES - tamp_mmx.nas + tmap_mmx.nas tmap.nas ) +if(MSVC) + list(APPEND SRB2_NASM_SOURCES tmap_vc.nas) +endif() + +set(SRB2_NASM_OBJECTS + tmap_mmx.obj + tmap.obj +) + +if(MSVC) + list(APPEND SRB2_NASM_OBJECTS tmap_vc.obj) +endif() + +prepend_sources(SRB2_ASM_SOURCES) prepend_sources(SRB2_NASM_SOURCES) + ### Configuration set(SRB2_CONFIG_HAVE_BLUA ON CACHE BOOL "Enable Lua interpreter support") @@ -218,6 +237,8 @@ set(SRB2_CONFIG_HWRENDER ON CACHE BOOL "Enable hardware rendering through OpenGL") set(SRB2_CONFIG_USEASM OFF CACHE BOOL "Enable NASM tmap implementation for software mode speedup.") +set(SRB2_CONFIG_YASM OFF CACHE BOOL + "Use YASM in place of NASM.") set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL "Use statically linked OpenGL. NOT RECOMMENDED.") @@ -348,7 +369,13 @@ if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL}) endif() if(${SRB2_CONFIG_USEASM}) - enable_language(ASM-NASM) + if(${SRB2_CONFIG_YASM}) + set(CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS} nas) + enable_language(ASM_YASM) + else() + set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS} nas) + enable_language(ASM_NASM) + endif() set(SRB2_USEASM ON) add_definitions(-DUSEASM) else() @@ -365,7 +392,7 @@ endif() # Compatibility flag with later versions of GCC # We should really fix our code to not need this if(NOT CLANG AND NOT MSVC) - add_compile_options(-mno-ms-bitfields) + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields) endif() add_definitions(-DCMAKECONFIG) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 7df73acff..dc93b6e48 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -75,6 +75,17 @@ if(${SDL2_FOUND}) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${SRB2_NASM_SOURCES} ) + if(MSVC) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + ${SRB2_NASM_OBJECTS} + ) + set_source_files_properties(${SRB2_NASM_OBJECTS} PROPERTIES GENERATED ON) + else() + list(APPEND SRB2_SDL2_TOTAL_SOURCES ${SRB2_ASM_SOURCES}) + set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES LANGUAGE C) + set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp") + endif() + endif() if(${CMAKE_SYSTEM} MATCHES Windows) @@ -132,6 +143,30 @@ if(${SDL2_FOUND}) endif() + if(${SRB2_USEASM}) + if(${SRB2_CONFIG_YASM}) + set(ASM_ASSEMBLER_TEMP ${CMAKE_ASM_YASM_COMPILER}) + set(ASM_ASSEMBLER_OBJFORMAT ${CMAKE_ASM_YASM_OBJECT_FORMAT}) + set_source_files_properties(${SRB2_NASM_SOURCES} LANGUAGE ASM_YASM) + else() + set(ASM_ASSEMBLER_TEMP ${CMAKE_ASM_NASM_COMPILER}) + set(ASM_ASSEMBLER_OBJFORMAT ${CMAKE_ASM_NASM_OBJECT_FORMAT}) + set_source_files_properties(${SRB2_NASM_SOURCES} LANGUAGE ASM_NASM) + endif() + + if(MSVC) + # using assembler with msvc doesn't work, must do it manually + foreach(ASMFILE ${SRB2_NASM_SOURCES}) + get_filename_component(ASMFILE_NAME ${ASMFILE} NAME_WE) + set(ASMFILE_NAME ${ASMFILE_NAME}.obj) + add_custom_command(TARGET ${SRB2_SDL2_EXE_NAME} PRE_LINK + COMMAND ${ASM_ASSEMBLER_TEMP} ARGS -f ${ASM_ASSEMBLER_OBJFORMAT} -o ${CMAKE_CURRENT_BINARY_DIR}/${ASMFILE_NAME} ${ASMFILE} + COMMENT "assemble ${ASMFILE_NAME}." + ) + endforeach() + endif() + endif() + set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES VERSION ${SRB2_VERSION}) if(${CMAKE_SYSTEM} MATCHES Windows) From e08bd452279dbeedbf876fec465ea51a137455a8 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 1 Feb 2015 22:14:52 -0600 Subject: [PATCH 027/609] cmake: Separate debug symbols on gcc Only when actually making the debug target though! --- CMakeLists.txt | 4 ++++ src/sdl/CMakeLists.txt | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 844555c12..b8abe511d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,10 @@ if (UNIX) add_definitions(-DUNIXCOMMON) endif() +if(CMAKE_COMPILER_IS_GNUCC) + find_program(OBJCOPY objcopy) +endif() + if(${CMAKE_SYSTEM} MATCHES "Linux") add_definitions(-DLINUX) if(${SRB2_SYSTEM_BITS} EQUAL 64) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index dc93b6e48..b4eeeeb5f 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -208,6 +208,18 @@ if(${SDL2_FOUND}) -DHAVE_SDL ) + ## strip debug symbols into separate file when using gcc + if(CMAKE_COMPILER_IS_GNUCC) + if(${CMAKE_BUILD_TYPE} MATCHES Debug) + message(STATUS "Will make separate debug symbols in *.debug") + add_custom_command(TARGET ${SRB2_SDL2_EXE_NAME} POST_BUILD + COMMAND ${OBJCOPY} --only-keep-debug $ $.debug + COMMAND ${OBJCOPY} --strip-debug $ + COMMAND ${OBJCOPY} --add-gnu-debuglink=$.debug $ + ) + endif() + endif() + #### Installation #### if (CLANG) install(TARGETS ${SRB2_SDL2_EXE_NAME} From 7cf1a1aab8bc041f8fb1c95a0aa8beb8d06db84e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 2 Feb 2015 14:58:51 -0500 Subject: [PATCH 028/609] fixup cmake merge --- src/Makefile | 2 -- src/config.h.in | 1 - src/sdl/i_system.c | 8 ++++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index a1a8804e7..d4cc64a4b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -585,8 +585,6 @@ $(BIN)/$(EXENAME): $(POS) $(OBJS) -$(MKDIR) $(BIN) @echo Linking $(EXENAME)... $(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS) - @echo $(LD) $(LDFLAGS) $(OBJS) -o $(BIN)/$(EXENAME) $(LIBS) - @echo $(CFLAGS) ifndef VALGRIND ifndef NOOBJDUMP @echo Dumping debugging info diff --git a/src/config.h.in b/src/config.h.in index 6e7c64da3..7c5b299cf 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -22,6 +22,5 @@ #define ASSET_HASH_PLAYER_DTA "cfca0f1c73023cbbd8f844f45480f799" #define ASSET_HASH_RINGS_DTA "85901ad4bf94637e5753d2ac2c03ea26" -#define #endif #endif diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 567611ec5..054196a27 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -20,7 +20,11 @@ /// \file /// \brief SRB2 system stuff for SDL +#ifdef CMAKECONFIG #include "config.h" +#else +#include "config.h.in" +#endif #ifndef _WIN32_WCE #include @@ -1658,7 +1662,11 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) return; if(mumble->uiVersion != 2) { +#ifdef VERSIONSTRINGW wcsncpy(mumble->name, L"SRB2 "VERSIONSTRINGW, 256); +#else + wcsncpy(mumble->name, L"SRB2 "VERSIONSTRING, 256); +#endif wcsncpy(mumble->description, L"Sonic Robo Blast 2 with integrated Mumble Link support.", 2048); mumble->uiVersion = 2; } From 3d498fe89436fd23274c1e07f9c36755f9223ea7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 2 Feb 2015 15:21:58 -0500 Subject: [PATCH 029/609] VERSIONSTRINGW is funny --- src/sdl/i_system.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 054196a27..fa09dc343 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1662,11 +1662,7 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) return; if(mumble->uiVersion != 2) { -#ifdef VERSIONSTRINGW wcsncpy(mumble->name, L"SRB2 "VERSIONSTRINGW, 256); -#else - wcsncpy(mumble->name, L"SRB2 "VERSIONSTRING, 256); -#endif wcsncpy(mumble->description, L"Sonic Robo Blast 2 with integrated Mumble Link support.", 2048); mumble->uiVersion = 2; } From ae056134608632aeff7a1427ef1827403b9b0d14 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 5 Feb 2015 00:32:54 -0600 Subject: [PATCH 030/609] Fix IPv4 connectivity when IPv6 is enabled --- src/i_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index df7b3cf28..6cfc8c7c2 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -690,7 +690,7 @@ static void SOCK_Send(void) if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET) d = d4; #ifdef HAVE_IPV6 - if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET6) + else if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET6) d = d6; #endif else From 062a746fdd8677643cb16ac9bbd25b7f3713263f Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 5 Feb 2015 15:36:07 -0600 Subject: [PATCH 031/609] Further fix IPv4 when IPv6 is available --- src/i_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index 6cfc8c7c2..ba2f814ec 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -651,7 +651,7 @@ static void SOCK_Send(void) if (broadcastaddress[i].any.sa_family == AF_INET) d = d4; #ifdef HAVE_IPV6 - if (broadcastaddress[i].any.sa_family == AF_INET6) + else if (broadcastaddress[i].any.sa_family == AF_INET6) d = d6; #endif else From 8cccfa558ad96705730eed5624ba3b68d800464a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 5 Feb 2015 17:04:24 -0500 Subject: [PATCH 032/609] do not include anything in assets folder unless forced --- assets/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 assets/.gitignore diff --git a/assets/.gitignore b/assets/.gitignore new file mode 100644 index 000000000..37bb465dc --- /dev/null +++ b/assets/.gitignore @@ -0,0 +1,2 @@ +* +*.* From 542295c863078d9bcc39bbf9ea2b9ebb14085579 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 5 Feb 2015 17:30:15 -0500 Subject: [PATCH 033/609] remove comptime.h from cmake file list --- src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c57440f1..74f97048b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,7 +77,6 @@ set(SRB2_CORE_HEADERS b_bot.h byteptr.h command.h - comptime.h console.h d_clisrv.h d_event.h From ed0d70fecafb781969ea44d1a0945c2e8a45218f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 5 Feb 2015 17:31:32 -0500 Subject: [PATCH 034/609] do not typedef off_t when we do not need to --- src/m_misc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/m_misc.c b/src/m_misc.c index 73d17c00d..3e4be62a2 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -50,7 +50,9 @@ #ifdef HAVE_SDL #include "sdl/hwsym_sdl.h" #ifdef __linux__ +#ifndef _LARGEFILE64_SOURCE typedef off_t off64_t; +#neidf #endif #endif From 2609745b51e41ccd5ee6ea186ef051b3d9dfabc2 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 6 Feb 2015 10:22:06 -0500 Subject: [PATCH 035/609] it was me, Duo! --- src/m_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_misc.c b/src/m_misc.c index 3e4be62a2..57b8c4585 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -52,7 +52,7 @@ #ifdef __linux__ #ifndef _LARGEFILE64_SOURCE typedef off_t off64_t; -#neidf +#endif #endif #endif From 627889eec183a06f1dc685f3883614bc4b63353e Mon Sep 17 00:00:00 2001 From: Wolfy Date: Fri, 20 Feb 2015 17:25:27 -0600 Subject: [PATCH 036/609] Have super sparks scale with the player Fixes https://mb.srb2.org/showthread.php?t=40279 Should work fine, but do keep in mind that this fix is untested. --- src/p_user.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 6844d2cba..7598272f6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3330,6 +3330,7 @@ firenormal: // static void P_DoSuperStuff(player_t *player) { + mobj_t *spark; ticcmd_t *cmd = &player->cmd; if (player->mo->state >= &states[S_PLAY_SUPERTRANS1] && player->mo->state <= &states[S_PLAY_SUPERTRANS9]) return; // don't do anything right now, we're in the middle of transforming! @@ -3396,8 +3397,12 @@ static void P_DoSuperStuff(player_t *player) if ((cmd->forwardmove != 0 || cmd->sidemove != 0 || player->pflags & (PF_CARRIED|PF_ROPEHANG|PF_ITEMHANG|PF_MACESPIN)) && !(leveltime % TICRATE) && (player->mo->momx || player->mo->momy)) - P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SUPERSPARK); - + { + spark = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SUPERSPARK); + spark->destscale = player->mo->scale; + P_SetScale(spark, player->mo->scale); + } + G_GhostAddColor(GHC_SUPER); // Ran out of rings while super! From 6513954789e29e63fe0d18f3bc1a345be770ff2f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 1 Mar 2015 19:30:22 -0500 Subject: [PATCH 037/609] whitespace cleanup --- src/p_user.c | 2 +- src/sdl/i_system.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 7598272f6..3d77069ac 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3402,7 +3402,7 @@ static void P_DoSuperStuff(player_t *player) spark->destscale = player->mo->scale; P_SetScale(spark, player->mo->scale); } - + G_GhostAddColor(GHC_SUPER); // Ran out of rings while super! diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index fa09dc343..66e1ece18 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2759,8 +2759,8 @@ static const char *locateWad(void) if (isWadPathOk(returnWadPath)) return NULL; #endif - - + + #ifdef CMAKECONFIG #ifndef NDEBUG I_OutputMsg(","CMAKE_ASSETS_DIR); @@ -2771,7 +2771,7 @@ static const char *locateWad(void) } #endif #endif - + #ifdef __APPLE__ OSX_GetResourcesPath(returnWadPath); I_OutputMsg(",%s", returnWadPath); @@ -2779,7 +2779,7 @@ static const char *locateWad(void) { return returnWadPath; } - + #endif // examine default dirs From 8232dbca10181c56a73247cac2464af4465c5481 Mon Sep 17 00:00:00 2001 From: MonsterIestyn Date: Fri, 2 Jan 2015 15:14:22 +0000 Subject: [PATCH 038/609] *Fixed OpenGL's handling of cv_translucency effects (should not remove shadows if off, but perhaps make them use default alpha?), someone was a bit hasty! *De-stupified the MD2 status checks regarding drawing of sprites - if they're already checked before calling HWR_DrawSprite, there's no point doing them WITHIN the function as well *Split off sprite shadow code into HWR_DrawSpriteShadow for convenience git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8983 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/hardware/hw_main.c | 377 +++++++++++++++++++++-------------------- 1 file changed, 191 insertions(+), 186 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index db812c0df..bc86c1295 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3527,6 +3527,186 @@ static boolean HWR_DoCulling(line_t *cullheight, line_t *viewcullheight, float v return false; } +static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float this_scale) +{ + UINT8 i; + float tr_x, tr_y; + FOutVector *wv; + FOutVector swallVerts[4]; + FSurfaceInfo sSurf; + fixed_t floorheight, mobjfloor; + + mobjfloor = HWR_OpaqueFloorAtPos( + spr->mobj->x, spr->mobj->y, + spr->mobj->z, spr->mobj->height); + if (cv_shadowoffs.value) + { + angle_t shadowdir; + + // Set direction + if (splitscreen && stplyr != &players[displayplayer]) + shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value); + else + shadowdir = localangle + FixedAngle(cv_cam_rotate.value); + + // Find floorheight + floorheight = HWR_OpaqueFloorAtPos( + spr->mobj->x + P_ReturnThrustX(spr->mobj, shadowdir, spr->mobj->z - mobjfloor), + spr->mobj->y + P_ReturnThrustY(spr->mobj, shadowdir, spr->mobj->z - mobjfloor), + spr->mobj->z, spr->mobj->height); + + // The shadow is falling ABOVE it's mobj? + // Don't draw it, then! + if (spr->mobj->z < floorheight) + return; + else + { + fixed_t floorz; + floorz = HWR_OpaqueFloorAtPos( + spr->mobj->x + P_ReturnThrustX(spr->mobj, shadowdir, spr->mobj->z - floorheight), + spr->mobj->y + P_ReturnThrustY(spr->mobj, shadowdir, spr->mobj->z - floorheight), + spr->mobj->z, spr->mobj->height); + // The shadow would be falling on a wall? Don't draw it, then. + // Would draw midair otherwise. + if (floorz < floorheight) + return; + } + + floorheight = FixedInt(spr->mobj->z - floorheight); + } + else + floorheight = FixedInt(spr->mobj->z - mobjfloor); + + // create the sprite billboard + // + // 3--2 + // | /| + // |/ | + // 0--1 + + // x1/x2 were already scaled in HWR_ProjectSprite + swallVerts[0].x = swallVerts[3].x = spr->x1; + swallVerts[2].x = swallVerts[1].x = spr->x2; + + if (spr->mobj && this_scale != 1.0f) + { + // Always a pixel above the floor, perfectly flat. + swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->ty - gpatch->topoffset * this_scale - (floorheight+3); + + swallVerts[0].z = swallVerts[1].z = spr->tz - (gpatch->height-gpatch->topoffset) * this_scale; + swallVerts[2].z = swallVerts[3].z = spr->tz + gpatch->topoffset * this_scale; + } + else + { + // Always a pixel above the floor, perfectly flat. + swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->ty - gpatch->topoffset - (floorheight+3); + + // Spread out top away from the camera. (Fixme: Make it always move out in the same direction!... somehow.) + swallVerts[0].z = swallVerts[1].z = spr->tz - (gpatch->height-gpatch->topoffset); + swallVerts[2].z = swallVerts[3].z = spr->tz + gpatch->topoffset; + } + + // transform + wv = swallVerts; + + for (i = 0; i < 4; i++,wv++) + { + // Offset away from the camera based on height from floor. + if (cv_shadowoffs.value) + wv->z += floorheight; + wv->z += 3; + + //look up/down ----TOTAL SUCKS!!!--- do the 2 in one!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + tr_x = wv->z; + tr_y = wv->y; + wv->y = (tr_x * gr_viewludcos) + (tr_y * gr_viewludsin); + wv->z = (tr_x * gr_viewludsin) - (tr_y * gr_viewludcos); + // ---------------------- mega lame test ---------------------------------- + + //scale y before frustum so that frustum can be scaled to screen height + wv->y *= ORIGINAL_ASPECT * gr_fovlud; + wv->x *= gr_fovlud; + } + + if (spr->flip) + { + swallVerts[0].sow = swallVerts[3].sow = gpatch->max_s; + swallVerts[2].sow = swallVerts[1].sow = 0; + } + else + { + swallVerts[0].sow = swallVerts[3].sow = 0; + swallVerts[2].sow = swallVerts[1].sow = gpatch->max_s; + } + + // flip the texture coords (look familiar?) + if (spr->vflip) + { + swallVerts[3].tow = swallVerts[2].tow = gpatch->max_t; + swallVerts[0].tow = swallVerts[1].tow = 0; + } + else + { + swallVerts[3].tow = swallVerts[2].tow = 0; + swallVerts[0].tow = swallVerts[1].tow = gpatch->max_t; + } + + sSurf.FlatColor.s.red = 0x00; + sSurf.FlatColor.s.blue = 0x00; + sSurf.FlatColor.s.green = 0x00; + + /*if (spr->mobj->frame & FF_TRANSMASK || spr->mobj->flags2 & MF2_SHADOW) + { + sector_t *sector = spr->mobj->subsector->sector; + UINT8 lightlevel = sector->lightlevel; + extracolormap_t *colormap = sector->extra_colormap; + + if (sector->numlights) + { + INT32 light = R_GetPlaneLight(sector, spr->mobj->floorz, false); + + if (!(spr->mobj->frame & FF_FULLBRIGHT)) + lightlevel = *sector->lightlist[light].lightlevel; + else + lightlevel = 255; + + if (sector->lightlist[light].extra_colormap) + colormap = sector->lightlist[light].extra_colormap; + } + else + { + lightlevel = sector->lightlevel; + + if (sector->extra_colormap) + colormap = sector->extra_colormap; + } + + if (colormap) + sSurf.FlatColor.rgba = HWR_Lighting(lightlevel/2, colormap->rgba, colormap->fadergba, false, true); + else + sSurf.FlatColor.rgba = HWR_Lighting(lightlevel/2, NORMALFOG, FADEFOG, false, true); + }*/ + + // shadow is always half as translucent as the sprite itself + if (!cv_translucency.value) // use default translucency (main sprite won't have any translucency) + sSurf.FlatColor.s.alpha = 0x80; // default + else if (spr->mobj->flags2 & MF2_SHADOW) + sSurf.FlatColor.s.alpha = 0x20; + else if (spr->mobj->frame & FF_TRANSMASK) + { + HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &sSurf); + sSurf.FlatColor.s.alpha /= 2; //cut alpha in half! + } + else + sSurf.FlatColor.s.alpha = 0x80; // default + + if (sSurf.FlatColor.s.alpha > floorheight/4) + { + sSurf.FlatColor.s.alpha = (UINT8)(sSurf.FlatColor.s.alpha - floorheight/4); + HWD.pfnDrawPolygon(&sSurf, swallVerts, 4, PF_Translucent|PF_Modulated|PF_Clip); + } +} + // -----------------+ // HWR_DrawSprite : Draw flat sprites // : (monsters, bonuses, weapons, lights, ...) @@ -3629,7 +3809,7 @@ static void HWR_DrawSprite(gr_vissprite_t *spr) // Draw shadow BEFORE sprite if (cv_shadow.value // Shadows enabled - && !(spr->mobj->flags & MF_SCENERY && spr->mobj->flags & MF_SPAWNCEILING && spr->mobj->flags & MF_NOGRAVITY) // Ceiling scenery have no shadow. + && (spr->mobj->flags & (MF_SCENERY|MF_SPAWNCEILING|MF_NOGRAVITY)) != (MF_SCENERY|MF_SPAWNCEILING|MF_NOGRAVITY) // Ceiling scenery have no shadow. && !(spr->mobj->flags2 & MF2_DEBRIS) // Debris have no corona or shadow. #ifdef ALAM_LIGHTING && !(t_lspr[spr->mobj->sprite]->type // Things with dynamic lights have no shadow. @@ -3640,187 +3820,9 @@ static void HWR_DrawSprite(gr_vissprite_t *spr) //////////////////// // SHADOW SPRITE! // //////////////////// - FOutVector swallVerts[4]; - FSurfaceInfo sSurf; - fixed_t floorheight, mobjfloor; - - mobjfloor = HWR_OpaqueFloorAtPos( - spr->mobj->x, spr->mobj->y, - spr->mobj->z, spr->mobj->height); - if (cv_shadowoffs.value) - { - angle_t shadowdir; - - // Set direction - if (splitscreen && stplyr != &players[displayplayer]) - shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value); - else - shadowdir = localangle + FixedAngle(cv_cam_rotate.value); - - // Find floorheight - floorheight = HWR_OpaqueFloorAtPos( - spr->mobj->x + P_ReturnThrustX(spr->mobj, shadowdir, spr->mobj->z - mobjfloor), - spr->mobj->y + P_ReturnThrustY(spr->mobj, shadowdir, spr->mobj->z - mobjfloor), - spr->mobj->z, spr->mobj->height); - - // The shadow is falling ABOVE it's mobj? - // Don't draw it, then! - if (spr->mobj->z < floorheight) - goto noshadow; - else - { - fixed_t floorz; - floorz = HWR_OpaqueFloorAtPos( - spr->mobj->x + P_ReturnThrustX(spr->mobj, shadowdir, spr->mobj->z - floorheight), - spr->mobj->y + P_ReturnThrustY(spr->mobj, shadowdir, spr->mobj->z - floorheight), - spr->mobj->z, spr->mobj->height); - // The shadow would be falling on a wall? Don't draw it, then. - // Would draw midair otherwise. - if (floorz < floorheight) - goto noshadow; - } - - floorheight = FixedInt(spr->mobj->z - floorheight); - } - else - floorheight = FixedInt(spr->mobj->z - mobjfloor); - - // create the sprite billboard - // - // 3--2 - // | /| - // |/ | - // 0--1 - - // x1/x2 were already scaled in HWR_ProjectSprite - swallVerts[0].x = swallVerts[3].x = spr->x1; - swallVerts[2].x = swallVerts[1].x = spr->x2; - - if (spr->mobj && this_scale != 1.0f) - { - // Always a pixel above the floor, perfectly flat. - swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->ty - gpatch->topoffset * this_scale - (floorheight+3); - - swallVerts[0].z = swallVerts[1].z = spr->tz - (gpatch->height-gpatch->topoffset) * this_scale; - swallVerts[2].z = swallVerts[3].z = spr->tz + gpatch->topoffset * this_scale; - } - else - { - // Always a pixel above the floor, perfectly flat. - swallVerts[0].y = swallVerts[1].y = swallVerts[2].y = swallVerts[3].y = spr->ty - gpatch->topoffset - (floorheight+3); - - // Spread out top away from the camera. (Fixme: Make it always move out in the same direction!... somehow.) - swallVerts[0].z = swallVerts[1].z = spr->tz - (gpatch->height-gpatch->topoffset); - swallVerts[2].z = swallVerts[3].z = spr->tz + gpatch->topoffset; - } - - // transform - wv = swallVerts; - - for (i = 0; i < 4; i++,wv++) - { - // Offset away from the camera based on height from floor. - if (cv_shadowoffs.value) - wv->z += floorheight; - wv->z += 3; - - //look up/down ----TOTAL SUCKS!!!--- do the 2 in one!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - tr_x = wv->z; - tr_y = wv->y; - wv->y = (tr_x * gr_viewludcos) + (tr_y * gr_viewludsin); - wv->z = (tr_x * gr_viewludsin) - (tr_y * gr_viewludcos); - // ---------------------- mega lame test ---------------------------------- - - //scale y before frustum so that frustum can be scaled to screen height - wv->y *= ORIGINAL_ASPECT * gr_fovlud; - wv->x *= gr_fovlud; - } - - if (spr->flip) - { - swallVerts[0].sow = swallVerts[3].sow = gpatch->max_s; - swallVerts[2].sow = swallVerts[1].sow = 0; - } - else - { - swallVerts[0].sow = swallVerts[3].sow = 0; - swallVerts[2].sow = swallVerts[1].sow = gpatch->max_s; - } - - // flip the texture coords (look familiar?) - if (spr->vflip) - { - swallVerts[3].tow = swallVerts[2].tow = gpatch->max_t; - swallVerts[0].tow = swallVerts[1].tow = 0; - } - else - { - swallVerts[3].tow = swallVerts[2].tow = 0; - swallVerts[0].tow = swallVerts[1].tow = gpatch->max_t; - } - - sSurf.FlatColor.s.red = 0x00; - sSurf.FlatColor.s.blue = 0x00; - sSurf.FlatColor.s.green = 0x00; - - /*if (spr->mobj->frame & FF_TRANSMASK || spr->mobj->flags2 & MF2_SHADOW) - { - sector_t *sector = spr->mobj->subsector->sector; - UINT8 lightlevel = sector->lightlevel; - extracolormap_t *colormap = sector->extra_colormap; - - if (sector->numlights) - { - INT32 light = R_GetPlaneLight(sector, spr->mobj->floorz, false); - - if (!(spr->mobj->frame & FF_FULLBRIGHT)) - lightlevel = *sector->lightlist[light].lightlevel; - else - lightlevel = 255; - - if (sector->lightlist[light].extra_colormap) - colormap = sector->lightlist[light].extra_colormap; - } - else - { - lightlevel = sector->lightlevel; - - if (sector->extra_colormap) - colormap = sector->extra_colormap; - } - - if (colormap) - sSurf.FlatColor.rgba = HWR_Lighting(lightlevel/2, colormap->rgba, colormap->fadergba, false, true); - else - sSurf.FlatColor.rgba = HWR_Lighting(lightlevel/2, NORMALFOG, FADEFOG, false, true); - }*/ - - // shadow is always half as translucent as the sprite itself - if (!cv_translucency.value) - ; // translucency disabled - else if (spr->mobj->flags2 & MF2_SHADOW) - sSurf.FlatColor.s.alpha = 0x20; - else if (spr->mobj->frame & FF_TRANSMASK) - { - HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &sSurf); - sSurf.FlatColor.s.alpha /= 2; //cut alpha in half! - } - else - sSurf.FlatColor.s.alpha = 0x80; // default - - /// \todo do the test earlier - if (!cv_grmd2.value || (md2_models[spr->mobj->sprite].scale < 0.0f) || (md2_models[spr->mobj->sprite].notfound = true) || (md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) || (md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound = true)) - { - if (sSurf.FlatColor.s.alpha > floorheight/4) - { - sSurf.FlatColor.s.alpha = (UINT8)(sSurf.FlatColor.s.alpha - floorheight/4); - HWD.pfnDrawPolygon(&sSurf, swallVerts, 4, PF_Translucent|PF_Modulated|PF_Clip); - } - } + HWR_DrawSpriteShadow(spr, gpatch, this_scale); } -noshadow: - // This needs to be AFTER the shadows so that the regular sprites aren't drawn completely black. // sprite lighting by modulating the RGB components /// \todo coloured @@ -3865,11 +3867,14 @@ noshadow: Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false); } - /// \todo do the test earlier - if (!cv_grmd2.value || (md2_models[spr->mobj->sprite].scale < 0.0f)) { FBITFIELD blend = 0; - if (spr->mobj->flags2 & MF2_SHADOW) + if (!cv_translucency.value) // translucency disabled + { + Surf.FlatColor.s.alpha = 0xFF; + blend = PF_Translucent|PF_Occlude; + } + else if (spr->mobj->flags2 & MF2_SHADOW) { Surf.FlatColor.s.alpha = 0x40; blend = PF_Translucent; @@ -4390,10 +4395,10 @@ static void HWR_DrawSprites(void) #endif if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY) { - if (!cv_grmd2.value || (cv_grmd2.value && md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound == true)) + if (!cv_grmd2.value || md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) HWR_DrawSprite(spr); } - else if (!cv_grmd2.value || (cv_grmd2.value && md2_models[spr->mobj->sprite].notfound == true)) + else if (!cv_grmd2.value || md2_models[spr->mobj->sprite].notfound || md2_models[spr->mobj->sprite].scale < 0.0f) HWR_DrawSprite(spr); } } @@ -4419,7 +4424,7 @@ static void HWR_DrawMD2S(void) #endif if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY) { - if ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound == false) && (md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale > 0.0f)) + if (md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound == false && md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale > 0.0f) HWR_DrawMD2(spr); } else if (md2_models[spr->mobj->sprite].notfound == false && md2_models[spr->mobj->sprite].scale > 0.0f) From 0a7f3751f6553bf967698afb559c9959261ffc2b Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Fri, 2 Jan 2015 16:37:13 +0000 Subject: [PATCH 039/609] Add in missing super check git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8984 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/p_enemy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/p_enemy.c b/src/p_enemy.c index 18a4ec5ff..2a8ab5bb9 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -5660,6 +5660,11 @@ void A_RecyclePowers(mobj_t *actor) if (playeringame[i] && players[i].mo && players[i].mo->health > 0 && players[i].playerstate == PST_LIVE && !players[i].exiting && !((netgame || multiplayer) && players[i].spectator)) { +#ifndef WEIGHTEDRECYCLER + if (players[i].powers[pw_super]) + continue; // Ignore super players +#endif + numplayers++; postscramble[j] = playerslist[j] = (UINT8)i; From f3e6770e9a8fa9aaa27b1cfdb48d5d65ae79f48c Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Fri, 2 Jan 2015 22:27:43 +0000 Subject: [PATCH 040/609] Well that shows you how much we care about the old special stages *or* race! git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8985 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/g_game.c | 3 +-- src/st_stuff.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index c59f23c07..931388d87 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2180,8 +2180,7 @@ void G_PlayerReborn(INT32 player) p->health = 1; // 0 rings p->panim = PA_IDLE; // standing animation - if ((netgame || multiplayer) && !p->spectator - && gametype != GT_RACE) + if ((netgame || multiplayer) && !p->spectator) p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent if (p-players == consoleplayer) diff --git a/src/st_stuff.c b/src/st_stuff.c index a9bdacf71..6e19b92ff 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1590,7 +1590,7 @@ static void ST_drawSpecialStageHUD(void) if (sstimer) { V_DrawString(hudinfo[HUD_TIMELEFT].x, STRINGY(hudinfo[HUD_TIMELEFT].y), V_HUDTRANS, M_GetText("TIME LEFT")); - ST_DrawNightsOverlayNum(SCX(hudinfo[HUD_TIMELEFTNUM].x), SCY(hudinfo[HUD_TIMELEFTNUM].y), V_HUDTRANS, sstimer/TICRATE, tallnum, SKINCOLOR_WHITE); + ST_DrawNumFromHud(HUD_TIMELEFTNUM, sstimer/TICRATE); } else ST_DrawPatchFromHud(HUD_TIMEUP, timeup); From 2d8868feca767ffe6cbedc23c2172e1946332d6c Mon Sep 17 00:00:00 2001 From: MonsterIestyn Date: Sat, 10 Jan 2015 20:54:17 +0000 Subject: [PATCH 041/609] Made HWR_InitMD2 and HWR_AddSpriteMD2/HWR_AddPlayerMD2 slightly less stupid with MD2-related searches in md2.dat: *Don't go barmy and search for a player skin called "THOK" when you already found the sprite called "THOK" beforehand! (or any other sprite prefix for that matter) *Don't make errors appear only for the last sprite/skin when it doesn't make sense to do so!! Todo: Stop the redundancy that currently goes on with adding MD2s on game start-up (note that HWR_AddSpriteMD2/HWR_AddPlayerMD2 are run for all sprites/skins BEFORE HWR_InitMD2 is called) git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8988 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/hardware/hw_md2.c | 81 +++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 49 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 02f505351..6d2a1d4a3 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -921,24 +921,25 @@ void HWR_InitMD2(void) } while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4) { + if (stricmp(name, "PLAY") == 0) + { + CONS_Printf("MD2 for sprite PLAY detected in md2.dat, use a player skin instead!\n"); + continue; + } + for (i = 0; i < NUMSPRITES; i++) { if (stricmp(name, sprnames[i]) == 0) { - if (stricmp(name, "PLAY") == 0) - continue; + //if (stricmp(name, "PLAY") == 0) + //continue; //CONS_Debug(DBG_RENDER, " Found: %s %s %f %f\n", name, filename, scale, offset); md2_models[i].scale = scale; md2_models[i].offset = offset; md2_models[i].notfound = false; strcpy(md2_models[i].filename, filename); - break; - } - if (i == NUMSPRITES) - { - CONS_Printf("MD2 for sprite %s not found\n", name); - md2_models[i].notfound = true; + goto md2found; } } @@ -952,15 +953,14 @@ void HWR_InitMD2(void) md2_playermodels[s].offset = offset; md2_playermodels[s].notfound = false; strcpy(md2_playermodels[s].filename, filename); - break; - } - if (s == MAXSKINS-1) - { - CONS_Printf("MD2 for player skin %s not found\n", name); - md2_playermodels[s].notfound = true; + goto md2found; } } - + // no sprite/player skin name found?!? + CONS_Printf("Unknown sprite/player skin %s detected in md2.dat\n", name); +md2found: + // move on to next line... + continue; } fclose(f); } @@ -996,17 +996,14 @@ void HWR_AddPlayerMD2(int skin) // For MD2's that were added after startup md2_playermodels[skin].offset = offset; md2_playermodels[skin].notfound = false; strcpy(md2_playermodels[skin].filename, filename); - break; - } - if (skin == MAXSKINS-1) - { - CONS_Printf("MD2 for player skin %s not found\n", name); - md2_playermodels[skin].notfound = true; + goto playermd2found; } } + //CONS_Printf("MD2 for player skin %s not found\n", skins[skin].name); + md2_playermodels[skin].notfound = true; +playermd2found: fclose(f); - } @@ -1021,6 +1018,9 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu if (nomd2s) return; + if (spritenum == SPR_PLAY) // Handled already NEWMD2: Per sprite, per-skin check + return; + // Read the md2.dat file f = fopen("md2.dat", "rt"); @@ -1034,27 +1034,19 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu // Check for any MD2s that match the names of player skins! while (fscanf(f, "%19s %31s %f %f", name, filename, &scale, &offset) == 4) { + if (stricmp(name, sprnames[spritenum]) == 0) { - if (stricmp(name, sprnames[spritenum]) == 0) - { - if (stricmp(name, "PLAY") == 0) // Handled already NEWMD2: Per sprite, per-skin check - continue; - - md2_models[spritenum].scale = scale; - md2_models[spritenum].offset = offset; - md2_models[spritenum].notfound = false; - strcpy(md2_models[spritenum].filename, filename); - break; - } - - if (spritenum == NUMSPRITES-1) - { - CONS_Printf("MD2 for sprite %s not found\n", name); - md2_models[spritenum].notfound = true; - } + md2_models[spritenum].scale = scale; + md2_models[spritenum].offset = offset; + md2_models[spritenum].notfound = false; + strcpy(md2_models[spritenum].filename, filename); + goto spritemd2found; } } + //CONS_Printf("MD2 for sprite %s not found\n", sprnames[spritenum]); + md2_models[spritenum].notfound = true; +spritemd2found: fclose(f); } @@ -1094,7 +1086,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr) // colormap test { sector_t *sector = spr->mobj->subsector->sector; - UINT8 lightlevel = sector->lightlevel; + UINT8 lightlevel = 255; extracolormap_t *colormap = sector->extra_colormap; if (sector->numlights) @@ -1105,8 +1097,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr) if (!(spr->mobj->frame & FF_FULLBRIGHT)) lightlevel = *sector->lightlist[light].lightlevel; - else - lightlevel = 255; if (sector->lightlist[light].extra_colormap) colormap = sector->lightlist[light].extra_colormap; @@ -1115,16 +1105,11 @@ void HWR_DrawMD2(gr_vissprite_t *spr) { if (!(spr->mobj->frame & FF_FULLBRIGHT)) lightlevel = sector->lightlevel; - else - lightlevel = 255; if (sector->extra_colormap) colormap = sector->extra_colormap; } - if (spr->mobj->frame & FF_FULLBRIGHT) - lightlevel = 255; - if (colormap) Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false); else @@ -1263,8 +1248,6 @@ void HWR_DrawMD2(gr_vissprite_t *spr) p.flip = false; HWD.pfnDrawMD2i(buff, curr, durs, tics, next, &p, finalscale, flip, color); - - } } From ffc1d3cb648ff782e6822d046ede84b10e8f2bbf Mon Sep 17 00:00:00 2001 From: MonsterIestyn Date: Tue, 20 Jan 2015 19:42:10 +0000 Subject: [PATCH 042/609] Correcting a most minor math mistake git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8992 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/p_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index 62cbf7b77..342aa0868 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -875,7 +875,7 @@ static boolean PIT_CheckThing(mobj_t *thing) { // Doesn't matter what gravity player's following! Just do your stuff in YOUR direction only if (tmthing->eflags & MFE_VERTICALFLIP - && (tmthing->z + tmthing->height + tmthing->momz > thing->z + && (tmthing->z + tmthing->height + tmthing->momz < thing->z || tmthing->z + tmthing->height + tmthing->momz >= thing->z + thing->height)) ; else if (!(tmthing->eflags & MFE_VERTICALFLIP) From 0dff0d84de7c5674fa93a0a5a85a489f577d9974 Mon Sep 17 00:00:00 2001 From: JTE Date: Thu, 22 Jan 2015 15:38:13 +0000 Subject: [PATCH 043/609] New HD SRB2 icon by VAdaPEga. git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8994 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/sdl/SDL_icon.xpm | 503 +++++++++++++++++++++++++++++++++------- src/sdl/Srb2SDL.ico | Bin 2238 -> 372798 bytes src/sdl12/SDL_icon.xpm | 503 +++++++++++++++++++++++++++++++++------- src/sdl12/Srb2SDL.ico | Bin 2238 -> 372798 bytes src/win32/Srb2win.ico | Bin 6006 -> 372798 bytes src/win32ce/Srb2win.ico | Bin 2238 -> 372798 bytes 6 files changed, 848 insertions(+), 158 deletions(-) diff --git a/src/sdl/SDL_icon.xpm b/src/sdl/SDL_icon.xpm index 70bb02d3c..cf72960df 100644 --- a/src/sdl/SDL_icon.xpm +++ b/src/sdl/SDL_icon.xpm @@ -1,80 +1,425 @@ /* XPM */ -static const char * SDL_icon_xpm[] = { -"32 32 45 1", -" c None", -". c #6B6BFF", -"+ c #3D00B9", -"@ c #4848FF", -"# c #2525FF", -"$ c #310096", -"% c #003196", -"& c #003DB9", -"* c #620096", -"= c #6E6E6E", -"- c #966200", -"; c #250073", -"> c #626262", -", c #FF8F6B", -"' c #FFC66B", -") c #FFAB8E", -"! c #000080", -"~ c #B6B6B6", -"{ c #929292", -"] c #FFD48E", -"^ c #0000B9", -"/ c #565656", -"( c #868686", -"_ c #808080", -": c #C0C0C0", -"< c #DADADA", -"[ c #F2F2F2", -"} c #FFFFFF", -"| c #CECECE", -"1 c #AAAAAA", -"2 c #E6E6E6", -"3 c #000096", -"4 c #AB8EFF", -"5 c #190050", -"6 c #000000", -"7 c #8E8EFF", -"8 c #3E3E3E", -"9 c #7A7A7A", -"0 c #0E0E0E", -"a c #9E9E9E", -"b c #001950", -"c c #C2C2C2", -"d c #323232", -"e c #002573", -"f c #A0A0A4", -" ", -" ", -" ", -" .+@##@. ", -" @@.@#######@ ", -" @@....######### ", -" .. .@.....@+##$%%%&&% ", -" ..@# @@....@+#*=-;%%%%% ", -" ..@#@......@>,')!%%%$ ", -" ~..$#.........{])^#+%/ ", -" +##@.........()^@@@@@_ ", -" $####@........#=#######+ ", -" +######....@@##^#########_ ", -" +#####=:<<:+##############/ ", -"[<=####{<}}}}|###############= ", -" }1###=2}}}}}}.############### ", -" }<3#3~}}}}}}}4################ ", -" }<5#6:}}}}}}}7################/", -" }:6861}}}}}}}.########$$ 9 .@$", -" }:0a6~}}}}}}}@######5b ", -"22cd262}}}}}}2######5b$ ", -" 2>1a}}}}}}}{(*###%be## ", -" 860)1<[22c1)]]+##be### ", -" ~)]]]))))]]]]]=#bb#### ", -" )]]]]]]]]](]]=eb$#### ", -" :]]]]]]]]]'9bbb$##### ", -" ),'''''( >db+### ", -" =##f ", -" { ", -" ", -" ", -" "}; +static char * C:\Repo\srb2\src\sdl\SDL_icon_xpm[] = { +"32 32 390 2", +" c None", +". c #4F4F70", +"+ c #4D4D87", +"@ c #4D4D84", +"# c #4E4E6C", +"$ c #6C6C95", +"% c #5E5EB2", +"& c #6B6BE7", +"* c #7373F9", +"= c #7C7CFF", +"- c #6F70E7", +"; c #494BB2", +"> c #4F4FA3", +", c #6464D4", +"' c #7979F5", +") c #5F5FCA", +"! c #5D5D93", +"~ c #3A3A9F", +"{ c #6060AC", +"] c #777793", +"^ c #5C5CB3", +"/ c #7373EA", +"( c #7A7AFF", +"_ c #7575FF", +": c #7979FF", +"< c #6264DD", +"[ c #47478C", +"} c #564567", +"| c #4647D0", +"1 c #5C5CAE", +"2 c #5E5EFF", +"3 c #2929FF", +"4 c #1D1DFF", +"5 c #1919D1", +"6 c #4F4F90", +"7 c #1E1ECE", +"8 c #5858FF", +"9 c #6767A8", +"0 c #4949A0", +"a c #7070FB", +"b c #7D7DFF", +"c c #7777FF", +"d c #7373FF", +"e c #7272FF", +"f c #7878FF", +"g c #6465D8", +"h c #363886", +"i c #9F7655", +"j c #C89B5C", +"k c #1D1CB7", +"l c #3031B1", +"m c #1919F4", +"n c #1111FF", +"o c #1818FF", +"p c #1B1BFF", +"q c #1C1CFF", +"r c #2626B3", +"s c #1E1EC8", +"t c #1A1AE8", +"u c #24249F", +"v c #2F2FD2", +"w c #7676FF", +"x c #6869E2", +"y c #414290", +"z c #8C6751", +"A c #FCBA68", +"B c #E9BD7D", +"C c #201EB8", +"D c #090AB8", +"E c #1616EB", +"F c #1818FD", +"G c #1414EE", +"H c #1010E1", +"I c #0E0EE2", +"J c #0E0EF4", +"K c #0606B2", +"L c #7A7A89", +"M c #0C0C9A", +"N c #0A0AA7", +"O c #2424E4", +"P c #6669E6", +"Q c #4F4A8F", +"R c #BF853B", +"S c #FFD98D", +"T c #CDAB76", +"U c #1717C4", +"V c #0F10BA", +"W c #0909B6", +"X c #0505C3", +"Y c #0000B6", +"Z c #0000BE", +"` c #0000AD", +" . c #1D1D83", +".. c #63638E", +"+. c #090975", +"@. c #1414F3", +"#. c #5B5BFF", +"$. c #7B7BFF", +"%. c #7070FF", +"&. c #6E6EFF", +"*. c #7172F6", +"=. c #625DAF", +"-. c #BA9E6C", +";. c #887167", +">. c #090DF2", +",. c #1313BE", +"'. c #000085", +"). c #0000AC", +"!. c #0202AA", +"~. c #242488", +"{. c #1414C7", +"]. c #1717FF", +"^. c #5959FF", +"/. c #7F7FFF", +"(. c #7474FF", +"_. c #7171FF", +":. c #8686FF", +"<. c #7574FF", +"[. c #797CFF", +"}. c #5756B8", +"|. c #1C19A4", +"1. c #1617FF", +"2. c #1212BD", +"3. c #040485", +"4. c #0707A4", +"5. c #1B1B71", +"6. c #373797", +"7. c #1616FF", +"8. c #5050FF", +"9. c #8080FF", +"0. c #AAAAFF", +"a. c #AEAEF6", +"b. c #8A8AEF", +"c. c #6969FB", +"d. c #2728FF", +"e. c #1314FF", +"f. c #1919FF", +"g. c #1313E8", +"h. c #1F1FF4", +"i. c #5454FF", +"j. c #6D6DF0", +"k. c #6868B5", +"l. c #0B0BB8", +"m. c #1212C5", +"n. c #1616FC", +"o. c #1515FF", +"p. c #1212FF", +"q. c #2323FF", +"r. c #3636FF", +"s. c #4040FF", +"t. c #4343F9", +"u. c #5D5DB8", +"v. c #7F7F92", +"w. c #878793", +"x. c #4B4B94", +"y. c #0B0CE2", +"z. c #1313FF", +"A. c #4C4CFF", +"B. c #8282FF", +"C. c #7171ED", +"D. c #636394", +"E. c #575785", +"F. c #A9A99C", +"G. c #1414BC", +"H. c #1414FF", +"I. c #0707FD", +"J. c #2525AA", +"K. c #A8A8A4", +"L. c #EBEBE2", +"M. c #F9F9F2", +"N. c #E1E1CC", +"O. c #4D4D9F", +"P. c #0B0BF7", +"Q. c #2121FF", +"R. c #3232FF", +"S. c #5555FF", +"T. c #6161B4", +"U. c #B5B5B2", +"V. c #FFFFF8", +"W. c #4F4F9A", +"X. c #0B0BF5", +"Y. c #1616C5", +"Z. c #A8A8A1", +"`. c #FFFFFC", +" + c #FFFFFF", +".+ c #C0C0C4", +"++ c #1212D4", +"@+ c #4444FF", +"#+ c #6464FF", +"$+ c #8383FF", +"%+ c #6767C3", +"&+ c #E4E4E4", +"*+ c #9494AE", +"=+ c #0808DF", +"-+ c #0D0DF2", +";+ c #61619A", +">+ c #F1F1E0", +",+ c #E8E8DD", +"'+ c #2424BB", +")+ c #1010FF", +"!+ c #3434FF", +"~+ c #6161FF", +"{+ c #6969D2", +"]+ c #EFEFF0", +"^+ c #C2C2BA", +"/+ c #1010B6", +"(+ c #0909AC", +"_+ c #A4A49A", +":+ c #EAEADE", +"<+ c #2525B8", +"[+ c #2F2FFF", +"}+ c #3C3CB5", +"|+ c #EEEEEE", +"1+ c #BBBBAD", +"2+ c #0B0B56", +"3+ c #0B0BFC", +"4+ c #1212EF", +"5+ c #0C0C3E", +"6+ c #919187", +"7+ c #DEDED6", +"8+ c #1F1FC0", +"9+ c #1A1AFF", +"0+ c #1717FA", +"a+ c #1515F8", +"b+ c #1111FC", +"c+ c #494992", +"d+ c #999998", +"e+ c #3E3E3B", +"f+ c #3C3C99", +"g+ c #535397", +"h+ c #5A5A4D", +"i+ c #6F6F70", +"j+ c #BFBFC9", +"k+ c #1111D6", +"l+ c #1515F1", +"m+ c #0F0FE2", +"n+ c #0D0DD9", +"o+ c #0909CD", +"p+ c #0808C7", +"q+ c #0505C7", +"r+ c #0303CB", +"s+ c #0101C0", +"t+ c #0202AF", +"u+ c #0606AC", +"v+ c #121283", +"w+ c #BBBBBB", +"x+ c #BEBEBE", +"y+ c #2F2F2E", +"z+ c #C7C8BB", +"A+ c #D8DAD1", +"B+ c #272828", +"C+ c #929292", +"D+ c #8688C7", +"E+ c #0506F6", +"F+ c #1616F5", +"G+ c #0B0BD3", +"H+ c #0202B6", +"I+ c #0000AF", +"J+ c #0000B4", +"K+ c #0000BD", +"L+ c #0000BB", +"M+ c #00009E", +"N+ c #2C2C7E", +"O+ c #6A6A8B", +"P+ c #959595", +"Q+ c #F0F0F1", +"R+ c #E1E1E1", +"S+ c #8C8E90", +"T+ c #BEBEBF", +"U+ c #C9C7C5", +"V+ c #939699", +"W+ c #E7EAED", +"X+ c #CBCBC7", +"Y+ c #413B9B", +"Z+ c #0607DD", +"`+ c #0C0CE2", +" @ c #0303B9", +".@ c #0000A8", +"+@ c #181888", +"@@ c #6A6A6A", +"#@ c #626263", +"$@ c #4B4B4C", +"%@ c #3E3B36", +"&@ c #9B805C", +"*@ c #D9B07D", +"=@ c #C9AE89", +"-@ c #B9AF9E", +";@ c #C7C5C4", +">@ c #CBCCCF", +",@ c #C7C6C6", +"'@ c #AEA59A", +")@ c #B69974", +"!@ c #D8B87F", +"~@ c #9B8272", +"{@ c #0E0B9B", +"]@ c #0000B7", +"^@ c #0000B8", +"/@ c #000082", +"(@ c #00007A", +"_@ c #636379", +":@ c #62533E", +"<@ c #B59B6C", +"[@ c #DEB07B", +"}@ c #FECC90", +"|@ c #FFCE92", +"1@ c #FEC98C", +"2@ c #F1BD82", +"3@ c #D1A979", +"4@ c #BC9E73", +"5@ c #CCA777", +"6@ c #EAB980", +"7@ c #FFCD90", +"8@ c #FFD595", +"9@ c #FDD782", +"0@ c #413678", +"a@ c #0000AE", +"b@ c #000077", +"c@ c #010193", +"d@ c #0C0CE4", +"e@ c #38389E", +"f@ c #EEC585", +"g@ c #FFDA9D", +"h@ c #FFC992", +"i@ c #FFC88F", +"j@ c #FFC990", +"k@ c #FFCE93", +"l@ c #FFD094", +"m@ c #FFCC92", +"n@ c #C9A174", +"o@ c #EDBD88", +"p@ c #FAD287", +"q@ c #3A2F7F", +"r@ c #0000BA", +"s@ c #0000B0", +"t@ c #0101B2", +"u@ c #1111ED", +"v@ c #1919C1", +"w@ c #95887C", +"x@ c #DCAC6E", +"y@ c #FFD393", +"z@ c #FFCD94", +"A@ c #FFCA93", +"B@ c #FFC991", +"C@ c #FFC78E", +"D@ c #FFCB91", +"E@ c #E0B581", +"F@ c #BB9A6F", +"G@ c #FFDC97", +"H@ c #C1A173", +"I@ c #0E0B9A", +"J@ c #0000B5", +"K@ c #0101B6", +"L@ c #1010E0", +"M@ c #1616EC", +"N@ c #A68156", +"O@ c #E7AC6B", +"P@ c #FFC582", +"Q@ c #FFCF8F", +"R@ c #FFD195", +"S@ c #FFD296", +"T@ c #FFD396", +"U@ c #FFD193", +"V@ c #FFD28F", +"W@ c #D2A96B", +"X@ c #2F2482", +"Y@ c #0000C1", +"Z@ c #0000C0", +"`@ c #0000BF", +" # c #0101BF", +".# c #1212F0", +"+# c #767698", +"@# c #9C866E", +"## c #A9865D", +"$# c #C0915D", +"%# c #C89760", +"&# c #C29360", +"*# c #AD8A61", +"=# c #9D8971", +"-# c #7F7A7A", +";# c #70708F", +"># c #6F6F91", +",# c #575788", +"'# c #464687", +")# c #2F2F87", +"!# c #15158F", +"~# c #0101A8", +"{# c #1313FB", +"]# c #57579F", +"^# c #343487", +"/# c #434388", +" ", +" ", +" ", +" . + @ # ", +" $ % & * = - ; > , ' ) ! ", +" ~ { ] ^ / = ( _ : < [ } | 1 2 3 4 5 6 ", +" 7 8 9 0 a b c d e f g h i j k l m n o p q r ", +" s t u v _ f d d d w x y z A B C D E F G H I J K L ", +" M N O _ c e d d d _ P Q R S T U V W X Y Z ` ... ", +" +.@.#.$.d d d d %.&._ *.=.-.;.>.,.'.).!.~. ", +" {.].^./.(.d d _.$.:._ <.[.}.|.1.2.3.4.5. ", +" 6.7.7.4 8.e : w 9.0.a.b.c.2 d.e.f.g.h.i.j.k. ", +" l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.o o z.A.B./.b C.D. ", +" E.F.G.].o H.z.I.J.K.L.M.N.O.P.o o o Q.R.S._.b B.T. ", +" U.V.W.X.f.f.7.Y.Z.`. + + +.+++].o o o.n z.q.@+#+$+%+ ", +" &+ +*+=+].o -+;+>+ + + + +,+'+H.o o o o o H.)+o !+~+{+ ", +" ]+ +^+/+H.o.(+_+ + + + + +:+<+z.o o o o o o o 7.n H.[+}+ ", +" |+ +1+2+3+4+5+6+ + + + + +7+8+H.o o f.9+f.9+f.F 0+a+b+o.c+ ", +" &+ +d+e+f+g+h+i+ + + + + +j+k+].f.9+l+m+n+o+p+q+r+s+t+u+v+ ", +" w+ +x+y+z+A+B+C+ + + + + +D+E+9+F+G+H+I+J+K+L+M+N+O+ ", +" P+Q+R+S+T+U+V+W+ + + + +X+Y+Z+`+ @I+J+Z .@+@E. ", +" @@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@I+/@(@_@ ", +" :@<@[@}@|@1@2@3@4@5@6@7@8@9@0@L+a@b@c@d@e@ ", +" f@g@h@i@i@j@k@l@|@m@n@o@p@q@r@s@t@u@p v@ ", +" w@x@y@z@A@B@i@C@D@E@F@G@H@I@L+J@K@L@p M@ ", +" N@O@P@Q@R@S@T@U@V@W@X@Y@Z@Y@`@ #.#p +# ", +" @###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]# ", +" ^#/# ", +" ", +" ", +" ", +" "}; diff --git a/src/sdl/Srb2SDL.ico b/src/sdl/Srb2SDL.ico index 5ab791af37f815c0164e6053c34879ecf0c3fff0..700276fd4b9ac2810a6981eb054921f3708c702b 100644 GIT binary patch literal 372798 zcmeEP1$-1o7r)>XikBiSgit6HJ_^O9g+iglH3TORAjN|QCj@swaCdiiD-OkJp=gof z+TxJ+{r{VrusQB7cM%}4;rE!mmD!nR^XAQ)w3ybJQ?U-7qCBeZ23J|GK2mfXdDt`I@Z>$TT6B6(xo3_wyviJ&Fcf^ z0}g}sk}8!PPLaZ(zmEPvK|!W}{`n`><;$1T-nnxp?aGxa%atrya#_WS6|KV0KmWX} zQ>RY-dGD1gSJGa(bSdrQ$B*B7T-)v2w?Dmk^JdyDTecK0RjSmos#U8lD^jG$o`j%v zQb1$CBEUAl)|fHn>F1w|q)8)(k|#Il5BeWJemrZhUcG$#^y$;>(@#Hrh+1`-xtFKOHEA-3VI{Lnp8rvDZxGhnOKo_ka3F1#;w=HImm zbr(L6N+W-l(tS5d*@4@oWRDf{dA1^w{<{*A>6@IVy}iB1?cKY#_~y-<9R}XttXZ?s zUwrY!>CBlkhd|b>Sx+ZVp8RoE&=Fz1@+}}cpb%g@U>smIU?<==zy|Ygo?8Yul^{Vd z?ViR!%i4jvEqk^z%Ne7@EM%`=;5Rxs)0X~3kfG!q5nce}|W(LalMl-BMNqXyn z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b_H7vGHxZg>T~P_zM1o*GD?|7QTuv;dA&j{)N|vc`d2okMZ01 zHGBg9(gIn!gKy!h_!6F#)@l5|FOa2ed>e1!oA^4O#d%?YEEb|h9248b8j&DgS|HbT z<>ux_uCA`+^72wHE-vKk>`W?^ikzOFO1WH?qoX6q=kv0&vm=>IMz*%LB$Z0Z%F2o) zlSx@zT$K6wd6}A;;*I!!%3$W(>-HTd+7G*&p;F)E<8NlYa(8<>GZ;M63h()5Y zu*}{Ui^VKirJmC9FdMsz#fBe({O%<0c=vZ(yS*>nuI)m&bnydu zH_Z3DBlmVXD1*DVqzWDg(+qp;N;k-Ny_uED6|?tYzCRt+x8jT^FhdZgB|06I2XV)F zBgiY2%?|GeL&MBE)4iNR1!XVHhv%>Mbnl&d=Zy2ehW+80kuL4w_y#BQkMpj4>9H3| z4SL=T{c(4A8giSiw;9Y3?e(HTGt8>5-c$6)o%b_$hRO5oPtvb~hxE70H1?d|4T|zF zhnZ}U!33t4^2=R(-}K6Ou!v(ASrulDK`g$nb_@QMgX!-L!wkopqc^kh?+S%NHpp>g zxT%Jwe*tq>y&b;(jeMaHf{|f(TWth)fKXYo@83^A2!kmm54RWgKb;Zd{Z-~u@AHf&LuPdK7(rJ^eQjQPkQ1 diff --git a/src/sdl12/SDL_icon.xpm b/src/sdl12/SDL_icon.xpm index 70bb02d3c..cf72960df 100644 --- a/src/sdl12/SDL_icon.xpm +++ b/src/sdl12/SDL_icon.xpm @@ -1,80 +1,425 @@ /* XPM */ -static const char * SDL_icon_xpm[] = { -"32 32 45 1", -" c None", -". c #6B6BFF", -"+ c #3D00B9", -"@ c #4848FF", -"# c #2525FF", -"$ c #310096", -"% c #003196", -"& c #003DB9", -"* c #620096", -"= c #6E6E6E", -"- c #966200", -"; c #250073", -"> c #626262", -", c #FF8F6B", -"' c #FFC66B", -") c #FFAB8E", -"! c #000080", -"~ c #B6B6B6", -"{ c #929292", -"] c #FFD48E", -"^ c #0000B9", -"/ c #565656", -"( c #868686", -"_ c #808080", -": c #C0C0C0", -"< c #DADADA", -"[ c #F2F2F2", -"} c #FFFFFF", -"| c #CECECE", -"1 c #AAAAAA", -"2 c #E6E6E6", -"3 c #000096", -"4 c #AB8EFF", -"5 c #190050", -"6 c #000000", -"7 c #8E8EFF", -"8 c #3E3E3E", -"9 c #7A7A7A", -"0 c #0E0E0E", -"a c #9E9E9E", -"b c #001950", -"c c #C2C2C2", -"d c #323232", -"e c #002573", -"f c #A0A0A4", -" ", -" ", -" ", -" .+@##@. ", -" @@.@#######@ ", -" @@....######### ", -" .. .@.....@+##$%%%&&% ", -" ..@# @@....@+#*=-;%%%%% ", -" ..@#@......@>,')!%%%$ ", -" ~..$#.........{])^#+%/ ", -" +##@.........()^@@@@@_ ", -" $####@........#=#######+ ", -" +######....@@##^#########_ ", -" +#####=:<<:+##############/ ", -"[<=####{<}}}}|###############= ", -" }1###=2}}}}}}.############### ", -" }<3#3~}}}}}}}4################ ", -" }<5#6:}}}}}}}7################/", -" }:6861}}}}}}}.########$$ 9 .@$", -" }:0a6~}}}}}}}@######5b ", -"22cd262}}}}}}2######5b$ ", -" 2>1a}}}}}}}{(*###%be## ", -" 860)1<[22c1)]]+##be### ", -" ~)]]]))))]]]]]=#bb#### ", -" )]]]]]]]]](]]=eb$#### ", -" :]]]]]]]]]'9bbb$##### ", -" ),'''''( >db+### ", -" =##f ", -" { ", -" ", -" ", -" "}; +static char * C:\Repo\srb2\src\sdl\SDL_icon_xpm[] = { +"32 32 390 2", +" c None", +". c #4F4F70", +"+ c #4D4D87", +"@ c #4D4D84", +"# c #4E4E6C", +"$ c #6C6C95", +"% c #5E5EB2", +"& c #6B6BE7", +"* c #7373F9", +"= c #7C7CFF", +"- c #6F70E7", +"; c #494BB2", +"> c #4F4FA3", +", c #6464D4", +"' c #7979F5", +") c #5F5FCA", +"! c #5D5D93", +"~ c #3A3A9F", +"{ c #6060AC", +"] c #777793", +"^ c #5C5CB3", +"/ c #7373EA", +"( c #7A7AFF", +"_ c #7575FF", +": c #7979FF", +"< c #6264DD", +"[ c #47478C", +"} c #564567", +"| c #4647D0", +"1 c #5C5CAE", +"2 c #5E5EFF", +"3 c #2929FF", +"4 c #1D1DFF", +"5 c #1919D1", +"6 c #4F4F90", +"7 c #1E1ECE", +"8 c #5858FF", +"9 c #6767A8", +"0 c #4949A0", +"a c #7070FB", +"b c #7D7DFF", +"c c #7777FF", +"d c #7373FF", +"e c #7272FF", +"f c #7878FF", +"g c #6465D8", +"h c #363886", +"i c #9F7655", +"j c #C89B5C", +"k c #1D1CB7", +"l c #3031B1", +"m c #1919F4", +"n c #1111FF", +"o c #1818FF", +"p c #1B1BFF", +"q c #1C1CFF", +"r c #2626B3", +"s c #1E1EC8", +"t c #1A1AE8", +"u c #24249F", +"v c #2F2FD2", +"w c #7676FF", +"x c #6869E2", +"y c #414290", +"z c #8C6751", +"A c #FCBA68", +"B c #E9BD7D", +"C c #201EB8", +"D c #090AB8", +"E c #1616EB", +"F c #1818FD", +"G c #1414EE", +"H c #1010E1", +"I c #0E0EE2", +"J c #0E0EF4", +"K c #0606B2", +"L c #7A7A89", +"M c #0C0C9A", +"N c #0A0AA7", +"O c #2424E4", +"P c #6669E6", +"Q c #4F4A8F", +"R c #BF853B", +"S c #FFD98D", +"T c #CDAB76", +"U c #1717C4", +"V c #0F10BA", +"W c #0909B6", +"X c #0505C3", +"Y c #0000B6", +"Z c #0000BE", +"` c #0000AD", +" . c #1D1D83", +".. c #63638E", +"+. c #090975", +"@. c #1414F3", +"#. c #5B5BFF", +"$. c #7B7BFF", +"%. c #7070FF", +"&. c #6E6EFF", +"*. c #7172F6", +"=. c #625DAF", +"-. c #BA9E6C", +";. c #887167", +">. c #090DF2", +",. c #1313BE", +"'. c #000085", +"). c #0000AC", +"!. c #0202AA", +"~. c #242488", +"{. c #1414C7", +"]. c #1717FF", +"^. c #5959FF", +"/. c #7F7FFF", +"(. c #7474FF", +"_. c #7171FF", +":. c #8686FF", +"<. c #7574FF", +"[. c #797CFF", +"}. c #5756B8", +"|. c #1C19A4", +"1. c #1617FF", +"2. c #1212BD", +"3. c #040485", +"4. c #0707A4", +"5. c #1B1B71", +"6. c #373797", +"7. c #1616FF", +"8. c #5050FF", +"9. c #8080FF", +"0. c #AAAAFF", +"a. c #AEAEF6", +"b. c #8A8AEF", +"c. c #6969FB", +"d. c #2728FF", +"e. c #1314FF", +"f. c #1919FF", +"g. c #1313E8", +"h. c #1F1FF4", +"i. c #5454FF", +"j. c #6D6DF0", +"k. c #6868B5", +"l. c #0B0BB8", +"m. c #1212C5", +"n. c #1616FC", +"o. c #1515FF", +"p. c #1212FF", +"q. c #2323FF", +"r. c #3636FF", +"s. c #4040FF", +"t. c #4343F9", +"u. c #5D5DB8", +"v. c #7F7F92", +"w. c #878793", +"x. c #4B4B94", +"y. c #0B0CE2", +"z. c #1313FF", +"A. c #4C4CFF", +"B. c #8282FF", +"C. c #7171ED", +"D. c #636394", +"E. c #575785", +"F. c #A9A99C", +"G. c #1414BC", +"H. c #1414FF", +"I. c #0707FD", +"J. c #2525AA", +"K. c #A8A8A4", +"L. c #EBEBE2", +"M. c #F9F9F2", +"N. c #E1E1CC", +"O. c #4D4D9F", +"P. c #0B0BF7", +"Q. c #2121FF", +"R. c #3232FF", +"S. c #5555FF", +"T. c #6161B4", +"U. c #B5B5B2", +"V. c #FFFFF8", +"W. c #4F4F9A", +"X. c #0B0BF5", +"Y. c #1616C5", +"Z. c #A8A8A1", +"`. c #FFFFFC", +" + c #FFFFFF", +".+ c #C0C0C4", +"++ c #1212D4", +"@+ c #4444FF", +"#+ c #6464FF", +"$+ c #8383FF", +"%+ c #6767C3", +"&+ c #E4E4E4", +"*+ c #9494AE", +"=+ c #0808DF", +"-+ c #0D0DF2", +";+ c #61619A", +">+ c #F1F1E0", +",+ c #E8E8DD", +"'+ c #2424BB", +")+ c #1010FF", +"!+ c #3434FF", +"~+ c #6161FF", +"{+ c #6969D2", +"]+ c #EFEFF0", +"^+ c #C2C2BA", +"/+ c #1010B6", +"(+ c #0909AC", +"_+ c #A4A49A", +":+ c #EAEADE", +"<+ c #2525B8", +"[+ c #2F2FFF", +"}+ c #3C3CB5", +"|+ c #EEEEEE", +"1+ c #BBBBAD", +"2+ c #0B0B56", +"3+ c #0B0BFC", +"4+ c #1212EF", +"5+ c #0C0C3E", +"6+ c #919187", +"7+ c #DEDED6", +"8+ c #1F1FC0", +"9+ c #1A1AFF", +"0+ c #1717FA", +"a+ c #1515F8", +"b+ c #1111FC", +"c+ c #494992", +"d+ c #999998", +"e+ c #3E3E3B", +"f+ c #3C3C99", +"g+ c #535397", +"h+ c #5A5A4D", +"i+ c #6F6F70", +"j+ c #BFBFC9", +"k+ c #1111D6", +"l+ c #1515F1", +"m+ c #0F0FE2", +"n+ c #0D0DD9", +"o+ c #0909CD", +"p+ c #0808C7", +"q+ c #0505C7", +"r+ c #0303CB", +"s+ c #0101C0", +"t+ c #0202AF", +"u+ c #0606AC", +"v+ c #121283", +"w+ c #BBBBBB", +"x+ c #BEBEBE", +"y+ c #2F2F2E", +"z+ c #C7C8BB", +"A+ c #D8DAD1", +"B+ c #272828", +"C+ c #929292", +"D+ c #8688C7", +"E+ c #0506F6", +"F+ c #1616F5", +"G+ c #0B0BD3", +"H+ c #0202B6", +"I+ c #0000AF", +"J+ c #0000B4", +"K+ c #0000BD", +"L+ c #0000BB", +"M+ c #00009E", +"N+ c #2C2C7E", +"O+ c #6A6A8B", +"P+ c #959595", +"Q+ c #F0F0F1", +"R+ c #E1E1E1", +"S+ c #8C8E90", +"T+ c #BEBEBF", +"U+ c #C9C7C5", +"V+ c #939699", +"W+ c #E7EAED", +"X+ c #CBCBC7", +"Y+ c #413B9B", +"Z+ c #0607DD", +"`+ c #0C0CE2", +" @ c #0303B9", +".@ c #0000A8", +"+@ c #181888", +"@@ c #6A6A6A", +"#@ c #626263", +"$@ c #4B4B4C", +"%@ c #3E3B36", +"&@ c #9B805C", +"*@ c #D9B07D", +"=@ c #C9AE89", +"-@ c #B9AF9E", +";@ c #C7C5C4", +">@ c #CBCCCF", +",@ c #C7C6C6", +"'@ c #AEA59A", +")@ c #B69974", +"!@ c #D8B87F", +"~@ c #9B8272", +"{@ c #0E0B9B", +"]@ c #0000B7", +"^@ c #0000B8", +"/@ c #000082", +"(@ c #00007A", +"_@ c #636379", +":@ c #62533E", +"<@ c #B59B6C", +"[@ c #DEB07B", +"}@ c #FECC90", +"|@ c #FFCE92", +"1@ c #FEC98C", +"2@ c #F1BD82", +"3@ c #D1A979", +"4@ c #BC9E73", +"5@ c #CCA777", +"6@ c #EAB980", +"7@ c #FFCD90", +"8@ c #FFD595", +"9@ c #FDD782", +"0@ c #413678", +"a@ c #0000AE", +"b@ c #000077", +"c@ c #010193", +"d@ c #0C0CE4", +"e@ c #38389E", +"f@ c #EEC585", +"g@ c #FFDA9D", +"h@ c #FFC992", +"i@ c #FFC88F", +"j@ c #FFC990", +"k@ c #FFCE93", +"l@ c #FFD094", +"m@ c #FFCC92", +"n@ c #C9A174", +"o@ c #EDBD88", +"p@ c #FAD287", +"q@ c #3A2F7F", +"r@ c #0000BA", +"s@ c #0000B0", +"t@ c #0101B2", +"u@ c #1111ED", +"v@ c #1919C1", +"w@ c #95887C", +"x@ c #DCAC6E", +"y@ c #FFD393", +"z@ c #FFCD94", +"A@ c #FFCA93", +"B@ c #FFC991", +"C@ c #FFC78E", +"D@ c #FFCB91", +"E@ c #E0B581", +"F@ c #BB9A6F", +"G@ c #FFDC97", +"H@ c #C1A173", +"I@ c #0E0B9A", +"J@ c #0000B5", +"K@ c #0101B6", +"L@ c #1010E0", +"M@ c #1616EC", +"N@ c #A68156", +"O@ c #E7AC6B", +"P@ c #FFC582", +"Q@ c #FFCF8F", +"R@ c #FFD195", +"S@ c #FFD296", +"T@ c #FFD396", +"U@ c #FFD193", +"V@ c #FFD28F", +"W@ c #D2A96B", +"X@ c #2F2482", +"Y@ c #0000C1", +"Z@ c #0000C0", +"`@ c #0000BF", +" # c #0101BF", +".# c #1212F0", +"+# c #767698", +"@# c #9C866E", +"## c #A9865D", +"$# c #C0915D", +"%# c #C89760", +"&# c #C29360", +"*# c #AD8A61", +"=# c #9D8971", +"-# c #7F7A7A", +";# c #70708F", +"># c #6F6F91", +",# c #575788", +"'# c #464687", +")# c #2F2F87", +"!# c #15158F", +"~# c #0101A8", +"{# c #1313FB", +"]# c #57579F", +"^# c #343487", +"/# c #434388", +" ", +" ", +" ", +" . + @ # ", +" $ % & * = - ; > , ' ) ! ", +" ~ { ] ^ / = ( _ : < [ } | 1 2 3 4 5 6 ", +" 7 8 9 0 a b c d e f g h i j k l m n o p q r ", +" s t u v _ f d d d w x y z A B C D E F G H I J K L ", +" M N O _ c e d d d _ P Q R S T U V W X Y Z ` ... ", +" +.@.#.$.d d d d %.&._ *.=.-.;.>.,.'.).!.~. ", +" {.].^./.(.d d _.$.:._ <.[.}.|.1.2.3.4.5. ", +" 6.7.7.4 8.e : w 9.0.a.b.c.2 d.e.f.g.h.i.j.k. ", +" l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.o o z.A.B./.b C.D. ", +" E.F.G.].o H.z.I.J.K.L.M.N.O.P.o o o Q.R.S._.b B.T. ", +" U.V.W.X.f.f.7.Y.Z.`. + + +.+++].o o o.n z.q.@+#+$+%+ ", +" &+ +*+=+].o -+;+>+ + + + +,+'+H.o o o o o H.)+o !+~+{+ ", +" ]+ +^+/+H.o.(+_+ + + + + +:+<+z.o o o o o o o 7.n H.[+}+ ", +" |+ +1+2+3+4+5+6+ + + + + +7+8+H.o o f.9+f.9+f.F 0+a+b+o.c+ ", +" &+ +d+e+f+g+h+i+ + + + + +j+k+].f.9+l+m+n+o+p+q+r+s+t+u+v+ ", +" w+ +x+y+z+A+B+C+ + + + + +D+E+9+F+G+H+I+J+K+L+M+N+O+ ", +" P+Q+R+S+T+U+V+W+ + + + +X+Y+Z+`+ @I+J+Z .@+@E. ", +" @@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@I+/@(@_@ ", +" :@<@[@}@|@1@2@3@4@5@6@7@8@9@0@L+a@b@c@d@e@ ", +" f@g@h@i@i@j@k@l@|@m@n@o@p@q@r@s@t@u@p v@ ", +" w@x@y@z@A@B@i@C@D@E@F@G@H@I@L+J@K@L@p M@ ", +" N@O@P@Q@R@S@T@U@V@W@X@Y@Z@Y@`@ #.#p +# ", +" @###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]# ", +" ^#/# ", +" ", +" ", +" ", +" "}; diff --git a/src/sdl12/Srb2SDL.ico b/src/sdl12/Srb2SDL.ico index 5ab791af37f815c0164e6053c34879ecf0c3fff0..700276fd4b9ac2810a6981eb054921f3708c702b 100644 GIT binary patch literal 372798 zcmeEP1$-1o7r)>XikBiSgit6HJ_^O9g+iglH3TORAjN|QCj@swaCdiiD-OkJp=gof z+TxJ+{r{VrusQB7cM%}4;rE!mmD!nR^XAQ)w3ybJQ?U-7qCBeZ23J|GK2mfXdDt`I@Z>$TT6B6(xo3_wyviJ&Fcf^ z0}g}sk}8!PPLaZ(zmEPvK|!W}{`n`><;$1T-nnxp?aGxa%atrya#_WS6|KV0KmWX} zQ>RY-dGD1gSJGa(bSdrQ$B*B7T-)v2w?Dmk^JdyDTecK0RjSmos#U8lD^jG$o`j%v zQb1$CBEUAl)|fHn>F1w|q)8)(k|#Il5BeWJemrZhUcG$#^y$;>(@#Hrh+1`-xtFKOHEA-3VI{Lnp8rvDZxGhnOKo_ka3F1#;w=HImm zbr(L6N+W-l(tS5d*@4@oWRDf{dA1^w{<{*A>6@IVy}iB1?cKY#_~y-<9R}XttXZ?s zUwrY!>CBlkhd|b>Sx+ZVp8RoE&=Fz1@+}}cpb%g@U>smIU?<==zy|Ygo?8Yul^{Vd z?ViR!%i4jvEqk^z%Ne7@EM%`=;5Rxs)0X~3kfG!q5nce}|W(LalMl-BMNqXyn zwAbVwI-ldd2B5z;=60NE{Wq>Rs1~vDjtw=+UhpN0(y8j{72Gv09R=RuA!* zdO>PTza(`RK(6QAmTFVZOSQ@8q&iA>l+701kTxssiqG;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CH 044/609] gametype command now prints gametype NAMES instead of numbers. Even prints "Single player" when appropriate! git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8997 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/d_netcmd.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 266161c7c..10605f20f 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3193,7 +3193,27 @@ static void Command_ModDetails_f(void) // static void Command_ShowGametype_f(void) { - CONS_Printf(M_GetText("Current gametype is %d\n"), gametype); + INT32 j; + const char *gametypestr = NULL; + + if (!(netgame || multiplayer)) // print "Single player" instead of "Co-op" + { + CONS_Printf(M_GetText("Current gametype is %s\n"), M_GetText("Single player")); + return; + } + // find name string for current gametype + for (j = 0; gametype_cons_t[j].strvalue; j++) + { + if (gametype_cons_t[j].value == gametype) + { + gametypestr = gametype_cons_t[j].strvalue; + break; + } + } + if (gametypestr) + CONS_Printf(M_GetText("Current gametype is %s\n"), gametypestr); + else // string for current gametype was not found above (should never happen) + CONS_Printf(M_GetText("Unknown gametype set (%d)\n"), gametype); } /** Plays the intro. From 092134ad0c664e30180dc360338c2d33cad4dd78 Mon Sep 17 00:00:00 2001 From: JTE Date: Thu, 22 Jan 2015 19:02:38 +0000 Subject: [PATCH 045/609] Title screen cheat "devmode". Access the benefits of -debug, console devmode, and a complete gamedata.dat (all secrets unlocked) all in one go. Moved "#if 0" and "#if 1" to "#ifdef DEVMODE" so the existance of this cheat and MD5 validation and all that can be toggled in one place too. git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8998 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/d_main.c | 6 +++--- src/doomdef.h | 3 ++- src/m_cheat.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index a959a8632..9d0afab81 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -943,9 +943,9 @@ void D_SRB2Main(void) #endif #if defined (_WIN32_WCE) //|| defined (_DEBUG) || defined (GP2X) - devparm = !M_CheckParm("-nodebug"); + devparm = M_CheckParm("-nodebug") == 0; #else - devparm = M_CheckParm("-debug"); + devparm = M_CheckParm("-debug") != 0; #endif // for dedicated server @@ -1118,7 +1118,7 @@ void D_SRB2Main(void) #endif D_CleanFile(); -#if 1 // md5s last updated 12/14/14 +#ifndef DEVMODE // md5s last updated 12/14/14 // Check MD5s of autoloaded files W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad diff --git a/src/doomdef.h b/src/doomdef.h index 4a6d6e576..d07e50366 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -138,7 +138,8 @@ extern FILE *logstream; #endif -#if 0 +//#define DEVMODE // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 +#ifdef DEVMODE #define VERSION 0 // Game version #define SUBVERSION 0 // more precise version number #define VERSIONSTRING "Trunk" diff --git a/src/m_cheat.c b/src/m_cheat.c index 8cea4c6ae..2fcbe165f 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -91,6 +91,33 @@ static UINT8 cheatf_warp(void) return 1; } +#ifdef DEVMODE +static UINT8 cheatf_devmode(void) +{ + UINT8 i; + + if (modifiedgame) + return 0; + + if (menuactive && currentMenu != &MainDef) + return 0; // Only on the main menu! + + S_StartSound(0, sfx_itemup); + + // Just unlock all the things and turn on -debug and console devmode. + G_SetGameModified(false); + for (i = 0; i < MAXUNLOCKABLES; i++) + unlockables[i].unlocked = true; + devparm = TRUE; + cv_debug |= 0x8000; + + // Refresh secrets menu existing. + M_ClearMenus(true); + M_StartControlPanel(); + return 1; +} +#endif + static cheatseq_t cheat_ultimate = { 0, cheatf_ultimate, { SCRAMBLE('u'), SCRAMBLE('l'), SCRAMBLE('t'), SCRAMBLE('i'), SCRAMBLE('m'), SCRAMBLE('a'), SCRAMBLE('t'), SCRAMBLE('e'), 0xff } @@ -115,6 +142,14 @@ static cheatseq_t cheat_warp_joy = { SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_UPARROW), SCRAMBLE(KEY_ENTER), 0xff } }; + +#ifdef DEVMODE +static cheatseq_t cheat_devmode = { + 0, cheatf_devmode, + { SCRAMBLE('d'), SCRAMBLE('e'), SCRAMBLE('v'), SCRAMBLE('m'), SCRAMBLE('o'), SCRAMBLE('d'), SCRAMBLE('e'), 0xff } +}; +#endif + // ========================================================================== // CHEAT SEQUENCE PACKAGE // ========================================================================== @@ -221,6 +256,9 @@ boolean cht_Responder(event_t *ev) ret += cht_CheckCheat(&cheat_ultimate_joy, (char)ch); ret += cht_CheckCheat(&cheat_warp, (char)ch); ret += cht_CheckCheat(&cheat_warp_joy, (char)ch); +#ifdef DEVMODE + ret += cht_CheckCheat(&cheat_devmode, (char)ch); +#endif return (ret != 0); } From 8d7b5941a842f609733c269ccff283f3369552ff Mon Sep 17 00:00:00 2001 From: JTE Date: Thu, 22 Jan 2015 19:02:45 +0000 Subject: [PATCH 046/609] Changed super colors to make them pulse instead of flash. Removed alt. supercolors from replay ghost stuff, because that's stupid. :/ git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@8999 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/g_game.c | 18 ++++-------------- src/p_user.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 931388d87..917a86165 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4329,20 +4329,10 @@ void G_GhostTicker(void) switch(g->color) { case GHC_SUPER: // Super Sonic (P_DoSuperStuff) - // Yousa yellow now! - g->mo->color = SKINCOLOR_SUPER1 + (leveltime/2) % 5; - if (g->mo->skin) - switch (((skin_t*)g->mo->skin)-skins) - { - case 1: // Golden orange supertails. - g->mo->color = SKINCOLOR_TSUPER1 + (leveltime/2) % 5; - break; - case 2: // Pink superknux. - g->mo->color = SKINCOLOR_KSUPER1 + (leveltime/2) % 5; - break; - default: - break; - } + if (leveltime % 9 < 5) + g->mo->color = SKINCOLOR_SUPER1 + leveltime % 9; + else + g->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9; break; case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer) g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS); diff --git a/src/p_user.c b/src/p_user.c index 3d77069ac..45e661428 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3385,13 +3385,22 @@ static void P_DoSuperStuff(player_t *player) switch (player->skin) { case 1: // Golden orange supertails. - player->mo->color = SKINCOLOR_TSUPER1 + (leveltime/2) % 5; + if (leveltime % 9 < 5) + player->mo->color = SKINCOLOR_TSUPER1 + leveltime % 9; + else + player->mo->color = SKINCOLOR_TSUPER1 + 9 - leveltime % 9; break; case 2: // Pink superknux. - player->mo->color = SKINCOLOR_KSUPER1 + (leveltime/2) % 5; + if (leveltime % 9 < 5) + player->mo->color = SKINCOLOR_KSUPER1 + leveltime % 9; + else + player->mo->color = SKINCOLOR_KSUPER1 + 9 - leveltime % 9; break; default: // Yousa yellow now! - player->mo->color = SKINCOLOR_SUPER1 + (leveltime/2) % 5; + if (leveltime % 9 < 5) + player->mo->color = SKINCOLOR_SUPER1 + leveltime % 9; + else + player->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9; break; } From c1bfde002779e1f67b40e18abb4cfb525d34c69e Mon Sep 17 00:00:00 2001 From: JTE Date: Thu, 22 Jan 2015 19:36:17 +0000 Subject: [PATCH 047/609] Fixed WGL code "device mode" breaking. The devil is in the details. git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9001 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/d_main.c | 2 +- src/doomdef.h | 4 ++-- src/m_cheat.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 9d0afab81..61255e272 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1118,7 +1118,7 @@ void D_SRB2Main(void) #endif D_CleanFile(); -#ifndef DEVMODE // md5s last updated 12/14/14 +#ifndef DEVELOP // md5s last updated 12/14/14 // Check MD5s of autoloaded files W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad diff --git a/src/doomdef.h b/src/doomdef.h index d07e50366..3cea21ffc 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -138,8 +138,8 @@ extern FILE *logstream; #endif -//#define DEVMODE // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 -#ifdef DEVMODE +//#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 +#ifdef DEVELOP #define VERSION 0 // Game version #define SUBVERSION 0 // more precise version number #define VERSIONSTRING "Trunk" diff --git a/src/m_cheat.c b/src/m_cheat.c index 2fcbe165f..bc32e6cfa 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -91,7 +91,7 @@ static UINT8 cheatf_warp(void) return 1; } -#ifdef DEVMODE +#ifdef DEVELOP static UINT8 cheatf_devmode(void) { UINT8 i; @@ -143,7 +143,7 @@ static cheatseq_t cheat_warp_joy = { SCRAMBLE(KEY_ENTER), 0xff } }; -#ifdef DEVMODE +#ifdef DEVELOP static cheatseq_t cheat_devmode = { 0, cheatf_devmode, { SCRAMBLE('d'), SCRAMBLE('e'), SCRAMBLE('v'), SCRAMBLE('m'), SCRAMBLE('o'), SCRAMBLE('d'), SCRAMBLE('e'), 0xff } @@ -256,7 +256,7 @@ boolean cht_Responder(event_t *ev) ret += cht_CheckCheat(&cheat_ultimate_joy, (char)ch); ret += cht_CheckCheat(&cheat_warp, (char)ch); ret += cht_CheckCheat(&cheat_warp_joy, (char)ch); -#ifdef DEVMODE +#ifdef DEVELOP ret += cht_CheckCheat(&cheat_devmode, (char)ch); #endif return (ret != 0); From 7964f3b044e6a21db8a78d74410cbdf3915531c6 Mon Sep 17 00:00:00 2001 From: JTE Date: Fri, 23 Jan 2015 01:25:08 +0000 Subject: [PATCH 048/609] Removed the need to add "Status = 1" to all new Character select entries for it to become active. git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9002 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/dehacked.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dehacked.c b/src/dehacked.c index a332da5df..8576d51f2 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -473,6 +473,7 @@ static void readPlayer(MYFILE *f, INT32 num) if (!slotfound && (slotfound = findFreeSlot(&num)) == false) goto done; + PlayerMenu[num].status = IT_CALL; for (i = 0; i < MAXLINELEN-3; i++) { @@ -545,6 +546,7 @@ static void readPlayer(MYFILE *f, INT32 num) if (!slotfound && (slotfound = findFreeSlot(&num)) == false) goto done; DEH_WriteUndoline(word, &description[num].picname[0], UNDO_NONE); + PlayerMenu[num].status = IT_CALL; strncpy(description[num].picname, word2, 8); } else if (fastcmp(word, "STATUS")) @@ -576,6 +578,8 @@ static void readPlayer(MYFILE *f, INT32 num) if (!slotfound && (slotfound = findFreeSlot(&num)) == false) goto done; DEH_WriteUndoline(word, description[num].skinname, UNDO_NONE); + PlayerMenu[num].status = IT_CALL; + strlcpy(description[num].skinname, word2, sizeof description[num].skinname); strlwr(description[num].skinname); } From e22308498271742cd6af33e52156f124d1e1f329 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 4 Mar 2015 20:07:51 -0600 Subject: [PATCH 049/609] Use bin output directory. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8abe511d..c86283c33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,9 @@ if(${CMAKE_SYSTEM} MATCHES "Darwin") endif() endif() +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") +set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") + # Set EXE names so the assets CMakeLists can refer to its target set(SRB2_SDL2_EXE_NAME srb2) set(SRB2_WIN_EXE_NAME srb2dd) From f28b050c07f3183ee44ad7eb0d0e9a4aa59b43de Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 4 Mar 2015 20:15:57 -0600 Subject: [PATCH 050/609] Append current branch name to comp version string. --- CMakeLists.txt | 4 +++- cmake/Modules/GitUtilities.cmake | 15 ++++++++++++--- src/config.h.in | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c86283c33..58afb1758 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,9 @@ add_subdirectory(assets) ## config.h generation set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary") include(GitUtilities) -git_describe(SRB2_COMP_REVISION "${CMAKE_CURRENT_SOURCE_DIR}") +git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}") +git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}") +set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}-<${SRB2_GIT_BRANCH}>") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) ##### PACKAGE CONFIGURATION ##### diff --git a/cmake/Modules/GitUtilities.cmake b/cmake/Modules/GitUtilities.cmake index de4015b0d..683cf9b6b 100644 --- a/cmake/Modules/GitUtilities.cmake +++ b/cmake/Modules/GitUtilities.cmake @@ -14,9 +14,18 @@ function(git_describe variable path) ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ) - #if(NOT result EQUAL 0) - # set(${variable} "GITERROR-${result}-NOTFOUND" CACHE STRING "revision" FORCE) - #endif() set(${variable} "${output}" PARENT_SCOPE) endfunction() + +function(git_current_branch variable path) + execute_process(COMMAND ${GIT_EXECUTABLE} "symbolic-ref" "--short" "HEAD" + WORKING_DIRECTORY "${path}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + set(${variable} "${output}" PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/src/config.h.in b/src/config.h.in index 7c5b299cf..53747266c 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -12,6 +12,8 @@ #define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}" #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" +#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}" +#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}" #define CMAKE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/assets" From 3d5d61ee87026cc2e9c94bc835c97be1a858eb82 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 4 Mar 2015 20:37:37 -0600 Subject: [PATCH 051/609] Remove MSVC netplay warning. --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58afb1758..346fd8db0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,10 +58,6 @@ else() set(SRB2_SYSTEM_BITS 32) endif() -if(MSVC) - message(WARNING "!! MSVC BUILDS OF SRB2 CANNOT PLAY MULTIPLAYER !! You're more than welcome to try and fix this!") -endif() - # OS macros if (UNIX) add_definitions(-DUNIXCOMMON) From a713509493b22c9c5884cdc7630601508a00bd6a Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 8 Mar 2015 03:26:54 -0500 Subject: [PATCH 052/609] Refactor CMake to allow source grouping and separation of interfaces. Core and SDL2 are two separate targets now. Core is a static library that is linked into SRB2SDL2. The sources for both are separated. When using an IDE like Visual Studio or Xcode, the source code organized into groups that explain what that group of sources does. In the future, "Main" could be split into a few more groups based on file prefixes, but I think the way it is set up works for now. Makefile targets are not affected by source_groups and typing `make` will automatically compile both the "Core" library and SRB2SDL2 itself. --- assets/CMakeLists.txt | 2 +- src/CMakeLists.txt | 206 ++++++++++++++++++++++------------------- src/config.h.in | 6 ++ src/sdl/CMakeLists.txt | 89 ++++++++---------- 4 files changed, 160 insertions(+), 143 deletions(-) diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt index 3ce133c6a..292e184c7 100644 --- a/assets/CMakeLists.txt +++ b/assets/CMakeLists.txt @@ -26,7 +26,7 @@ endforeach() # Installation if(CLANG) - get_target_property(outname ${SRB2_SDL2_EXE_NAME} OUTPUT_NAME) + get_target_property(outname SRB2SDL2 OUTPUT_NAME) install(FILES ${SRB2_ASSET_ALL} DESTINATION "${outname}.app/Contents/Resources" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 74f97048b..3defce77a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,32 +34,6 @@ set(SRB2_CORE_SOURCES m_random.c md5.c mserv.c - p_ceilng.c - p_enemy.c - p_fab.c - p_floor.c - p_inter.c - p_lights.c - p_map.c - p_maputl.c - p_mobj.c - p_polyobj.c - p_saveg.c - p_setup.c - p_sight.c - p_spec.c - p_telept.c - p_tick.c - p_user.c - r_bsp.c - r_data.c - r_draw.c - r_main.c - r_plane.c - r_segs.c - r_sky.c - r_splats.c - r_things.c s_sound.c screen.c sounds.c @@ -124,15 +98,31 @@ set(SRB2_CORE_HEADERS md5.h mserv.h p5prof.h - p_local.h - p_maputl.h - p_mobj.h - p_polyobj.h - p_pspr.h - p_saveg.h - p_setup.h - p_spec.h - p_tick.h + s_sound.h + screen.h + sounds.h + st_stuff.h + tables.h + v_video.h + w_wad.h + y_inter.h + z_zone.h + + config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h +) + +set(SRB2_CORE_RENDER_SOURCES + r_bsp.c + r_data.c + r_draw.c + r_main.c + r_plane.c + r_segs.c + r_sky.c + r_splats.c + r_things.c + r_bsp.h r_data.h r_defs.h @@ -145,57 +135,45 @@ set(SRB2_CORE_HEADERS r_splats.h r_state.h r_things.h - s_sound.h - screen.h - sounds.h - st_stuff.h - tables.h - v_video.h - w_wad.h - y_inter.h - z_zone.h ) -prepend_sources(SRB2_CORE_SOURCES) -prepend_sources(SRB2_CORE_HEADERS) +set(SRB2_CORE_GAME_SOURCES + p_ceilng.c + p_enemy.c + p_fab.c + p_floor.c + p_inter.c + p_lights.c + p_map.c + p_maputl.c + p_mobj.c + p_polyobj.c + p_saveg.c + p_setup.c + p_sight.c + p_spec.c + p_telept.c + p_tick.c + p_user.c -set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/config.h) - -set(SRB2_HWRENDER_SOURCES - hardware/hw_bsp.c - hardware/hw_cache.c - hardware/hw_draw.c - hardware/hw_light.c - hardware/hw_main.c - hardware/hw_md2.c - hardware/hw_trick.c + p_local.h + p_maputl.h + p_mobj.h + p_polyobj.h + p_pspr.h + p_saveg.h + p_setup.h + p_spec.h + p_tick.h ) -set (SRB2_HWRENDER_HEADERS - hardware/hw_data.h - hardware/hw_defs.h - hardware/hw_dll.h - hardware/hw_drv.h - hardware/hw_glide.h - hardware/hw_glob.h - hardware/hw_light.h - hardware/hw_main.h - hardware/hw_md2.h -) +if(NOT CLANG) + set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c) +endif() -prepend_sources(SRB2_HWRENDER_SOURCES) -prepend_sources(SRB2_HWRENDER_HEADERS) - -set(SRB2_R_OPENGL_SOURCES - hardware/r_opengl/r_opengl.c -) - -set(SRB2_R_OPENGL_HEADERS - hardware/r_opengl/r_opengl.h -) - -prepend_sources(SRB2_R_OPENGL_SOURCES) -prepend_sources(SRB2_R_OPENGL_HEADERS) +source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}) +source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES}) +source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES}) set(SRB2_ASM_SOURCES vid_copy.s @@ -219,8 +197,7 @@ if(MSVC) list(APPEND SRB2_NASM_OBJECTS tmap_vc.obj) endif() -prepend_sources(SRB2_ASM_SOURCES) -prepend_sources(SRB2_NASM_SOURCES) +source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES}) ### Configuration @@ -229,11 +206,11 @@ set(SRB2_CONFIG_HAVE_BLUA ON CACHE BOOL set(SRB2_CONFIG_HAVE_PNG ON CACHE BOOL "Enable PNG support. Depends on zlib, so will be disabled if you don't enable that too.") set(SRB2_CONFIG_HAVE_ZLIB ON CACHE BOOL - "Enable zlib support") + "Enable zlib support.") set(SRB2_CONFIG_HAVE_GME ON CACHE BOOL - "Enable GME support") + "Enable GME support.") set(SRB2_CONFIG_HWRENDER ON CACHE BOOL - "Enable hardware rendering through OpenGL") + "Enable hardware rendering through OpenGL.") set(SRB2_CONFIG_USEASM OFF CACHE BOOL "Enable NASM tmap implementation for software mode speedup.") set(SRB2_CONFIG_YASM OFF CACHE BOOL @@ -264,8 +241,7 @@ if(${SRB2_CONFIG_HAVE_BLUA}) lua_script.h ) - prepend_sources(SRB2_LUA_SOURCES) - prepend_sources(SRB2_LUA_HEADERS) + source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS}) set(SRB2_BLUA_SOURCES blua/lapi.c @@ -318,8 +294,7 @@ if(${SRB2_CONFIG_HAVE_BLUA}) blua/lvm.h blua/lzio.h ) - prepend_sources(SRB2_BLUA_SOURCES) - prepend_sources(SRB2_BLUA_HEADERS) + source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS}) endif() if(${SRB2_CONFIG_HAVE_GME}) @@ -355,6 +330,36 @@ endif() if(${SRB2_CONFIG_HWRENDER}) add_definitions(-DHWRENDER) + set(SRB2_HWRENDER_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_bsp.c + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.c + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_draw.c + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.c + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.c + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.c + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_trick.c + ) + + set (SRB2_HWRENDER_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_data.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_defs.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_dll.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_drv.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glide.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glob.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_light.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.h + ) + + set(SRB2_R_OPENGL_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.c + ) + + set(SRB2_R_OPENGL_HEADERS + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.h + ) + endif() if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL}) @@ -384,10 +389,6 @@ endif() # Targets -if(${CMAKE_SYSTEM} MATCHES Windows) - add_subdirectory(win32) -endif() - # Compatibility flag with later versions of GCC # We should really fix our code to not need this if(NOT CLANG AND NOT MSVC) @@ -396,4 +397,23 @@ endif() add_definitions(-DCMAKECONFIG) +add_library(SRB2Core STATIC + ${SRB2_CORE_SOURCES} + ${SRB2_CORE_HEADERS} + ${SRB2_CORE_RENDER_SOURCES} + ${SRB2_CORE_GAME_SOURCES} + ${SRB2_LUA_SOURCES} + ${SRB2_LUA_HEADERS} + ${SRB2_BLUA_SOURCES} + ${SRB2_BLUA_HEADERS} +) + add_subdirectory(sdl) + +if(${CMAKE_SYSTEM} MATCHES Windows) + add_subdirectory(win32) +endif() + +if(NOT ${SRB2_SDL2_AVAILABLE} AND NOT ${SRB2_WIN32_AVAILABLE}) + message(FATAL_ERROR "There are no targets available to build an SRB2 executable. :(") +endif() \ No newline at end of file diff --git a/src/config.h.in b/src/config.h.in index 53747266c..2ed7aec3e 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -3,6 +3,12 @@ #ifndef __CONFIG_H__ #define __CONFIG_H__ +/* DO NOT MODIFY config.h DIRECTLY! It will be overwritten by cmake. + * If you want to change a configuration option here, modify it in + * your CMakeCache.txt. config.h.in is used as a template for CMake + * variables, so you can insert them here too. + */ + #ifdef CMAKECONFIG #define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}" diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index b4eeeeb5f..56dcb674d 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -39,16 +39,13 @@ set(SRB2_SDL2_HEADERS sdlmain.h ) -prepend_sources(SRB2_SDL2_SOURCES) -prepend_sources(SRB2_SDL2_HEADERS) +source_group("Interface Code" FILES ${SRB2_SDL2_SOURCES} ${SRB2_SDL2_HEADERS}) # Dependency find_package(SDL2) if(${SDL2_FOUND}) set(SRB2_SDL2_TOTAL_SOURCES - ${SRB2_CORE_SOURCES} - ${SRB2_CORE_HEADERS} ${SRB2_SDL2_SOURCES} ${SRB2_SDL2_HEADERS} ) @@ -60,15 +57,9 @@ if(${SDL2_FOUND}) ${SRB2_R_OPENGL_SOURCES} ${SRB2_R_OPENGL_HEADERS} ) - endif() - if(${SRB2_CONFIG_HAVE_BLUA}) - set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} - ${SRB2_LUA_SOURCES} - ${SRB2_LUA_HEADERS} - ${SRB2_BLUA_SOURCES} - ${SRB2_BLUA_HEADERS} - ) + source_group("Hardware" FILES ${SRB2_HWRENDER_SOURCES} ${SRB2_HWRENDER_HEADERS}) + source_group("Hardware\\OpenGL Renderer" FILES ${SRB2_R_OPENGL_SOURCES} ${SRB2_R_OPENGL_HEADERS}) endif() if(${SRB2_USEASM}) @@ -85,7 +76,6 @@ if(${SDL2_FOUND}) set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES LANGUAGE C) set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp") endif() - endif() if(${CMAKE_SYSTEM} MATCHES Windows) @@ -94,39 +84,36 @@ if(${SDL2_FOUND}) ${CMAKE_SOURCE_DIR}/src/win32/Srb2win.rc ) endif() - if(NOT CLANG) - set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} - ${CMAKE_SOURCE_DIR}/src/string.c - ) - endif() if(${CMAKE_SYSTEM} MATCHES Darwin) set(MACOSX_BUNDLE_ICON_FILE Srb2mac.icns) set_source_files_properties(macosx/Srb2mac.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") - set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} + set(SRB2_SDL2_MAC_SOURCES macosx/mac_alert.c macosx/mac_alert.h macosx/mac_resources.c macosx/mac_resources.h macosx/Srb2mac.icns ) + source_group("Interface Code\\OSX Compatibility" FILES ${SRB2_SDL2_MAC_SOURCES}) + set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} ${SRB2_SDL2_MAC_SOURCES}) endif() + add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES}) + set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME}) + if(CLANG) - add_executable(${SRB2_SDL2_EXE_NAME} MACOSX_BUNDLE ${SRB2_SDL2_TOTAL_SOURCES}) - add_framework(CoreFoundation ${SRB2_SDL2_EXE_NAME}) - add_framework(SDL2 ${SRB2_SDL2_EXE_NAME}) - add_framework(SDL2_mixer ${SRB2_SDL2_EXE_NAME}) - target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + add_framework(CoreFoundation SRB2SDL2) + add_framework(SDL2 SRB2SDL2) + add_framework(SDL2_mixer SRB2SDL2) + target_link_libraries(SRB2SDL2 PRIVATE ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENGL_LIBRARIES} ) - set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES OUTPUT_NAME "Sonic Robo Blast 2") + set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "Sonic Robo Blast 2") else() - add_executable(${SRB2_SDL2_EXE_NAME} WIN32 ${SRB2_SDL2_TOTAL_SOURCES}) - - target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + target_link_libraries(SRB2SDL2 PRIVATE ${SDL2_LIBRARIES} ${SDL2_MIXER_LIBRARIES} ${PNG_LIBRARIES} @@ -135,14 +122,15 @@ if(${SDL2_FOUND}) ) if(${CMAKE_SYSTEM} MATCHES Linux) - target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + target_link_libraries(SRB2SDL2 PRIVATE m rt ) endif() - endif() + target_link_libraries(SRB2SDL2 PRIVATE SRB2Core) + if(${SRB2_USEASM}) if(${SRB2_CONFIG_YASM}) set(ASM_ASSEMBLER_TEMP ${CMAKE_ASM_YASM_COMPILER}) @@ -159,7 +147,7 @@ if(${SDL2_FOUND}) foreach(ASMFILE ${SRB2_NASM_SOURCES}) get_filename_component(ASMFILE_NAME ${ASMFILE} NAME_WE) set(ASMFILE_NAME ${ASMFILE_NAME}.obj) - add_custom_command(TARGET ${SRB2_SDL2_EXE_NAME} PRE_LINK + add_custom_command(TARGET SRB2SDL2 PRE_LINK COMMAND ${ASM_ASSEMBLER_TEMP} ARGS -f ${ASM_ASSEMBLER_OBJFORMAT} -o ${CMAKE_CURRENT_BINARY_DIR}/${ASMFILE_NAME} ${ASMFILE} COMMENT "assemble ${ASMFILE_NAME}." ) @@ -167,23 +155,23 @@ if(${SDL2_FOUND}) endif() endif() - set_target_properties(${SRB2_SDL2_EXE_NAME} PROPERTIES VERSION ${SRB2_VERSION}) + set_target_properties(SRB2SDL2 PROPERTIES VERSION ${SRB2_VERSION}) if(${CMAKE_SYSTEM} MATCHES Windows) - target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + target_link_libraries(SRB2SDL2 PRIVATE ws2_32 ) - target_compile_options(${SRB2_SDL2_EXE_NAME} PRIVATE + target_compile_options(SRB2SDL2 PRIVATE -U_WINDOWS ) endif() if(MSVC) find_package(SDL2_MAIN REQUIRED) - target_link_libraries(${SRB2_SDL2_EXE_NAME} PRIVATE + target_link_libraries(SRB2SDL2 PRIVATE ${SDL2_MAIN_LIBRARIES} ) - target_compile_options(${SRB2_SDL2_EXE_NAME} PRIVATE + target_compile_options(SRB2SDL2 PRIVATE /Umain /D_CRT_SECURE_NO_WARNINGS # something about string functions. /D_CRT_NONSTDC_NO_DEPRECATE @@ -192,7 +180,7 @@ if(${SDL2_FOUND}) ) endif() - target_include_directories(${SRB2_SDL2_EXE_NAME} PRIVATE + target_include_directories(SRB2SDL2 PRIVATE ${SDL2_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} @@ -201,10 +189,10 @@ if(${SDL2_FOUND}) ) if(${SRB2_HAVE_MIXER}) - target_compile_definitions(${SRB2_SDL2_EXE_NAME} PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER) + target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER) endif() - target_compile_definitions(${SRB2_SDL2_EXE_NAME} PRIVATE + target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_SDL ) @@ -212,21 +200,21 @@ if(${SDL2_FOUND}) if(CMAKE_COMPILER_IS_GNUCC) if(${CMAKE_BUILD_TYPE} MATCHES Debug) message(STATUS "Will make separate debug symbols in *.debug") - add_custom_command(TARGET ${SRB2_SDL2_EXE_NAME} POST_BUILD - COMMAND ${OBJCOPY} --only-keep-debug $ $.debug - COMMAND ${OBJCOPY} --strip-debug $ - COMMAND ${OBJCOPY} --add-gnu-debuglink=$.debug $ + add_custom_command(TARGET SRB2SDL2 POST_BUILD + COMMAND ${OBJCOPY} --only-keep-debug $ $.debug + COMMAND ${OBJCOPY} --strip-debug $ + COMMAND ${OBJCOPY} --add-gnu-debuglink=$.debug $ ) endif() endif() #### Installation #### if (CLANG) - install(TARGETS ${SRB2_SDL2_EXE_NAME} + install(TARGETS SRB2SDL2 BUNDLE DESTINATION . ) else() - install(TARGETS ${SRB2_SDL2_EXE_NAME} ${SRB2_SDL2_EXE_NAME} + install(TARGETS SRB2SDL2 SRB2SDL2 RUNTIME DESTINATION . ) endif() @@ -257,10 +245,10 @@ if(${SDL2_FOUND}) # We also want to copy those DLLs to build directories on MSVC. # So we'll add a post_build step. - copy_files_to_build_dir(${SRB2_SDL2_EXE_NAME} win_extra_dll_list) + copy_files_to_build_dir(SRB2SDL2 win_extra_dll_list) endif() - + # Mac bundle fixup if(CLANG) install(CODE " @@ -271,6 +259,9 @@ if(${SDL2_FOUND}) )" ) endif() + + set(SRB2_SDL2_AVAILABLE YES PARENT_SCOPE) else() - message(WARNING "SDL2 wasn't found, so ${SRB2_SDL2_EXE_NAME} won't be available") -endif() + message(WARNING "SDL2 was not found, so the SDL2 target will not be available.") + set(SRB2_SDL2_AVAILABLE NO PARENT_SCOPE) +endif() \ No newline at end of file From 8472075960bfe67d2c5cf8ac6c29d61c53c846b4 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 8 Mar 2015 04:16:16 -0500 Subject: [PATCH 053/609] Prepend ASM sources with the current source directory in CMake. This fixes generation with USEASM enabled. --- src/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3defce77a..9b5089e3a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -176,25 +176,25 @@ source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES}) source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES}) set(SRB2_ASM_SOURCES - vid_copy.s + ${CMAKE_CURRENT_SOURCE_DIR}/vid_copy.s ) set(SRB2_NASM_SOURCES - tmap_mmx.nas - tmap.nas + ${CMAKE_CURRENT_SOURCE_DIR}/tmap_mmx.nas + ${CMAKE_CURRENT_SOURCE_DIR}/tmap.nas ) if(MSVC) - list(APPEND SRB2_NASM_SOURCES tmap_vc.nas) + list(APPEND SRB2_NASM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tmap_vc.nas) endif() set(SRB2_NASM_OBJECTS - tmap_mmx.obj - tmap.obj + ${CMAKE_CURRENT_BINARY_DIR}/tmap_mmx.obj + ${CMAKE_CURRENT_BINARY_DIR}/tmap.obj ) if(MSVC) - list(APPEND SRB2_NASM_OBJECTS tmap_vc.obj) + list(APPEND SRB2_NASM_OBJECTS ${CMAKE_CURRENT_BINARY_DIR}/tmap_vc.obj) endif() source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES}) From c43b41e183e481d1a08267771ee5073b76962b95 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 8 Mar 2015 04:30:07 -0500 Subject: [PATCH 054/609] Fix generation of SRB2DD target. It still won't compile correctly. But this should avoid the error messages related to it. --- src/win32/CMakeLists.txt | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/win32/CMakeLists.txt b/src/win32/CMakeLists.txt index 94c198299..39b01588b 100644 --- a/src/win32/CMakeLists.txt +++ b/src/win32/CMakeLists.txt @@ -1,11 +1,18 @@ -add_executable(${SRB2_WIN_EXE_NAME} EXCLUDE_FROM_ALL - ${SRB2_CORE_SOURCES} - ${SRB2_CORE_HEADERS} - ${SRB2_LUA_SOURCES} - ${SRB2_LUA_HEADERS} - ${SRB2_BLUA_SOURCES} - ${SRB2_BLUA_HEADERS}) +file(GLOB SRB2_WIN_SOURCES *.c *.h *.rc) -target_compile_definitions(${SRB2_WIN_EXE_NAME} PRIVATE +if(${SRB2_CONFIG_HWRENDER}) + set(SRB2_WIN_SOURCES ${SRB2_WIN_SOURCES} ${SRB2_HWRENDER_SOURCES} ${SRB2_HWRENDER_HEADERS}) + set(SRB2_WIN_SOURCES ${SRB2_WIN_SOURCES} ${SRB2_R_OPENGL_SOURCES} ${SRB2_R_OPENGL_HEADERS}) +endif() + +add_executable(SRB2DD EXCLUDE_FROM_ALL WIN32 + ${SRB2_WIN_SOURCES} +) + +target_compile_definitions(SRB2DD PRIVATE -D_WINDOWS -) \ No newline at end of file +) + +set_target_properties(SRB2DD PROPERTIES OUTPUT_NAME ${SRB2_WIN_EXE_NAME}) + +target_link_libraries(SRB2DD PRIVATE SRB2Core) From 2f52a5d34fad81509fbc99379d37b60a19ac5cf9 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 8 Mar 2015 18:47:26 -0500 Subject: [PATCH 055/609] Added a fatal error message when attempting an in-source build. In-source builds are pain and suffering and I am going to stop people from doing them to save them that pain. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 346fd8db0..e23d891cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,10 @@ project(SRB2 VERSION 2.1.14 LANGUAGES C) +if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR}) + message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.") +endif() + # Set up CMAKE path set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") From 53680903e574154fddc48ed3fe1cc106703d8455 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Tue, 24 Mar 2015 19:32:58 -0500 Subject: [PATCH 056/609] Fix compilation and debugging on Windows. Core code has too many #define dependencies on interface-specific defines. This means that it's currently not possible to safely separate the core and interface code into different contexts. The core code should be refactored to accomadate for this because we should not have any interface-specific code in core in the first place. This reverts the static library SRB2Core from a7135094 and instead adds the core sources to the SRB2SDL2 target directly. So frustrating... --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 35 ++++++++++++++++++++++++----------- src/sdl/CMakeLists.txt | 17 ++++++++++++++++- 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e23d891cb..0fb5cb28f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ macro(copy_files_to_build_dir target dlllist_var) add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${dlllist_item} - ${CMAKE_CURRENT_BINARY_DIR}/\$\(Configuration\)/${dllname} + $/${dllname} ) endforeach() endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b5089e3a..6859e27c3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -109,7 +109,6 @@ set(SRB2_CORE_HEADERS z_zone.h config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/config.h ) set(SRB2_CORE_RENDER_SOURCES @@ -171,10 +170,17 @@ if(NOT CLANG) set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c) endif() +prepend_sources(SRB2_CORE_SOURCES) +prepend_sources(SRB2_CORE_HEADERS) +prepend_sources(SRB2_CORE_RENDER_SOURCES) +prepend_sources(SRB2_CORE_GAME_SOURCES) + +set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/config.h) source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}) source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES}) source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES}) + set(SRB2_ASM_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/vid_copy.s ) @@ -241,6 +247,9 @@ if(${SRB2_CONFIG_HAVE_BLUA}) lua_script.h ) + prepend_sources(SRB2_LUA_SOURCES) + prepend_sources(SRB2_LUA_HEADERS) + source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS}) set(SRB2_BLUA_SOURCES @@ -294,6 +303,10 @@ if(${SRB2_CONFIG_HAVE_BLUA}) blua/lvm.h blua/lzio.h ) + + prepend_sources(SRB2_BLUA_SOURCES) + prepend_sources(SRB2_BLUA_HEADERS) + source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS}) endif() @@ -397,16 +410,16 @@ endif() add_definitions(-DCMAKECONFIG) -add_library(SRB2Core STATIC - ${SRB2_CORE_SOURCES} - ${SRB2_CORE_HEADERS} - ${SRB2_CORE_RENDER_SOURCES} - ${SRB2_CORE_GAME_SOURCES} - ${SRB2_LUA_SOURCES} - ${SRB2_LUA_HEADERS} - ${SRB2_BLUA_SOURCES} - ${SRB2_BLUA_HEADERS} -) +#add_library(SRB2Core STATIC +# ${SRB2_CORE_SOURCES} +# ${SRB2_CORE_HEADERS} +# ${SRB2_CORE_RENDER_SOURCES} +# ${SRB2_CORE_GAME_SOURCES} +# ${SRB2_LUA_SOURCES} +# ${SRB2_LUA_HEADERS} +# ${SRB2_BLUA_SOURCES} +# ${SRB2_BLUA_HEADERS} +#) add_subdirectory(sdl) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 56dcb674d..b3fa5390c 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -46,9 +46,24 @@ find_package(SDL2) if(${SDL2_FOUND}) set(SRB2_SDL2_TOTAL_SOURCES + ${SRB2_CORE_SOURCES} + ${SRB2_CORE_HEADERS} + ${SRB2_CORE_RENDER_SOURCES} + ${SRB2_CORE_GAME_SOURCES} + ${SRB2_LUA_SOURCES} + ${SRB2_LUA_HEADERS} + ${SRB2_BLUA_SOURCES} + ${SRB2_BLUA_HEADERS} ${SRB2_SDL2_SOURCES} ${SRB2_SDL2_HEADERS} ) + + source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}) + source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES}) + source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES}) + source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES}) + source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS}) + source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS}) if(${SRB2_CONFIG_HWRENDER}) set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES} @@ -129,7 +144,7 @@ if(${SDL2_FOUND}) endif() endif() - target_link_libraries(SRB2SDL2 PRIVATE SRB2Core) + #target_link_libraries(SRB2SDL2 PRIVATE SRB2Core) if(${SRB2_USEASM}) if(${SRB2_CONFIG_YASM}) From 808775de02a9797f42ecc5b8dd7b87a5e2ab9490 Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Sun, 29 Mar 2015 00:49:27 -0500 Subject: [PATCH 057/609] Effect 4 on a map line now makes the front midtexture solid (Supports Effect 5 repeating of arbitrary lengths, but not of the automatic "top-to-bottom" type; just use Impassible there!) --- src/p_maputl.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/p_maputl.c b/src/p_maputl.c index 48dd54e8d..b909332b6 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -17,6 +17,7 @@ #include "p_local.h" #include "r_main.h" +#include "r_data.h" #include "p_maputl.h" #include "p_polyobj.h" #include "z_zone.h" @@ -520,6 +521,38 @@ void P_LineOpening(line_t *linedef) { fixed_t thingtop = tmthing->z + tmthing->height; + // Check for collision with front side's midtexture if Effect 4 is set + if (linedef->flags & ML_EFFECT4) { + side_t *side = &sides[linedef->sidenum[0]]; + fixed_t textop, texbottom, texheight; + fixed_t texmid, delta1, delta2; + + // Get the midtexture's height + texheight = textures[texturetranslation[side->midtexture]]->height << FRACBITS; + + // Set texbottom and textop to the Z coordinates of the texture's boundaries + if (linedef->flags & ML_DONTPEGBOTTOM) { + texbottom = openbottom + side->rowoffset; + textop = texbottom + texheight*(side->repeatcnt+1); + } else { + textop = opentop - side->rowoffset; + texbottom = textop - texheight*(side->repeatcnt+1); + } + + texmid = texbottom+(textop-texbottom)/2; + + delta1 = abs(tmthing->z - texmid); + delta2 = abs(thingtop - texmid); + + if (delta1 > delta2) { // Below + if (opentop > texbottom) + opentop = texbottom; + } else { // Above + if (openbottom < textop) + openbottom = textop; + } + } + // Check for fake floors in the sector. if (front->ffloors || back->ffloors #ifdef POLYOBJECTS From 70732f6475719fb42c50024739f8fc3ba5fa0cc3 Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Mon, 30 Mar 2015 13:06:04 -0500 Subject: [PATCH 058/609] Make solid midtexture trick work properly(?) for polyobjects --- src/p_maputl.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/p_maputl.c b/src/p_maputl.c index b909332b6..a65d2fa76 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -531,12 +531,25 @@ void P_LineOpening(line_t *linedef) texheight = textures[texturetranslation[side->midtexture]]->height << FRACBITS; // Set texbottom and textop to the Z coordinates of the texture's boundaries - if (linedef->flags & ML_DONTPEGBOTTOM) { - texbottom = openbottom + side->rowoffset; - textop = texbottom + texheight*(side->repeatcnt+1); - } else { - textop = opentop - side->rowoffset; - texbottom = textop - texheight*(side->repeatcnt+1); +#ifdef POLYOBJECTS + if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT)) { + if (linedef->flags & ML_DONTPEGBOTTOM) { + texbottom = back->floorheight + side->rowoffset; + textop = texbottom + texheight*(side->repeatcnt+1); + } else { + textop = back->ceilingheight - side->rowoffset; + texbottom = textop - texheight*(side->repeatcnt+1); + } + } else +#endif + { + if (linedef->flags & ML_DONTPEGBOTTOM) { + texbottom = openbottom + side->rowoffset; + textop = texbottom + texheight*(side->repeatcnt+1); + } else { + textop = opentop - side->rowoffset; + texbottom = textop - texheight*(side->repeatcnt+1); + } } texmid = texbottom+(textop-texbottom)/2; From 965bd2f694b661a45c55861cbba013d68c1dc290 Mon Sep 17 00:00:00 2001 From: MonsterIestyn Date: Wed, 28 Jan 2015 15:16:50 +0000 Subject: [PATCH 059/609] Crawlas now use only one state for looking each --- src/dehacked.c | 2 -- src/info.c | 6 ++---- src/info.h | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 8576d51f2..0fd914f25 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -3811,7 +3811,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit // Blue Crawla "S_POSS_STND", - "S_POSS_STND2", "S_POSS_RUN1", "S_POSS_RUN2", "S_POSS_RUN3", @@ -3821,7 +3820,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit // Red Crawla "S_SPOS_STND", - "S_SPOS_STND2", "S_SPOS_RUN1", "S_SPOS_RUN2", "S_SPOS_RUN3", diff --git a/src/info.c b/src/info.c index fb30258c3..9e04b4e34 100644 --- a/src/info.c +++ b/src/info.c @@ -150,8 +150,7 @@ state_t states[NUMSTATES] = {SPR_PLAY, 34, 1, {NULL}, 0, 24, S_PLAY_SIGN}, // S_PLAY_SIGN // Blue Crawla - {SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND2}, // S_POSS_STND - {SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND2 + {SPR_POSS, 0, 5, {A_Look}, 0, 0, S_POSS_STND}, // S_POSS_STND {SPR_POSS, 0, 3, {A_Chase}, 0, 0, S_POSS_RUN2}, // S_POSS_RUN1 {SPR_POSS, 1, 3, {A_Chase}, 0, 0, S_POSS_RUN3}, // S_POSS_RUN2 {SPR_POSS, 2, 3, {A_Chase}, 0, 0, S_POSS_RUN4}, // S_POSS_RUN3 @@ -160,8 +159,7 @@ state_t states[NUMSTATES] = {SPR_POSS, 5, 3, {A_Chase}, 0, 0, S_POSS_RUN1}, // S_POSS_RUN6 // Red Crawla - {SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND2}, // S_SPOS_STND - {SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND}, // S_SPOS_STND2 + {SPR_SPOS, 0, 5, {A_Look}, 0, 0, S_SPOS_STND}, // S_SPOS_STND {SPR_SPOS, 0, 1, {A_Chase}, 0, 0, S_SPOS_RUN2}, // S_SPOS_RUN1 {SPR_SPOS, 1, 1, {A_Chase}, 0, 0, S_SPOS_RUN3}, // S_SPOS_RUN2 {SPR_SPOS, 2, 1, {A_Chase}, 0, 0, S_SPOS_RUN4}, // S_SPOS_RUN3 diff --git a/src/info.h b/src/info.h index 0c73281df..03726260b 100644 --- a/src/info.h +++ b/src/info.h @@ -663,7 +663,6 @@ typedef enum state // Blue Crawla S_POSS_STND, - S_POSS_STND2, S_POSS_RUN1, S_POSS_RUN2, S_POSS_RUN3, @@ -673,7 +672,6 @@ typedef enum state // Red Crawla S_SPOS_STND, - S_SPOS_STND2, S_SPOS_RUN1, S_SPOS_RUN2, S_SPOS_RUN3, From af4c2fe391172646181bc2b6928766dba52404ea Mon Sep 17 00:00:00 2001 From: MonsterIestyn Date: Wed, 28 Jan 2015 15:16:50 +0000 Subject: [PATCH 060/609] Some minor cleanup for OpenGL sprite/MD2 code --- src/hardware/hw_main.c | 13 ++----------- src/hardware/hw_md2.c | 13 +++++++------ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index bc86c1295..ea0fb6bdb 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3658,7 +3658,7 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t /*if (spr->mobj->frame & FF_TRANSMASK || spr->mobj->flags2 & MF2_SHADOW) { sector_t *sector = spr->mobj->subsector->sector; - UINT8 lightlevel = sector->lightlevel; + UINT8 lightlevel = 255; extracolormap_t *colormap = sector->extra_colormap; if (sector->numlights) @@ -3667,8 +3667,6 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t if (!(spr->mobj->frame & FF_FULLBRIGHT)) lightlevel = *sector->lightlist[light].lightlevel; - else - lightlevel = 255; if (sector->lightlist[light].extra_colormap) colormap = sector->lightlist[light].extra_colormap; @@ -3830,7 +3828,7 @@ static void HWR_DrawSprite(gr_vissprite_t *spr) // colormap test { sector_t *sector = spr->mobj->subsector->sector; - UINT8 lightlevel = sector->lightlevel; + UINT8 lightlevel = 255; extracolormap_t *colormap = sector->extra_colormap; if (sector->numlights) @@ -3841,8 +3839,6 @@ static void HWR_DrawSprite(gr_vissprite_t *spr) if (!(spr->mobj->frame & FF_FULLBRIGHT)) lightlevel = *sector->lightlist[light].lightlevel; - else - lightlevel = 255; if (sector->lightlist[light].extra_colormap) colormap = sector->lightlist[light].extra_colormap; @@ -3851,16 +3847,11 @@ static void HWR_DrawSprite(gr_vissprite_t *spr) { if (!(spr->mobj->frame & FF_FULLBRIGHT)) lightlevel = sector->lightlevel; - else - lightlevel = 255; if (sector->extra_colormap) colormap = sector->extra_colormap; } - if (spr->mobj->frame & FF_FULLBRIGHT) - lightlevel = 255; - if (colormap) Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false); else diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 6d2a1d4a3..de648f1b9 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1082,6 +1082,12 @@ void HWR_DrawMD2(gr_vissprite_t *spr) md2_t *md2; UINT8 color[4]; + if (!cv_grmd2.value) + return; + + if (!spr->precip) + return; + // MD2 colormap fix // colormap test { @@ -1116,8 +1122,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr) Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false); } - // Look at HWR_ProjetctSprite for more - if (cv_grmd2.value && ((md2_models[spr->mobj->sprite].scale > 0.0f) || (md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale > 0.0f)) && !spr->precip) + // Look at HWR_ProjectSprite for more { GLPatch_t *gpatch; INT32 *buff; @@ -1134,15 +1139,11 @@ void HWR_DrawMD2(gr_vissprite_t *spr) //durs = tics; if (spr->mobj->flags2 & MF2_SHADOW) - { Surf.FlatColor.s.alpha = 0x40; - } else if (spr->mobj->frame & FF_TRANSMASK) HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf); else - { Surf.FlatColor.s.alpha = 0xFF; - } // dont forget to enabled the depth test because we can't do this like // before: polygons models are not sorted From 474ad01b46ddfc1983203ed006532eed403b6fa2 Mon Sep 17 00:00:00 2001 From: MonsterIestyn Date: Wed, 28 Jan 2015 17:02:50 +0000 Subject: [PATCH 061/609] No more stupidity for No More Enemies special plz NME special now acts similarly to Each Time, checking all sectors sharing the same tag as itself for any enemies/bosses hiding within. This also supports cases where the tagged sectors are FOF control sectors. When the situation is asitsaysonthetin, NME acts like a normal trigger linedef should and executes all linedef execs around the sector it's located in. git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9005 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- src/p_floor.c | 66 +++++++++++++++++++++++++++++++++------------------ src/p_spec.c | 1 + 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/p_floor.c b/src/p_floor.c index 8e9a92859..8fc2b7cc3 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -1968,51 +1968,71 @@ void T_NoEnemiesSector(levelspecthink_t *nobaddies) { size_t i; fixed_t upperbound, lowerbound; - INT32 s; - sector_t *checksector; + sector_t *sec = NULL; + sector_t *targetsec = NULL; + INT32 secnum = -1; msecnode_t *node; mobj_t *thing; - boolean exists = false; + boolean FOFsector = false; - for (i = 0; i < nobaddies->sector->linecount; i++) + while ((secnum = P_FindSectorFromLineTag(nobaddies->sourceline, secnum)) >= 0) { - if (nobaddies->sector->lines[i]->special == 223) + sec = §ors[secnum]; + + FOFsector = false; + + // Check the lines of this sector, to see if it is a FOF control sector. + for (i = 0; i < sec->linecount; i++) { + INT32 targetsecnum = -1; - upperbound = nobaddies->sector->ceilingheight; - lowerbound = nobaddies->sector->floorheight; + if (sec->lines[i]->special < 100 || sec->lines[i]->special >= 300) + continue; - for (s = -1; (s = P_FindSectorFromLineTag(nobaddies->sector->lines[i], s)) >= 0 ;) + FOFsector = true; + + while ((targetsecnum = P_FindSectorFromLineTag(sec->lines[i], targetsecnum)) >= 0) { - checksector = §ors[s]; + targetsec = §ors[targetsecnum]; - node = checksector->touching_thinglist; // things touching this sector + upperbound = targetsec->ceilingheight; + lowerbound = targetsec->floorheight; + node = targetsec->touching_thinglist; // things touching this sector while (node) { thing = node->m_thing; if ((thing->flags & (MF_ENEMY|MF_BOSS)) && thing->health > 0 - && thing->z < upperbound && thing->z+thing->height > lowerbound) - { - exists = true; - goto foundenemy; - } + && thing->z < upperbound && thing->z+thing->height > lowerbound) + return; node = node->m_snext; } } } + + if (!FOFsector) + { + upperbound = sec->ceilingheight; + lowerbound = sec->floorheight; + node = sec->touching_thinglist; // things touching this sector + while (node) + { + thing = node->m_thing; + + if ((thing->flags & (MF_ENEMY|MF_BOSS)) && thing->health > 0 + && thing->z < upperbound && thing->z+thing->height > lowerbound) + return; + + node = node->m_snext; + } + } } -foundenemy: - if (exists) - return; - s = P_AproxDistance(nobaddies->sourceline->dx, nobaddies->sourceline->dy)>>FRACBITS; + CONS_Debug(DBG_GAMELOGIC, "Running no-more-enemies exec with tag of %d\n", nobaddies->sourceline->tag); - CONS_Debug(DBG_GAMELOGIC, "Running no-more-enemies exec with tag of %d\n", s); - - // Otherwise, run the linedef exec and terminate this thinker - P_LinedefExecute((INT16)s, NULL, NULL); + // No enemies found, run the linedef exec and terminate this thinker + P_RunTriggerLinedef(nobaddies->sourceline, NULL, NULL); P_RemoveThinker(&nobaddies->thinker); } diff --git a/src/p_spec.c b/src/p_spec.c index 8228c60b3..616ab3565 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1890,6 +1890,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller || specialtype == 304 // Ring count - Once || specialtype == 307 // Character ability - Once || specialtype == 308 // Race only - Once + || specialtype == 313 // No More Enemies - Once || specialtype == 315 // No of pushables - Once || specialtype == 318 // Unlockable trigger - Once || specialtype == 320 // Unlockable - Once From 2eb6dd4fc26641fe134b9f205f6d347ef5b6bb8b Mon Sep 17 00:00:00 2001 From: JTE Date: Thu, 29 Jan 2015 17:48:05 +0000 Subject: [PATCH 062/609] Prepared SRB2.cbp (Code::Blocks project) for SDL2 development on Windows as best I could. @_@; git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9006 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd --- SRB2.cbp | 433 ++++++++++++++++++++----------------------------------- 1 file changed, 160 insertions(+), 273 deletions(-) diff --git a/SRB2.cbp b/SRB2.cbp index 4834563ec..5a03955b8 100644 --- a/SRB2.cbp +++ b/SRB2.cbp @@ -154,8 +154,8 @@ HW3SOUND for 3D hardware sound support - - + + @@ -200,8 +200,8 @@ HW3SOUND for 3D hardware sound support - - + + @@ -4141,283 +4141,170 @@ HW3SOUND for 3D hardware sound support