mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
WATCHMAKER: Clear out some warnings
This commit is contained in:
parent
4119ee5b1a
commit
1a23491270
@ -707,7 +707,6 @@ void ReleasePreloadedAnims() {
|
||||
* --------------------------------------------------*/
|
||||
uint8 CompareLightPosition(char *roomname, uint8 pos1, t3dV3F *pos2, t3dF32 acceptable_dist) {
|
||||
t3dV3F p1;
|
||||
uint8 a;
|
||||
t3dBODY *t;
|
||||
int32 i;
|
||||
|
||||
|
@ -35,10 +35,10 @@ DDSHeader::DDSHeader(Common::SeekableReadStream &stream) {
|
||||
// The size counts the datastructure, which doesn't include the magic
|
||||
int initialPos = stream.pos();
|
||||
uint32 size = stream.readUint32LE();
|
||||
uint32 flags = stream.readUint32LE();
|
||||
/*uint32 flags = */ stream.readUint32LE();
|
||||
this->height = stream.readUint32LE();
|
||||
this->width = stream.readUint32LE();
|
||||
uint32 dataSize = stream.readUint32LE();
|
||||
/*uint32 dataSize = */ stream.readUint32LE();
|
||||
stream.seek(13 * 4, SEEK_CUR);
|
||||
stream.readUint32LE();
|
||||
uint32 pfFlags = stream.readUint32LE();
|
||||
|
@ -200,7 +200,6 @@ uint8 t3dCheckBoundBox(t3dMESH &mesh) {
|
||||
void t3dCheckBlockMesh(Common::Array<t3dMESH> &mt, uint32 NumMeshes, t3dMESH *blockmesh) {
|
||||
t3dF32 xa, za, xb, zb, xc, zc, xd, zd;
|
||||
t3dF32 r, s, divisor;
|
||||
t3dMESH *mesh;
|
||||
|
||||
uint32 i, j;
|
||||
uint8 ref[4] = {2, 3, 6, 7};
|
||||
|
@ -253,7 +253,6 @@ t3dBODY *t3dLoadRoom(WGame &game, const Common::String &pname, t3dBODY *b, uint1
|
||||
warning("t3dLoadRoom(%s, b, %d, %d)", pname.c_str(), *NumBody, LoaderFlags);
|
||||
struct _t3dLOADLIST *l;
|
||||
t3dBODY *r, *rez;
|
||||
t3dBODY *body;
|
||||
uint16 num, i;
|
||||
|
||||
// azzera tutto quello che c'era prima nella load list
|
||||
@ -268,15 +267,15 @@ t3dBODY *t3dLoadRoom(WGame &game, const Common::String &pname, t3dBODY *b, uint1
|
||||
num = 0;
|
||||
if (l->m) {
|
||||
if ((rez = CheckIfAlreadyLoaded(l->pname)))
|
||||
body = l->m->PortalList = rez;
|
||||
l->m->PortalList = rez;
|
||||
else {
|
||||
// if (l->m->Flags&T3D_MESH_PREPROCESSPORTAL)
|
||||
// body=l->m->PortalList = t3dLoadSingleRoom( l->pname, l->m->PortalList, &num, (l->LoaderFlags|T3D_HALFTEXTURESIZE) );
|
||||
// else
|
||||
body = l->m->PortalList = t3dLoadSingleRoom(game, l->pname, l->m->PortalList, &num, l->LoaderFlags);
|
||||
l->m->PortalList = t3dLoadSingleRoom(game, l->pname, l->m->PortalList, &num, l->LoaderFlags);
|
||||
}
|
||||
} else
|
||||
body = r = t3dLoadSingleRoom(game, l->pname, b, NumBody, l->LoaderFlags);
|
||||
r = t3dLoadSingleRoom(game, l->pname, b, NumBody, l->LoaderFlags);
|
||||
|
||||
*l = _t3dLOADLIST();
|
||||
}
|
||||
|
@ -142,8 +142,6 @@ void rRemoveMaterials(Common::Array<Common::SharedPtr<gMaterial>> &m) {
|
||||
}
|
||||
|
||||
Common::SharedPtr<gMaterial> rCopyMaterial(Common::SharedPtr<gMaterial> Mat1, Common::SharedPtr<gMaterial> Mat2) {
|
||||
int i;
|
||||
|
||||
if (!Mat1 || !Mat2)
|
||||
return nullptr;
|
||||
|
||||
@ -184,7 +182,7 @@ Common::SharedPtr<gMaterial> rCopyMaterial(Common::SharedPtr<gMaterial> Mat1, Co
|
||||
if (Mat2->NumAddictionalMaterial)
|
||||
Mat1->AddictionalMaterial.resize(Mat2->NumAddictionalMaterial); // TODO: Does this mean that we don't copy any extras?
|
||||
|
||||
for (i = 0; i < Mat2->NumAddictionalMaterial; i++)
|
||||
for (int i = 0; i < Mat2->NumAddictionalMaterial; i++)
|
||||
rCopyMaterial(Mat1->AddictionalMaterial[i], Mat2->AddictionalMaterial[i]);
|
||||
|
||||
return Mat1;
|
||||
|
@ -41,8 +41,6 @@ namespace Watchmaker {
|
||||
|
||||
// Bitmap list
|
||||
unsigned int gNumBitmapList = 0;
|
||||
uint16 *gFonts[10];
|
||||
unsigned int gNumFonts = 0;
|
||||
gTexture gBitmapList[MAX_BITMAP_LIST];
|
||||
Rect gBlitterExtends;
|
||||
int gStencilBitDepth;
|
||||
@ -178,7 +176,7 @@ void renderTexture(WGame &game, gTexture &bitmap, Rect srcRect, Rect dstRect) {
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
bitmap.texture->bind();
|
||||
bitmap._texture->bind();
|
||||
glLoadIdentity();
|
||||
glTranslatef(0, 0, 0.0);
|
||||
|
||||
@ -215,7 +213,7 @@ void renderTexture(WGame &game, gTexture &bitmap, Rect srcRect, Rect dstRect) {
|
||||
|
||||
void gTexture::render(WGame &game, Rect src, Rect dst) {
|
||||
// Render self
|
||||
if (texture) {
|
||||
if (_texture) {
|
||||
renderTexture(game, *this, src, dst);
|
||||
}
|
||||
for (int i = 0; i < _blitsOnTop.size(); i++) {
|
||||
@ -361,8 +359,8 @@ int rLoadBitmapImage(WGame &game, const char *TextName, unsigned char flags) {
|
||||
auto surface = ReadTgaImage(TextName, *stream, RGBA8888, Texture->Flags);
|
||||
applyColorKey(*surface, 0, 0, 0, false);
|
||||
auto texData = createTextureFromSurface(*surface, GL_RGBA);
|
||||
Texture->texture = createGLTexture();
|
||||
Texture->texture->assignData(*texData);
|
||||
Texture->_texture = createGLTexture();
|
||||
Texture->_texture->assignData(*texData);
|
||||
Texture->name = TextName;
|
||||
|
||||
if (flags & rSURFACESTRETCH) { // Also rSURFACEFLIP
|
||||
|
@ -549,7 +549,7 @@ gTexture *gUserTexture(Texture *texture, unsigned int dimx, unsigned int dimy) {
|
||||
#endif
|
||||
}
|
||||
|
||||
Texture->texture = texture;
|
||||
Texture->_texture = texture;
|
||||
return Texture;
|
||||
}
|
||||
|
||||
@ -710,7 +710,7 @@ gTexture *gLoadTexture(WorkDirs &workDirs, const char *TextName, unsigned int Lo
|
||||
}
|
||||
texture = &gTextureList[pos];
|
||||
*texture = gTexture();
|
||||
texture->texture = new OpenGLTexture();
|
||||
texture->_texture = new OpenGLTexture();
|
||||
|
||||
if (bUseAlternate) {
|
||||
auto stream = workDirs.resolveFile(AlternateName);
|
||||
@ -719,7 +719,7 @@ gTexture *gLoadTexture(WorkDirs &workDirs, const char *TextName, unsigned int Lo
|
||||
return nullptr;
|
||||
}
|
||||
auto ddsTextureData = loadDdsTexture(*stream);
|
||||
texture->texture->assignData(*ddsTextureData);
|
||||
texture->_texture->assignData(*ddsTextureData);
|
||||
dwWidth = ddsTextureData->getWidth();
|
||||
dwHeight = ddsTextureData->getHeight();
|
||||
lpSSource = nullptr;
|
||||
@ -760,7 +760,7 @@ gTexture *gLoadTexture(WorkDirs &workDirs, const char *TextName, unsigned int Lo
|
||||
auto image = ReadTgaImage(TextName, *stream, Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24), 0); // TODO Flags
|
||||
SurfaceBackedTextureData texData(image);
|
||||
|
||||
texture->texture->assignData(texData);
|
||||
texture->_texture->assignData(texData);
|
||||
#if 0
|
||||
//warning("TODO: Handle TGA");
|
||||
if (!t3dOpenFile(TextName)) {
|
||||
|
@ -153,7 +153,7 @@ void OpenGLRenderer::setTexture(int stage, void *texture) {
|
||||
}
|
||||
}
|
||||
void OpenGLRenderer::setTexture(int stage, const gTexture &texture) {
|
||||
texture.texture->bind();
|
||||
texture._texture->bind();
|
||||
}
|
||||
|
||||
void setGlFeature(GLint feature, bool state) {
|
||||
|
@ -36,7 +36,7 @@ class WGame;
|
||||
// Texture structs
|
||||
struct gTexture {
|
||||
Common::String name;
|
||||
Texture *texture = nullptr;
|
||||
Texture *_texture = nullptr;
|
||||
int RealDimX = 0; // original dimensions
|
||||
int RealDimY = 0; // original dimensions
|
||||
int DimX = 0; // current dimensions
|
||||
@ -45,7 +45,7 @@ struct gTexture {
|
||||
int Flags = 0; // Flags
|
||||
|
||||
bool isEmpty() {
|
||||
return texture == nullptr;
|
||||
return _texture == nullptr;
|
||||
}
|
||||
void clear() {
|
||||
// TODO: This will only work for the back-surface
|
||||
|
@ -214,29 +214,29 @@ void Render3DEnvironment(WGame &game) {
|
||||
for (i = 0; i < T3D_MAX_CHARACTERS; i++)
|
||||
if (Character[i] && (i != ocBOTH) && (i != ocDARRELL))
|
||||
if (!t3dTransformCharacter(Character[i])) // Proietta personaggi
|
||||
DebugLogWindow("Can't transform %s", Character[i]->Body);
|
||||
DebugLogWindow("Can't transform %s", Character[i]->Body->name.c_str());
|
||||
} else {
|
||||
for (i = 0; i < T3D_MAX_CHARACTERS; i++)
|
||||
if (Character[i] && (i != ocBOTH))
|
||||
if (!t3dTransformCharacter(Character[i])) // Proietta personaggi
|
||||
DebugLogWindow("Can't transform %s", Character[i]->Body);
|
||||
DebugLogWindow("Can't transform %s", Character[i]->Body->name.c_str());
|
||||
}
|
||||
|
||||
if (game._gameVars.getCurRoomId() == r33) {
|
||||
for (i = 0; i < 4; i++) // Proietta oggetti speciali
|
||||
if (Lanc33[i] && !t3dTransformCharacter(Lanc33[i]))
|
||||
DebugLogWindow("Can't transform %s", Lanc33[i]->Body);
|
||||
DebugLogWindow("Can't transform %s", Lanc33[i]->Body->name.c_str());
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_GOPHERS; i++)
|
||||
if (GopherMark[i] && !t3dTransformCharacter(GopherMark[i]))
|
||||
DebugLogWindow("Can't transform %s", GopherMark[i]->Body);
|
||||
DebugLogWindow("Can't transform %s", GopherMark[i]->Body->name.c_str());
|
||||
if (Freccia50 && !t3dTransformCharacter(Freccia50))
|
||||
DebugLogWindow("Can't transform %s", Freccia50->Body);
|
||||
DebugLogWindow("Can't transform %s", Freccia50->Body->name.c_str());
|
||||
if (Palla50 && !t3dTransformCharacter(Palla50))
|
||||
DebugLogWindow("Can't transform %s", Palla50->Body);
|
||||
DebugLogWindow("Can't transform %s", Palla50->Body->name.c_str());
|
||||
if (Explode50 && !t3dTransformCharacter(Explode50))
|
||||
DebugLogWindow("Can't transform %s", Explode50->Body);
|
||||
DebugLogWindow("Can't transform %s", Explode50->Body->name.c_str());
|
||||
|
||||
t3dSortMeshes(); // Ordian le mesh
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ unsigned int gGetTextureListPosition() {
|
||||
}
|
||||
#endif
|
||||
|
||||
bool rSetRenderMode(int state) {
|
||||
void rSetRenderMode(int state) {
|
||||
warning("STUBBED: rSetRenderMode");
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ void rGetScreenInfos(unsigned int *width, unsigned int *height, unsigned int *bp
|
||||
*bpp = 32;
|
||||
}
|
||||
|
||||
gTexture *gLoadTexture(char *TextName, unsigned int LoaderFlags) {
|
||||
gTexture *gLoadTexture(char *TextName, unsigned int loaderFlags) {
|
||||
error("STUBBED gLoadTexture");
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ bool rInitialize3DEnvironment(WGame &game, char *cfg);
|
||||
char *rGetRenderDllDesc();
|
||||
void rSetFlagsFullScreen();
|
||||
bool rGetFlagsFullScreen();
|
||||
bool rSetRenderMode(int state);
|
||||
void rSetRenderMode(int state);
|
||||
bool rClearBuffers(char flags);
|
||||
void rClear(int dst, int dposx, int dposy, int sdimx, int sdimy, unsigned char r, unsigned char g, unsigned char b);
|
||||
void rGetScreenInfos(unsigned int *width, unsigned int *height, unsigned int *bpp);
|
||||
|
@ -74,10 +74,10 @@ void Renderer::initGL() {
|
||||
}
|
||||
|
||||
void Renderer::setVirtualScreen(unsigned int dimX, unsigned int dimY) {
|
||||
unsigned int width, height, bpp;
|
||||
unsigned int width, height;
|
||||
|
||||
//calculate aspect ratio
|
||||
getScreenInfos(width, height, bpp);
|
||||
getScreenInfos(width, height);
|
||||
|
||||
gAspectX = 1.0f / ((float)dimX / (float)width);
|
||||
gAspectY = 1.0f / ((float)dimY / (float)height);
|
||||
@ -85,14 +85,13 @@ void Renderer::setVirtualScreen(unsigned int dimX, unsigned int dimY) {
|
||||
gInvAspectY = (float)dimY / (float)height;
|
||||
}
|
||||
|
||||
void Renderer::getScreenInfos(unsigned int &width, unsigned int &height, unsigned int &bpp) const {
|
||||
void Renderer::getScreenInfos(unsigned int &width, unsigned int &height) const {
|
||||
sdl->getWindowSize(width, height);
|
||||
bpp = sdl->getBitDepth();
|
||||
}
|
||||
|
||||
WindowInfo Renderer::getScreenInfos() const {
|
||||
WindowInfo info;
|
||||
getScreenInfos(info.width, info.height, info.bpp);
|
||||
getScreenInfos(info.width, info.height);
|
||||
return info;
|
||||
}
|
||||
|
||||
@ -105,7 +104,7 @@ bool Renderer::createScreenBuffer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Renderer::initBlitterViewPort() {
|
||||
void Renderer::initBlitterViewPort() {
|
||||
auto info = getScreenInfos();
|
||||
Rect viewport{0, 0, (int)info.width, (int)info.height};
|
||||
|
||||
@ -179,8 +178,6 @@ void gPrintText(WGame &game, const char *s, uint32 d, uint32 src, uint16 *FontTa
|
||||
int16 i = 0, nextx, nexty;
|
||||
unsigned char c;
|
||||
|
||||
uint32 AddFlag = 0, NumRetries = 0;
|
||||
|
||||
nextx = nexty = 0;
|
||||
while ((c = s[i]) != 0) {
|
||||
i++;
|
||||
|
@ -38,7 +38,6 @@ struct gMaterial;
|
||||
struct WindowInfo {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int bpp;
|
||||
};
|
||||
|
||||
class Fonts;
|
||||
@ -56,10 +55,10 @@ public:
|
||||
void showFrame();
|
||||
|
||||
void setVirtualScreen(unsigned int dimX, unsigned int dimY);
|
||||
void getScreenInfos(unsigned int &width, unsigned int &height, unsigned int &bpp) const;
|
||||
void getScreenInfos(unsigned int &width, unsigned int &height) const;
|
||||
WindowInfo getScreenInfos() const;
|
||||
bool createScreenBuffer();
|
||||
bool initBlitterViewPort();
|
||||
void initBlitterViewPort();
|
||||
|
||||
void setCurCameraViewport(t3dF32 fov, uint8 sup);
|
||||
|
||||
|
@ -140,7 +140,7 @@ void Event(EventClass classe, uint8 event, uint16 flags, int16 wparam1, int16 wp
|
||||
pqueue *lq;
|
||||
message *lm;
|
||||
|
||||
warning("Event(%s, event=%d, flags=%d, wparam1=%d, wparam2=%d, bparam=%d", eventToString(classe), event, flags, wparam1, wparam2);
|
||||
warning("Event(%s, event=%d, flags=%d, wparam1=%d, wparam2=%d, bparam=%d", eventToString(classe), event, flags, wparam1, wparam2, bparam);
|
||||
if (classe == EventClass::MC_IDLE && !event)
|
||||
return ;
|
||||
|
||||
|
@ -31,16 +31,6 @@ void sdl_wrapper::getWindowSize(unsigned int &width, unsigned int &height) {
|
||||
height = g_system->getHeight();
|
||||
}
|
||||
|
||||
int sdl_wrapper::getBitDepth() const {
|
||||
#if 0
|
||||
int pixelFormat = SDL_GetWindowPixelFormat(window);
|
||||
int bpp;
|
||||
uint32 rMask, gMask, bMask, aMask;
|
||||
SDL_PixelFormatEnumToMasks(pixelFormat, &bpp, &rMask, &gMask, &bMask, &aMask);
|
||||
return bpp;
|
||||
#endif
|
||||
}
|
||||
|
||||
void sdl_wrapper::pollSDL() {
|
||||
// Process events
|
||||
Common::Event event;
|
||||
|
@ -37,8 +37,6 @@ public:
|
||||
|
||||
void getWindowSize(unsigned int &width, unsigned int &height);
|
||||
|
||||
int getBitDepth() const;
|
||||
|
||||
void initWindow();
|
||||
|
||||
void pollSDL();
|
||||
|
@ -156,10 +156,10 @@ int IntersLineLine(float xa, float ya, float xb, float yb, float xc, float yc, f
|
||||
Compara distanza percorso (qsort)
|
||||
--------------------------------------------------*/
|
||||
int PathCompare(const void *arg1, const void *arg2) {
|
||||
t3dPATHNODE *p1, *p2;
|
||||
const t3dPATHNODE *p1, *p2;
|
||||
|
||||
p1 = (t3dPATHNODE *)arg1;
|
||||
p2 = (t3dPATHNODE *)arg2;
|
||||
p1 = (const t3dPATHNODE *)arg1;
|
||||
p2 = (const t3dPATHNODE *)arg2;
|
||||
|
||||
if (p1->dist < p2->dist)
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user