X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.hpp;h=c5a3632ed6c7430a7039bd0b0b80610c33e74125;hb=032eb3ccf8e2ccc6a150ac2765eb56daef77942e;hp=2a0f874be549aa749b8a941ad842fe78ba62691b;hpb=487fc31578d1fa8d0d2b11fdb59aaca074bce6e2;p=lugaru.git diff --git a/Source/Game.hpp b/Source/Game.hpp index 2a0f874..c5a3632 100644 --- a/Source/Game.hpp +++ b/Source/Game.hpp @@ -1,6 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games -Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) +Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -32,7 +32,7 @@ along with Lugaru. If not, see . #include "Graphic/Stereo.hpp" #include "Graphic/Text.hpp" #include "Graphic/Texture.hpp" -#include "Objects/Objects.hpp" +#include "Objects/Object.hpp" #include "Objects/Person.hpp" #include "Objects/Weapons.hpp" #include "Thirdparty/optionparser.h" @@ -72,7 +72,7 @@ extern int oldmousecoordh, oldmousecoordv; extern float yaw, pitch; extern SkyBox *skybox; extern bool cameramode; -extern bool firstload; +extern bool firstLoadDone; extern float leveltime; extern float wonleveltime; @@ -98,6 +98,7 @@ extern XYZ mapcenter; extern float mapradius; extern Text *text; +extern Text *textmono; extern float fps; extern bool editorenabled; @@ -120,11 +121,6 @@ extern int numchallengelevels; extern bool console; extern std::string consoletext[15]; -extern std::string displaytext[15]; -extern float displaytime[15]; -extern float displayblinkdelay; -extern bool displayblink; -extern unsigned displayselected; extern float consoleblinkdelay; extern bool consoleblink; extern unsigned consoleselected; @@ -148,21 +144,28 @@ void LoadingScreen(); int DrawGLScene(StereoSide side); void playdialoguescenesound(); int findClosestPlayer(); -void Loadlevel(int which); -void Loadlevel(const std::string& name); +bool LoadLevel(int which); +bool LoadLevel(const std::string& name, bool tutorial = false); + +void ProcessInput(); +void ProcessDevInput(); + void Tick(); void TickOnce(); void TickOnceAfter(); + void SetUpLighting(); GLvoid ReSizeGLScene(float fov, float near); -int checkcollide(XYZ startpoint, XYZ endpoint); -int checkcollide(XYZ startpoint, XYZ endpoint, int what); void fireSound(int sound = fireendsound); void inputText(std::string& str, unsigned* charselected); void flash(float amount = 1, int delay = 1); } +float roughDirection(XYZ vec); +float roughDirectionTo(XYZ start, XYZ end); +float pitchTo(XYZ start, XYZ end); +float sq(float n); #ifndef __forceinline # ifdef __GNUC__ @@ -198,19 +201,12 @@ enum editortypes {typeactive, typesitting, typesittingwall, typesleeping, extern const char *editortypenames[8]; -extern const char *rabbitskin[10]; - -extern const char *wolfskin[3]; - -extern const char **creatureskin[2]; - SDL_bool sdlEventProc(const SDL_Event &e); - -enum optionIndex { UNKNOWN, HELP, FULLSCREEN, NOMOUSEGRAB, SOUND, OPENALINFO, SHOWRESOLUTIONS, DEVTOOLS }; +enum optionIndex { UNKNOWN, VERSION, HELP, FULLSCREEN, NOMOUSEGRAB, SOUND, OPENALINFO, SHOWRESOLUTIONS, DEVTOOLS }; /* Number of options + 1 */ -const int commandLineOptionsNumber = 9; +const int commandLineOptionsNumber = 10; extern const option::Descriptor usage[13];