Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2009-02-10 17:23:18 +00:00
parent 0c5d56b35a
commit 52b07e9cf0
31 changed files with 52 additions and 51 deletions

View File

@ -30,6 +30,7 @@ noinst_HEADERS = \
cursors.h \
debug.h \
file.h \
fixedpoint.h \
frame.h \
frameint.h \
frameresource.h \
@ -49,7 +50,8 @@ noinst_HEADERS = \
treap.h \
trig.h \
types.h \
utf.h
utf.h \
vector.h
libframework_a_SOURCES = \
configfile.c \

View File

@ -24,27 +24,28 @@
* @todo Get rid of this file and use floats instead.
*/
#ifndef __INCLUDED_LIB_IVIS_COMMON_PIEFIXEDPOINT_H__
#define __INCLUDED_LIB_IVIS_COMMON_PIEFIXEDPOINT_H__
#ifndef FIXEDPOINT_H
#define FIXEDPOINT_H
#include "lib/framework/wzglobal.h"
#include "wzglobal.h"
/***************************************************************************/
/*
* Global Definitions (CONSTANTS)
*/
/***************************************************************************/
static const int DEG_360 = 65536;
static const float DEG_1 = (float)65536 / 360.f;
static inline WZ_DECL_CONST int DEG(const float degree)
{
return (int)(degree * DEG_1);
}
//! PSX-style float emulation: 12 digit semi-floats stored in an int
// FIXME!
#define FP12_SHIFT 12
#define FP12_MULTIPLIER (1 << FP12_SHIFT)
#endif // __INCLUDED_LIB_IVIS_COMMON_PIEFIXEDPOINT_H__
/*
* Global Definitions (CONSTANTS)
*/
static const int DEG_360 = 65536;
static const float DEG_1 = (float)65536 / 360.f;
static inline WZ_DECL_CONST int DEG(const float degree)
{
return (int)(degree * DEG_1);
}
#endif // FIXEDPOINT_H

View File

@ -17,11 +17,11 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __INCLUDED_LIB_IVIS_PIEVECTOR_H__
#define __INCLUDED_LIB_IVIS_PIEVECTOR_H__
#ifndef VECTOR_H
#define VECTOR_H
#include "lib/framework/wzglobal.h"
#include "piefixedpoint.h"
#include "wzglobal.h"
#include "fixedpoint.h"
#include <math.h>
@ -858,4 +858,4 @@ static inline WZ_DECL_CONST Vector3f Vector3uw_To3f(const Vector3uw v)
}
#endif // __INCLUDED_LIB_IVIS_PIEVECTOR_H__
#endif // VECTOR_H

View File

@ -34,7 +34,7 @@
#include "lib/framework/string_ext.h"
#include "lib/framework/frameresource.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "anim.h"
#include "parser.h"

View File

@ -11,7 +11,6 @@ noinst_HEADERS = \
pieblitfunc.h \
pieclip.h \
piedef.h \
piefixedpoint.h \
piefunc.h \
piemode.h \
piepalette.h \

View File

@ -36,8 +36,8 @@
#include "lib/framework/frame.h"
#include "lib/framework/string_ext.h"
#include "lib/framework/frameresource.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "ivisdef.h" // for imd structures
#include "imd.h" // for imd structures

View File

@ -30,8 +30,7 @@
#define _pieTypes_h
#include "lib/framework/frame.h"
#include "pievector.h"
#include "lib/framework/vector.h"
//*************************************************************************
//

View File

@ -24,7 +24,7 @@
#include "lib/ivis_opengl/GLee.h"
#include "lib/framework/frame.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/pieclip.h"
#include "piematrix.h"
#include "lib/ivis_common/rendmode.h"

View File

