This commit is contained in:
DepressedTWM 2026-06-03 12:51:00 -04:00
parent 0df0aa9431
commit 13c180174c
6 changed files with 15 additions and 22 deletions

View file

@ -37,7 +37,7 @@ else()
if (MSVC)
add_compile_options(/O2 /fp:fast /GL /GF /GA)
else()
add_compile_options(-O3 -ffast-math -flto -pipe -funroll-loops -falign-functions=16 -falign-jumps=8 -falign-loops=8 -fno-common)
add_compile_options(-O3 -ffast-math -flto -pipe -funroll-loops -falign-functions=16 -falign-jumps=8 -falign-loops=8 -fno-common -s)
add_link_options(-Wl,-O2)
endif()
endif()

View file

@ -269,8 +269,7 @@ bool Font::doesExist(const char *name){
return shState->fontState().fontPresent(name);
}
Font::Font(const std::vector<std::string> *names,
int size){
Font::Font(const std::vector<std::string> *names, unsigned int size){
p = new FontPrivate(size ? size : FontPrivate::defaultSize);
if (names)

View file

@ -45,11 +45,9 @@ public:
* (when "Fonts/" is scanned for available assets).
* 'ops' is an opened handle to a possible font file,
* 'filename' is the corresponding path */
void initFontSetCB(SDL_IOStream* &ops,
const std::string &filename);
void initFontSetCB(SDL_IOStream* &ops, const std::string &filename);
TTF_Font *getFont(std::string family,
int size);
TTF_Font *getFont(std::string family, unsigned int size);
bool fontPresent(std::string family) const;
@ -63,8 +61,7 @@ class Font{
public:
static bool doesExist(const char *name);
Font(const std::vector<std::string> *names = 0,
int size = 0);
Font(const std::vector<std::string> *names = 0, unsigned int size = 0);
/* Clone constructor */
Font(const Font &other);
@ -96,8 +93,7 @@ public:
* The core object picks the first existing name from the
* passed array and stores it internally (same for default). */
void setName(const std::vector<std::string> &names);
static void setDefaultName(const std::vector<std::string> &names,
const SharedFontState &sfs);
static void setDefaultName(const std::vector<std::string> &names, const SharedFontState &sfs);
static const std::vector<std::string> &getInitialDefaultNames();

View file

@ -47,7 +47,7 @@ struct ViewportPrivate{
EtcTemps tmp;
ViewportPrivate(int x, int y, int width, int height, Viewport *self)
ViewportPrivate(int x, int y, unsigned int width, unsigned int height, Viewport *self)
: self(self),
rect(&tmp.rect),
color(&tmp.color),
@ -91,7 +91,7 @@ struct ViewportPrivate{
}
};
Viewport::Viewport(int x, int y, int width, int height)
Viewport::Viewport(int x, int y, unsigned int width, unsigned int height)
: SceneElement(*shState->screen()),
sceneLink(this)
{
@ -113,7 +113,7 @@ Viewport::Viewport()
initViewport(0, 0, graphics.width(), graphics.height());
}
void Viewport::initViewport(int x, int y, int width, int height){
void Viewport::initViewport(int x, int y, unsigned int width, unsigned int height){
p = new ViewportPrivate(x, y, width, height, this);
/* Set our own geometry */
@ -210,7 +210,6 @@ void Viewport::releaseResources(){
delete p;
}
ViewportElement::ViewportElement(Viewport *viewport, int z, int spriteY)
: SceneElement(viewport ? *viewport : *shState->screen(), z, spriteY),
m_viewport(viewport)

View file

@ -31,7 +31,7 @@ struct ViewportPrivate;
class Viewport : public Scene, public SceneElement, public Flashable, public Disposable{
public:
Viewport(int x, int y, int width, int height);
Viewport(int x, int y, unsigned int width, unsigned int height);
Viewport(Rect *rect);
Viewport();
~Viewport();
@ -47,7 +47,7 @@ public:
void initDynAttribs();
private:
void initViewport(int x, int y, int width, int height);
void initViewport(int x, int y, unsigned int width, unsigned int height);
void geometryChanged();
void composite();

View file

@ -63,16 +63,15 @@ struct VorbisSource : ALDataSource{
} loop;
struct{
int channels;
int rate;
int frameSize;
unsigned int channels;
unsigned int rate;
unsigned int frameSize;
ALenum alFormat;
} info;
std::vector<int16_t> sampleBuf;
VorbisSource(SDL_IOStream &ops,
bool looped)
VorbisSource(SDL_IOStream &ops, bool looped)
: src(ops),
currentFrame(0)
{