diff --git a/src/dobject.h b/src/dobject.h index be1fefbfc..2cc781884 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -177,7 +177,7 @@ private: \ # pragma data_seg() # define _DECLARE_TI(cls) __declspec(allocate(".creg$u")) ClassReg *cls::RegistrationInfoPtr = &cls::RegistrationInfo; #else -# define _DECLARE_TI(cls) ClassReg *cls::RegistrationInfoPtr __attribute__((section("creg"))) = &cls::RegistrationInfo; +# define _DECLARE_TI(cls) ClassReg *cls::RegistrationInfoPtr __attribute__((section(CREG_SECTION))) = &cls::RegistrationInfo; #endif #define _IMP_PCLASS(cls,ptrs,create) \ diff --git a/src/m_fixed.cpp b/src/m_fixed.cpp deleted file mode 100644 index 48a316279..000000000 --- a/src/m_fixed.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// $Id:$ -// -// Copyright (C) 1993-1996 by id Software, Inc. -// -// This source is available for distribution and/or modification -// only under the terms of the DOOM Source Code License as -// published by id Software. All rights reserved. -// -// The source is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License -// for more details. -// -// $Log:$ -// -// DESCRIPTION: -// Fixed point implementation. -// -//----------------------------------------------------------------------------- - - - -#include - -#include "doomtype.h" -#include "i_system.h" - -#include "m_fixed.h" - - -#ifndef USEASM - -// C routines - -fixed_t FixedMul_C (fixed_t a, fixed_t b) -{ - return (fixed_t)(((__int64) a * (__int64) b) >> FRACBITS); -} - -fixed_t FixedDiv_C (fixed_t a, fixed_t b) -{ - if ((abs (a) >> 14) >= abs (b)) - return (a^b)<0 ? FIXED_MIN : FIXED_MAX; - - { -#if 0 - long long c; - c = ((long long)a<<16) / ((long long)b); - return (fixed_t) c; -#endif - - double c; - - c = ((double)a) / ((double)b) * FRACUNIT; -/* - if (c >= 2147483648.0 || c < -2147483648.0) - I_FatalError("FixedDiv: divide by zero"); -*/ - return (fixed_t) c; - } -} - -#endif