mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
SAPF{DOGPFOSG
This commit is contained in:
parent
d1cf3a0435
commit
8d541597d3
9 changed files with 20 additions and 22 deletions
|
|
@ -79,8 +79,7 @@ static const RbException excToRbExc[] =
|
|||
MKXP /* MKXPError */
|
||||
};
|
||||
|
||||
void raiseRbExc(const Exception &exc)
|
||||
{
|
||||
void raiseRbExc(const Exception &exc){
|
||||
RbData *data = getRbData();
|
||||
VALUE excClass = data->exc[excToRbExc[exc.type]];
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
#define BINDING_UTIL_H
|
||||
|
||||
#include <ruby.h>
|
||||
//костыль ебаный сука
|
||||
#undef snprintf
|
||||
|
||||
#undef inline
|
||||
|
||||
#include "exception.h"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ DEF_TYPE_CUSTOMFREE(FileInt, fileIntFreeInstance);
|
|||
static VALUE
|
||||
fileIntForPath(const char *path, bool rubyExc)
|
||||
{
|
||||
SDL_IOStream *ops = SDL_OpenIO();
|
||||
SDL_IOStream *ops;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ struct ALStreamOpenHandler : FileSystem::OpenHandler
|
|||
|
||||
/* Try to read ogg file signature */
|
||||
char sig[5] = { 0 };
|
||||
SDL_ReadIO(srcOps, sig, 1, 4);
|
||||
SDL_ReadIO(srcOps, sig, 4);
|
||||
SDL_SeekIO(srcOps, 0, SDL_IO_SEEK_SET);
|
||||
|
||||
try
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ struct BitmapPrivate
|
|||
* getPixel calls. Is invalidated any time the bitmap
|
||||
* is modified */
|
||||
SDL_Surface *surface;
|
||||
SDL_PixelFormatDetails *format;
|
||||
SDL_PixelFormatDetails format;
|
||||
|
||||
/* The 'tainted' area describes which parts of the
|
||||
* bitmap are not cleared, ie. don't have 0 opacity.
|
||||
|
|
@ -121,9 +121,7 @@ struct BitmapPrivate
|
|||
|
||||
void allocSurface()
|
||||
{
|
||||
surface = SDL_CreateRGBSurface(0, gl.width, gl.height, format->BitsPerPixel,
|
||||
format->Rmask, format->Gmask,
|
||||
format->Bmask, format->Amask);
|
||||
surface = SDL_CreateSurface(gl.width, gl.height, format);
|
||||
}
|
||||
|
||||
void clearTaintedArea()
|
||||
|
|
@ -1259,7 +1257,7 @@ IntRect Bitmap::textSize(const char *str)
|
|||
str = fixed.c_str();
|
||||
|
||||
int w, h;
|
||||
TTF_GetStringSize(font, str, &w, &h);
|
||||
TTF_SizeText(font, str, &w, &h);
|
||||
|
||||
/* If str is one character long, *endPtr == 0 */
|
||||
const char *endPtr;
|
||||
|
|
|
|||
|
|
@ -156,8 +156,7 @@ _TTF_Font *SharedFontState::getFont(std::string family,
|
|||
throw Exception(Exception::SDLError, "%s", SDL_GetError());
|
||||
|
||||
p->pool.insert(key, font);
|
||||
|
||||
return font;
|
||||
return (_TTF_Font*)font;
|
||||
}
|
||||
|
||||
bool SharedFontState::fontPresent(std::string family) const
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ void subRectImageUpload(GLint srcW, GLint srcX, GLint srcY,
|
|||
}
|
||||
else
|
||||
{
|
||||
SDL_PixelFormat *form = src->format;
|
||||
SDL_Surface *tmp = SDL_CreateRGBSurface(0, dstW, dstH, form->BitsPerPixel,
|
||||
SDL_PixelFormat *form = &src->format
|
||||
//SDL_PixelFormat *form = src->format;
|
||||
SDL_Surface *tmp = SDL_CreateSurface(0, dstW, dstH, form->BitsPerPixel,
|
||||
form->Rmask, form->Gmask, form->Bmask, form->Amask);
|
||||
SDL_Rect srcRect = { srcX, srcY, dstW, dstH };
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,8 @@ int screenMain(Config &conf)
|
|||
//}
|
||||
|
||||
SDL_Window *win;
|
||||
win = SDL_CreateShapedWindow("The Journal",
|
||||
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
DEFAULT_WIDTH, DEFAULT_HEIGHT, 0);
|
||||
win = SDL_CreateWindow("The Journal", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, SDL_WINDOW_RESIZABLE);
|
||||
//SDL_SetWindowShape(win, );
|
||||
|
||||
if (!win)
|
||||
{
|
||||
|
|
@ -62,9 +61,10 @@ int screenMain(Config &conf)
|
|||
shapeMode.mode = ShapeModeColorKey;
|
||||
shapeMode.parameters.colorKey = colorKey;
|
||||
//SDL_Surface *surface = SDL_CreateSurface(32, 32, SDL_PIXELFORMAT_INDEX8);
|
||||
SDL_Surface *shape = SDL_CreateRGBSurface(DEFAULT_WIDTH, DEFAULT_HEIGHT, 0, 0, 0, 0);
|
||||
// SDL_Palette *palette = SDL_CreateSurfacePalette(surface);
|
||||
SDL_SetPaletteColors(shape, &black, 0, 1);
|
||||
//SDL_PIXELFORMAT_UNKNOWN - 0,0,0,0 ....maybe?
|
||||
SDL_Surface *shape = SDL_CreateSurface(DEFAULT_WIDTH, DEFAULT_HEIGHT, SDL_PIXELFORMAT_UNKNOWN);
|
||||
SDL_Palette *palette = SDL_CreateSurfacePalette(surface);
|
||||
SDL_SetPaletteColors(palette, &black, 0, 1);
|
||||
|
||||
char messageBuf[256];
|
||||
|
||||
|
|
|
|||
|
|
@ -395,10 +395,8 @@ struct SettingsMenuPrivate
|
|||
{
|
||||
int bpp;
|
||||
Uint32 rMask, gMask, bMask, aMask;
|
||||
SDL_GetMasksForPixelFormat(SDL_PIXELFORMAT_ABGR8888,
|
||||
&bpp, &rMask, &gMask, &bMask, &aMask);
|
||||
//SDL_Surface *surface = SDL_CreateSurface(32, 32, SDL_PIXELFORMAT_INDEX8);
|
||||
return SDL_CreateRGBSurface(w, h, rMask, gMask, bMask, 0);
|
||||
return SDL_CreateSurface(w, h, SDL_PIXELFORMAT_ABGR8888);
|
||||
}
|
||||
|
||||
void fillSurface(SDL_Surface *surf, uint8_t grey){
|
||||
|
|
|
|||
Loading…
Reference in a new issue