aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorrelnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f>2003-01-08 03:27:13 +0000
committerrelnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f>2003-01-08 03:27:13 +0000
commit5594b1ff9531ff5bcc6b51ee8eb8a2ec6cc20dd4 (patch)
treed0689f0bd74725101f8c5b158292e5f7f7e88b0b /Source
parent6b42f4ce7a0488e59ca8b01323d1f6499b53b4c7 (diff)
downloadblackshades-5594b1ff9531ff5bcc6b51ee8eb8a2ec6cc20dd4.tar.gz
added more mac types/functions
git-svn-id: svn://svn.icculus.org/blackshades/trunk@32 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source')
-rw-r--r--Source/Files.h2
-rw-r--r--Source/Game.h9
-rw-r--r--Source/GameDraw.cpp11
-rw-r--r--Source/MacInput.h2
-rw-r--r--Source/Support.cpp10
-rw-r--r--Source/Support.h20
6 files changed, 35 insertions, 19 deletions
diff --git a/Source/Files.h b/Source/Files.h
index 5f88701..d230e49 100644
--- a/Source/Files.h
+++ b/Source/Files.h
@@ -18,9 +18,9 @@
#include <Sound.h>
#include <Resources.h>
#include "AGL_DSp.h" // Header for OpenGL and DrawSprocket Functions
-#include "MacInput.h" // Header for Special Mac Input functions
#include "Alerts.h" // Header for Dialogs and alerts for this application
#endif
+#include "MacInput.h" // Header for Special Mac Input functions
#include <cstdarg>
#include <cmath>
#ifdef MAC
diff --git a/Source/Game.h b/Source/Game.h
index 156a14f..779015b 100644
--- a/Source/Game.h
+++ b/Source/Game.h
@@ -26,8 +26,8 @@
#include "Timer.h"
#ifdef MAC
#include "AGL_DSp.h"
-#include "MacInput.h"
#endif
+#include "MacInput.h"
#ifdef POOLOOPS
#include <SDL/SDL.h>
#endif
@@ -60,9 +60,7 @@ class Game
{
public:
//Eventloop
-#ifdef MAC
Boolean gQuit;
-#endif
float gamespeed;
double multiplier2,multiplier3,multiplier4,multiplier5,end,start,timetaken,framespersecond;
timer theTimer;
@@ -94,10 +92,9 @@ class Game
void Dispose();
//Mouse
-#ifdef MAC
Point mouseloc;
Point oldmouseloc;
-#endif
+
float mouserotation,mouserotation2;
float oldmouserotation,oldmouserotation2;
float mousesensitivity;
@@ -167,9 +164,7 @@ class Game
bool aimtoggle;
-#ifdef MAC
Point olddrawmouse;
-#endif
XYZ vipgoal;
diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp
index 146334d..ce45479 100644
--- a/Source/GameDraw.cpp
+++ b/Source/GameDraw.cpp
@@ -1,12 +1,5 @@
#include "Game.h"
-#ifdef POOLOOPS
-#include <stdio.h>
-#include <unistd.h>
-#define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid())
-#define Random rand
-#endif
-
extern int thirdperson;
extern double multiplier;
@@ -498,7 +491,6 @@ int Game::DrawGLScene(GLvoid)
-#ifdef MAC
//Mouse (draw)
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
@@ -581,9 +573,6 @@ int Game::DrawGLScene(GLvoid)
olddrawmouse=mouseloc;
-#else
- STUB_FUNCTION;
-#endif
//Flash
diff --git a/Source/MacInput.h b/Source/MacInput.h
index 27bafbf..ed97975 100644
--- a/Source/MacInput.h
+++ b/Source/MacInput.h
@@ -4,7 +4,9 @@
/**> HEADER FILES <**/
#include <stdlib.h>
#include <stdio.h>
+#ifdef MAC
#include <CursorDevices.h> //Mouse
+#endif
/**> CONSTANT DECLARATIONS <**/
// Mac Keyboard Codes
diff --git a/Source/Support.cpp b/Source/Support.cpp
index 86c3547..d6a9015 100644
--- a/Source/Support.cpp
+++ b/Source/Support.cpp
@@ -18,3 +18,13 @@ OSErr FSRead(int refNum, long *count, void *buffPtr)
return 0;
}
+
+void GetMouse(Point *p)
+{
+STUB_FUNCTION;
+}
+
+void GetKeys(unsigned long *keys)
+{
+STUB_FUNCTION;
+}
diff --git a/Source/Support.h b/Source/Support.h
index 585f289..ab2a0f4 100644
--- a/Source/Support.h
+++ b/Source/Support.h
@@ -1,16 +1,36 @@
#ifndef SUPPORT_H
#define SUPPORT_H
+#include <stdio.h>
+#include <unistd.h>
+
+#define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid())
+
typedef unsigned char * Str255;
typedef int OSErr;
+typedef enum {
+ FALSE,
+ TRUE
+} Boolean;
+
typedef struct UnsignedWide
{
unsigned int lo;
unsigned int hi;
} UnsignedWide;
+typedef struct Point
+{
+ int h;
+ int v;
+} Point;
+
+#define Random rand
+
void Microseconds (UnsignedWide *microTickCount);
OSErr FSRead(int refNum, long *count, void *buffPtr);
+void GetMouse(Point *p);
+void GetKeys(unsigned long *keys);
#endif