]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CEngine.h
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / CEngine.h
index d054bb879f6c1d4b6cec6b2b26d2283c72e157e3..e8ab5583f78e84eb5c130fdcdfc7d92cf0be5197 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -44,10 +45,13 @@ class Engine {
                
                int extremeAvailable;
 
-               char keyState[350];
+               char keyState[SDL_NUM_SCANCODES];
                char mouseLeft, mouseRight;
                
                int joyX, joyY;
+               int joyprevX, joyprevY;
+               int joykeyX, joykeyY;
+               bool joykeyFire;
                int joystickState[32]; // hopefully no one has a joystick with this many buttons(!)
                bool waitForButton;
                bool waitForKey;
@@ -97,10 +101,10 @@ class Engine {
        Engine();
        void destroy();
        void getInput();
-       int getMouseX();
-       int getMouseY();
+       int getMouseX() const;
+       int getMouseY() const;
 
-       void setMouse(int x, int y);
+       void moveMouse(int dx, int dy);
        bool userAccepts();
        
        void clearCheatVars();
@@ -114,10 +118,10 @@ class Engine {
        bool loadData(const char *filename);
        void reportFontFailure();
        void setPlayerPosition(int x, int y, int limitLeft, int limitRight, int limitUp, int limitDown);
-       int getFrameLoop();
+       int getFrameLoop() const;
        void doFrameLoop();
        void doTimeDifference();
-       float getTimeDifference();
+       float getTimeDifference() const;
        void resetTimeDifference();
        void setInfoMessage(const char *message, int priority, int type);
        void deleteWidgets();