diff --git a/src/font.cpp b/src/font.cpp index 894bc5e..8900950 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -128,7 +128,7 @@ TTF_Font *SharedFontState::getFont(std::string family, int size){ SDL_IOStream *ops; if (family.empty()){ - crash("font does not exist", Exception::RGSSError, true); + crash(Exception::RGSSError, "font does not exist"); }else{ /* Use 'other' path as alternative in case * we have no 'regular' styled font asset */ @@ -143,8 +143,7 @@ TTF_Font *SharedFontState::getFont(std::string family, int size){ font = TTF_OpenFontIO(ops, 1, size); if (!font){ - snprintf(msg, sizeof msg, "%s", SDL_GetError()); - crash(msg, Exception::SDLError, true); + crash(Exception::SDLError, "%s", SDL_GetError()); } p->pool.insert(key, font); @@ -161,10 +160,7 @@ bool SharedFontState::fontPresent(std::string family) const{ return !(set.regular.empty() && set.other.empty()); } -void pickExistingFontName(const std::vector &names, - std::string &out, - const SharedFontState &sfs) -{ +void pickExistingFontName(const std::vector &names, std::string &out, const SharedFontState &sfs){ /* Note: In RMXP, a names array with no existing entry * results in no text being drawn at all (same for "" and []); * we can't replicate this in mkxp due to the default substitute. */ @@ -309,7 +305,7 @@ void Font::setSize(int value){ /* Catch illegal values (according to RMXP) */ if (value < 6 || value > 96) - throw Exception(Exception::ArgumentError, "%s", "bad value for size"); + crash(Exception::ArgumentError, "%s", "bad value for size"); p->size = value; p->sdlFont = 0; diff --git a/src/gl-fun.cpp b/src/gl-fun.cpp index 428b6fb..826eb3e 100644 --- a/src/gl-fun.cpp +++ b/src/gl-fun.cpp @@ -23,6 +23,7 @@ #include "boost-hash.h" #include "exception.h" +#include "meow.h" #include #include @@ -32,8 +33,7 @@ GLFunctions gl; typedef const GLubyte* (APIENTRYP _PFNGLGETSTRINGIPROC) (GLenum, GLuint); static void parseExtensionsCore(_PFNGLGETINTEGERVPROC GetIntegerv, BoostSet &out){ - _PFNGLGETSTRINGIPROC GetStringi = - (_PFNGLGETSTRINGIPROC) SDL_GL_GetProcAddress("glGetStringi"); + _PFNGLGETSTRINGIPROC GetStringi = (_PFNGLGETSTRINGIPROC) SDL_GL_GetProcAddress("glGetStringi"); GLint extCount = 0; GetIntegerv(GL_NUM_EXTENSIONS, &extCount); @@ -69,7 +69,7 @@ static void parseExtensionsCompat(_PFNGLGETSTRINGPROC GetString, BoostSet