mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Removed m_fixed.cpp
- Fixed the GCC _DECLARE_TI macro to use the section name macro. SVN r332 (trunk)
This commit is contained in:
parent
419724dd02
commit
8854f95152
2 changed files with 1 additions and 67 deletions
|
@ -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) \
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
|
||||
#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
|
Loading…
Reference in a new issue