X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.hpp;h=63070927149d101fd87f619e554558193b5b814e;hb=c3d275ada8dc8c67e9930d23587e0c203761a056;hp=596ade47f59dfb58d325024e922f0ff5f6f5dd97;hpb=ed3662c0852c4312a612b4fc35bd03aba8d13db7;p=lugaru.git diff --git a/Source/Game.hpp b/Source/Game.hpp index 596ade4..6307092 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__ @@ -183,13 +186,6 @@ static __forceinline void swap_gl_buffers(void) frameticks = now; } -extern "C" { - void UndefinedSymbolToExposeStubbedCode(void); -} -//#define STUBBED(x) UndefinedSymbolToExposeStubbedCode(); -#define STUBBED(x) { static bool seen = false; if (!seen) { seen = true; fprintf(stderr, "STUBBED: %s at %s:%d\n", x, __FILE__, __LINE__); } } -//#define STUBBED(x) - enum maptypes { mapkilleveryone, mapgosomewhere, mapkillsomeone, mapkillmost // These two are unused @@ -215,9 +211,9 @@ 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];