mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 00:41:24 +00:00
- added a first bunch of ZScript code.
# Conflicts: # source/CMakeLists.txt # source/common/utility/basics.h # source/core/serializer.h
This commit is contained in:
parent
c1f7cf1c3a
commit
c9b2399cd0
34 changed files with 15258 additions and 109 deletions
|
@ -1,5 +1,4 @@
|
|||
#ifndef __BASICS_H
|
||||
#define __BASICS_H
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
@ -56,4 +55,52 @@ typedef uint32_t angle_t;
|
|||
|
||||
using INTBOOL = int;
|
||||
using BITFIELD = uint32_t;
|
||||
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define NOVTABLE __declspec(novtable)
|
||||
#else
|
||||
#define NOVTABLE
|
||||
#endif
|
||||
|
||||
// always use our own definition for consistency.
|
||||
#ifdef M_PI
|
||||
#undef M_PI
|
||||
#endif
|
||||
|
||||
const double M_PI = 3.14159265358979323846; // matches value in gcc v2 math.h
|
||||
|
||||
inline float DEG2RAD(float deg)
|
||||
{
|
||||
return deg * float(M_PI / 180.0);
|
||||
}
|
||||
|
||||
inline double DEG2RAD(double deg)
|
||||
{
|
||||
return deg * (M_PI / 180.0);
|
||||
}
|
||||
|
||||
inline float RAD2DEG(float deg)
|
||||
{
|
||||
return deg * float(180. / M_PI);
|
||||
}
|
||||
|
||||
|
||||
// Auto-registration sections for GCC.
|
||||
// Apparently, you cannot do string concatenation inside section attributes.
|
||||
#ifdef __MACH__
|
||||
#define SECTION_AREG "__DATA,areg"
|
||||
#define SECTION_CREG "__DATA,creg"
|
||||
#define SECTION_FREG "__DATA,freg"
|
||||
#define SECTION_GREG "__DATA,greg"
|
||||
#define SECTION_MREG "__DATA,mreg"
|
||||
#define SECTION_YREG "__DATA,yreg"
|
||||
#else
|
||||
#define SECTION_AREG "areg"
|
||||
#define SECTION_CREG "creg"
|
||||
#define SECTION_FREG "freg"
|
||||
#define SECTION_GREG "greg"
|
||||
#define SECTION_MREG "mreg"
|
||||
#define SECTION_YREG "yreg"
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue