SAGA2: Fix more warnings

This commit is contained in:
Eugene Sandulenko 2021-06-23 12:20:59 +02:00
parent 54d2e7ac11
commit a640006ea6
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
5 changed files with 5 additions and 50 deletions

View File

@ -48,8 +48,6 @@ namespace Saga2 {
uint8 weight = 0;
uint8 encum = 0;
const hResID containerGroupID = MKTAG('C', 'O', 'N', 'T');
const int maxOpenDistance = 32;
// selector image pointer
static void *selImage;
@ -340,8 +338,6 @@ void ContainerView::totalObjects(void) {
// If the object is visible, then add to total mass and
// bulk.
if (isVisible(item)) {
// get the container slot location and count
TilePoint objLoc = item->getLocation();
uint16 numItems;
ProtoObj *proto = item->proto();
@ -1686,7 +1682,7 @@ extern int16 openMindType;
// kind of container is appropriate, and also if a container of that
// type is already open.
ContainerNode *CreateContainerNode(ObjectID id, bool open, int16) {
ContainerNode *cn;
ContainerNode *cn = NULL;
GameObject *obj = GameObject::objectAddress(id);
PlayerActorID owner;

View File

@ -36,9 +36,6 @@ extern bool gameRunning;
extern bool delayReDraw;
extern gDisplayPort mainPort; // default rendering port
extern BackWindow *mainWindow; // main window...
#ifdef _WIN32
extern CFTWindow *pWindow;
#endif
/* ===================================================================== *
Globals
@ -53,10 +50,6 @@ bool paletteMayHaveChanged = false;
static uint32 displayStatus = GraphicsInit;
static bool paletteSuspendFlag = false;
#ifndef _WIN32
static bool VideoSaved = false;
static uint8 VideoSaveMode;
#endif
/* ===================================================================== *
@ -73,10 +66,6 @@ void lightsOut(void);
void loadingScreen(void);
void resetInputDevices(void);
APPFUNC(cmdWindowFunc); // main window event handler
#ifdef _WIN32
void suspendProcessResources(void);
void resumeProcessResources(void);
#endif
static void switchOn(void);
static void switchOff(void);
@ -103,9 +92,6 @@ void niceScreenStartup(void) {
disablePaletteChanges();
mainEnable();
closeLoadMode();
#ifdef _WIN32
localCursorOn();
#endif
pointer.move(Point16(320, 240));
//pointer.hide();
enablePaletteChanges();
@ -260,28 +246,10 @@ void reDrawScreen(void) {
* ===================================================================== */
void blackOut(void) {
bool dispEnable = displayEnabled();
#ifdef _WIN32
if (!dispEnable)
resumeDDGraphics();
#endif
mainPort.drawMode = drawModeReplace;
mainPort.setColor(0); // fill screen with color
mainPort.fillRect(Rect16(0, 0, 640, 480));
#ifdef _WIN32
if (pWindow) {
pWindow->SetEraseColor(0);
pWindow->Erase();
pWindow->FillBackBuffer();
pWindow->Flip();
pWindow->Erase();
}
#endif
lightsOut();
#ifdef _WIN32
if (!dispEnable)
suspendDDGraphics();
#endif
}

View File

@ -743,16 +743,13 @@ void DisplayNode::drawObject(void) {
// If we were carrying something in the right hand,
// then fill in the component structure for it.
if (rightIndex >= 0) {
GameObject *ob;
ProtoObj *proto;
ob = GameObject::objectAddress(a->rightHandObject);
proto = ob->proto();
GameObject *ob = GameObject::objectAddress(a->rightHandObject);
ProtoObj *prot = ob->proto();
ob->getColorTranslation(rightColors);
sc = &scList[rightIndex];
sc->sp = proto->getOrientedSprite(
sc->sp = prot->getOrientedSprite(
ob,
a->poseInfo.rightObjectIndex);
assert(sc->sp != NULL);
@ -969,8 +966,6 @@ void DisplayNode::drawEffect(void) {
}
void Effectron::drawEffect(void) {
const int16 partCount = 1;
const int16 bodyIndex = 0;
ColorTable eColors; // colors for object
bool obscured = false;
Point16 drawPos;

View File

@ -117,9 +117,6 @@ public:
void updateOStates(const int32 deltaTime);
void updateEStates(const int32 deltaTime);
bool dissipated(void);
private:
int16 sortDepth; // for sorting by depth
};
/* ============================================================================ *

View File

@ -552,7 +552,7 @@ bool CDocument::checkForImage(char *string,
// image detected marker
if (strIndex[1] == dImage[0] &&
strIndex[2] == dImage[1]) {
int16 numEat; // number of characters to eat
int16 numEat = 0; // number of characters to eat
char *argv = &strIndex[2 + 1]; // array to first element
// delete context
@ -908,7 +908,6 @@ int16 openScroll(uint16 textScript) {
gCompButton *closeScroll;
void **closeBtnImage;
uint16 buttonResID = 0;
uint16 numBtnImages = 2;
hResContext *decRes;
// init the resource context handle