@ -26,7 +26,7 @@
#include "lib/framework/frame.h"
#include "netplay.h"
#include "lib/ivis_common/pievector.h"
#include "lib/framework/vector.h"
typedef enum packetDirectionEnum
{

View File

@ -24,7 +24,7 @@
#ifndef __INCLUDED_LIB_SOUND_AUD_H__
#define __INCLUDED_LIB_SOUND_AUD_H__
#include "lib/ivis_common/pievector.h"
#include "lib/framework/vector.h"
#if defined(__cplusplus)
extern "C"

View File

@ -26,7 +26,7 @@
#define __INCLUDED_LIB_SOUND_TRACKLIB_H__
#include "track.h"
#include "lib/ivis_common/pievector.h"
#include "lib/framework/vector.h"
#if defined(__cplusplus)
extern "C"

View File

@ -30,7 +30,7 @@
#include "lib/script/script.h"
#include "action.h"
#include "lib/ivis_common/pievector.h"
#include "lib/framework/vector.h"
#include "lib/sound/audio_id.h"
#include "lib/sound/audio.h"
#include "combat.h"

View File

@ -27,7 +27,7 @@
#include "basedef.h"
#include "map.h"
#include "display3d.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/gamelib/gtime.h"
#include "lib/sound/aud.h"

View File

@ -24,7 +24,7 @@
#ifndef __INCLUDED_BASEDEF_H__
#define __INCLUDED_BASEDEF_H__
#include "lib/ivis_common/pievector.h"
#include "lib/framework/vector.h"
#include "displaydef.h"
#include "statsdef.h"

View File

@ -25,7 +25,7 @@
/* Includes direct access to matrix code */
#include "lib/ivis_common/piedef.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/rendmode.h"
#include "lib/ivis_opengl/piematrix.h"

View File

@ -32,7 +32,7 @@
#include "lib/ivis_common/ivisdef.h" //ivis matrix code
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piedef.h" //ivis matrix code
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/piestate.h" //ivis render code
#include "lib/ivis_common/piepalette.h"
#include "lighting.h"

View File

@ -29,7 +29,7 @@
#include "lib/framework/input.h"
#include "lib/framework/strres.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "display.h"
#include "map.h"

View File

@ -33,7 +33,7 @@
#include "lib/ivis_common/piepalette.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piemode.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/piefunc.h"
#include "lib/ivis_common/rendmode.h"

View File

@ -31,7 +31,7 @@
#include "lib/gamelib/animobj.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_opengl/screen.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/script/script.h"
#include "lib/sound/audio.h"
#include "lib/sound/audio_id.h"

View File

@ -31,7 +31,7 @@
// -------------------------------------------------------------------------
#include "lib/gamelib/gtime.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "objects.h"
#include "map.h"
#include "hci.h"

View File

@ -43,7 +43,7 @@
#include "lib/ivis_common/ivisdef.h" //ivis matrix code
#include "lib/ivis_common/piedef.h" //ivis matrix code
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/piepalette.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_opengl/piematrix.h"

View File

@ -29,7 +29,7 @@
Alex McLean, Pumpkin Studios, EIDOS Interactive, 1998.
*/
#include "lib/ivis_common/piedef.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/pietypes.h"
/* All the effect groups */

View File

@ -70,7 +70,7 @@
#include "lib/ivis_common/rendmode.h"
#include "lib/ivis_common/piestate.h"
// FIXME Direct iVis implementation include!
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_opengl/piematrix.h"
#include "keymap.h"

View File

@ -22,7 +22,7 @@
#define __INCLUDED_SRC_KEYBIND_H__
#include "console.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
// --------------- All those keyboard mappable functions */
extern void kf_HalveHeights( void );

View File

@ -29,7 +29,7 @@
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/gamelib/gtime.h"

View File

@ -30,7 +30,7 @@
/* Includes direct access to render library */
#include "lib/ivis_common/ivisdef.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/rendmode.h"
#include "lib/ivis_common/piemode.h"

View File

@ -20,7 +20,7 @@
#include <string.h>
#include "lib/framework/frame.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_common/rendmode.h"
// FIXME Direct iVis implementation include!
#include "lib/ivis_opengl/piematrix.h"

View File

@ -24,7 +24,7 @@
#ifndef __INCLUDED_SRC_RAYCAST_H__
#define __INCLUDED_SRC_RAYCAST_H__
#include "lib/ivis_common/pievector.h"
#include "lib/framework/vector.h"
#define NUM_RAYS 360

View File

@ -53,7 +53,7 @@
#include "geometry.h"
// FIXME Direct iVis implementation include!
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "order.h"
#include "droid.h"
#include "lib/script/script.h"

View File

@ -53,7 +53,7 @@
#include "lib/sound/audio.h"
#include "lib/sound/audio_id.h"
// FIXME Direct iVis implementation include!
#include "lib/ivis_common/piefixedpoint.h"
#include "lib/framework/fixedpoint.h"
#include "lib/ivis_opengl/piematrix.h"
#include "mapgrid.h"

View File

@ -34,7 +34,7 @@
#include "lib/framework/input.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_common/piefixedpoint.h" //ivis matrix code
#include "lib/framework/fixedpoint.h" //ivis matrix code
#include "lib/gamelib/gtime.h"