Moved and renamed terminal_error.* to fatal_error.*
This commit is contained in:
@@ -120,7 +120,7 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
|||||||
else {
|
else {
|
||||||
std::ostringstream msg;
|
std::ostringstream msg;
|
||||||
msg << "Failed to retrieve window info: " << SDL_GetError();
|
msg << "Failed to retrieve window info: " << SDL_GetError();
|
||||||
throw(msg.str());
|
throw(std::runtime_error(msg.str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ private:
|
|||||||
SDL_Window* window = nullptr;
|
SDL_Window* window = nullptr;
|
||||||
SDL_Renderer* renderer = nullptr;
|
SDL_Renderer* renderer = nullptr;
|
||||||
|
|
||||||
//shared parameters
|
//global scene parameters
|
||||||
int clientIndex = -1;
|
int clientIndex = -1;
|
||||||
int accountIndex = -1;
|
int accountIndex = -1;
|
||||||
};
|
};
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#config
|
|
||||||
INCLUDES+=.
|
|
||||||
LIBS+=
|
|
||||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
|
||||||
|
|
||||||
#source
|
|
||||||
CXXSRC=$(wildcard *.cpp)
|
|
||||||
|
|
||||||
#objects
|
|
||||||
OBJDIR=obj
|
|
||||||
OBJ+=$(addprefix $(OBJDIR)/,$(CXXSRC:.cpp=.o))
|
|
||||||
|
|
||||||
#output
|
|
||||||
OUTDIR=..
|
|
||||||
OUT=$(addprefix $(OUTDIR)/,client.a)
|
|
||||||
|
|
||||||
#targets
|
|
||||||
all: $(OBJ) $(OUT)
|
|
||||||
ar -crs $(OUT) $(OBJ)
|
|
||||||
|
|
||||||
$(OBJ): | $(OBJDIR)
|
|
||||||
|
|
||||||
$(OUT): | $(OUTDIR)
|
|
||||||
|
|
||||||
$(OBJDIR):
|
|
||||||
mkdir $(OBJDIR)
|
|
||||||
|
|
||||||
$(OUTDIR):
|
|
||||||
mkdir $(OUTDIR)
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.cpp
|
|
||||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
||||||
@@ -21,3 +21,4 @@
|
|||||||
*/
|
*/
|
||||||
#include "terminal_error.hpp"
|
#include "terminal_error.hpp"
|
||||||
|
|
||||||
|
//DOCS: This empty file is used to force an object file
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class terminal_error: public std::runtime_error {
|
class fatal_error: public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
explicit terminal_error(const std::string& str): runtime_error(str) {}
|
explicit fatal_error(const std::string& str): runtime_error(str) {}
|
||||||
explicit terminal_error(const char* cstr): runtime_error(cstr) {}
|
explicit fatal_error(const char* cstr): runtime_error(cstr) {}
|
||||||
};
|
};
|
||||||
+1
-2
@@ -1,5 +1,5 @@
|
|||||||
#include directories
|
#include directories
|
||||||
INCLUDES+=. client_utilities entities scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities
|
INCLUDES+=. entities scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities
|
||||||
|
|
||||||
#libraries
|
#libraries
|
||||||
#the order of the $(LIBS) is important, at least for MinGW
|
#the order of the $(LIBS) is important, at least for MinGW
|
||||||
@@ -29,7 +29,6 @@ OUT=$(addprefix $(OUTDIR)/,client)
|
|||||||
|
|
||||||
#targets
|
#targets
|
||||||
all: $(OBJ) $(OUT)
|
all: $(OBJ) $(OUT)
|
||||||
$(MAKE) -C client_utilities
|
|
||||||
$(MAKE) -C entities
|
$(MAKE) -C entities
|
||||||
$(MAKE) -C scenes
|
$(MAKE) -C scenes
|
||||||
$(CXX) $(CXXFLAGS) -o $(OUT) $(OBJ) $(LIBS)
|
$(CXX) $(CXXFLAGS) -o $(OUT) $(OBJ) $(LIBS)
|
||||||
|
|||||||
@@ -35,15 +35,11 @@ SplashScreen::SplashScreen(SDL_Window* w) {
|
|||||||
|
|
||||||
logo.Load(GetRenderer(), ConfigUtility::GetSingleton()["dir.logos"] + "krstudios.png");
|
logo.Load(GetRenderer(), ConfigUtility::GetSingleton()["dir.logos"] + "krstudios.png");
|
||||||
|
|
||||||
// SDL_SetWindowSize(window, logo.GetClipW(), logo.GetClipH());
|
|
||||||
// SDL_RenderSetLogicalSize(GetRenderer(), logo.GetClipW(), logo.GetClipH());
|
|
||||||
|
|
||||||
startTick = std::chrono::steady_clock::now();
|
startTick = std::chrono::steady_clock::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
SplashScreen::~SplashScreen() {
|
SplashScreen::~SplashScreen() {
|
||||||
// SDL_SetWindowSize(window, windowWidth, windowHeight);
|
//
|
||||||
// SDL_RenderSetLogicalSize(GetRenderer(), windowWidth, windowHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
@@ -58,6 +54,7 @@ void SplashScreen::FrameStart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SplashScreen::RenderFrame(SDL_Renderer* renderer) {
|
void SplashScreen::RenderFrame(SDL_Renderer* renderer) {
|
||||||
|
//TODO: version information
|
||||||
int w = 0, h = 0;
|
int w = 0, h = 0;
|
||||||
SDL_RenderGetLogicalSize(renderer, &w, &h);
|
SDL_RenderGetLogicalSize(renderer, &w, &h);
|
||||||
logo.DrawTo(renderer, (w - logo.GetClipW()) / 2, (h - logo.GetClipH()) / 2);
|
logo.DrawTo(renderer, (w - logo.GetClipW()) / 2, (h - logo.GetClipH()) / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user