Fixed pal init

svn-id: r3815
This commit is contained in:
Vincent Hamm 2002-03-24 17:49:47 +00:00
parent 14e6021141
commit 92a19c45ae
11 changed files with 19 additions and 19 deletions

View file

@ -1,7 +1,7 @@
# $Header$ # $Header$
CC = gcc CC = gcc
CFLAGS = -g -Wall -Wstrict-prototypes -Wno-long-long -Wno-multichar CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar
DEFINES = -DUNIX -DUSE_ADLIB DEFINES = -DUNIX -DUSE_ADLIB
LDFLAGS := LDFLAGS :=
INCLUDES:= `sdl-config --cflags` -I./ -I./sound INCLUDES:= `sdl-config --cflags` -I./ -I./sound

View file

@ -552,7 +552,7 @@ void Scumm::akos_codec1(AkosRenderer *ar) {
int num_colors; int num_colors;
bool use_scaling; bool use_scaling;
int i,j; int i,j;
int x,x_right,x_left,skip,tmp_x,tmp_y; int x,x_right,x_left,skip=0,tmp_x,tmp_y;
int y,y_top,y_bottom; int y,y_top,y_bottom;
bool y_clipping; bool y_clipping;
bool charsetmask; bool charsetmask;

View file

@ -508,7 +508,7 @@ void Scumm::createBoxMatrix() {
int code; int code;
PathVertex *vtx; PathVertex *vtx;
PathNode *node, *node2; PathNode *node, *node2=NULL;
_maxBoxVertexHeap = 1000; _maxBoxVertexHeap = 1000;
@ -861,7 +861,7 @@ int Scumm::findPathTowardsOld(Actor *a, byte trap1, byte trap2, byte final_trap)
void Scumm::GetGates(int trap1,int trap2) { void Scumm::GetGates(int trap1,int trap2) {
int i; int i;
int Closest1,Closest2,Closest3; int Closest1=0,Closest2=0,Closest3=0;
int Dist[8]; int Dist[8];
int Dist1,Dist2,Dist3; int Dist1,Dist2,Dist3;
int Box1,Box2,Box3; int Box1,Box2,Box3;

10
gfx.cpp
View file

@ -1305,7 +1305,7 @@ void Gdi::unkDecode9() {
byte *dst = _bgbak_ptr; byte *dst = _bgbak_ptr;
unsigned char c, bits, color, run; unsigned char c, bits, color, run;
int x, y, i, z; int x, y, i, z;
uint buffer, mask = 128; uint buffer=0, mask = 128;
int h = _numLinesToProcess; int h = _numLinesToProcess;
x = y = i = z = run = 0; x = y = i = z = run = 0;
@ -1374,7 +1374,7 @@ void Gdi::unkDecode11() {
byte *src = _smap_ptr; byte *src = _smap_ptr;
byte *dst = _bgbak_ptr; byte *dst = _bgbak_ptr;
int bits, i; int bits, i;
uint buffer, mask = 128; uint buffer=0, mask = 128;
unsigned char inc = 1, color = *src++; unsigned char inc = 1, color = *src++;
_currentX = 8; _currentX = 8;
@ -1695,7 +1695,7 @@ void Scumm::moveCamera() {
if(_features & GF_AFTER_V7) { if(_features & GF_AFTER_V7) {
CameraData *cd = &camera; CameraData *cd = &camera;
ScummPoint old = cd->_cur; ScummPoint old = cd->_cur;
Actor *a; Actor *a=NULL;
if (cd->_follows) { if (cd->_follows) {
a = derefActorSafe(cd->_follows, "moveCamera"); a = derefActorSafe(cd->_follows, "moveCamera");
@ -1778,7 +1778,7 @@ void Scumm::moveCamera() {
CameraData *cd = &camera; CameraData *cd = &camera;
int pos = cd->_cur.x; int pos = cd->_cur.x;
int actorx, t; int actorx, t;
Actor *a; Actor *a=NULL;
cd->_cur.x &= 0xFFF8; cd->_cur.x &= 0xFFF8;
@ -2309,7 +2309,7 @@ void Scumm::decompressDefaultCursor(int idx) {
int Scumm::remapPaletteColor(int r, int g, int b, uint threshold) { int Scumm::remapPaletteColor(int r, int g, int b, uint threshold) {
int i; int i;
int ar,ag,ab; int ar,ag,ab;
uint sum,j,bestsum,bestitem; uint sum,j,bestsum,bestitem=0;
byte *pal = _currentPalette; byte *pal = _currentPalette;
if (r>255) r=255; if (r>255) r=255;

View file

@ -96,7 +96,7 @@ const GuiWidget *Gui::widgetFromPos(int x, int y) {
} }
void Gui::drawChar(const char str, int xx, int yy) { void Gui::drawChar(const char str, int xx, int yy) {
unsigned int buffer, mask = 0, x, y; unsigned int buffer=0, mask = 0, x, y;
byte *tmp; byte *tmp;
int tempc = _color; int tempc = _color;
_color = _textcolor; _color = _textcolor;

View file

@ -670,7 +670,7 @@ byte *Scumm::getObjOrActorName(int obj) {
return getActorName(derefActorSafe(obj, "getObjOrActorName")); return getActorName(derefActorSafe(obj, "getObjOrActorName"));
if(_features & GF_SMALL_HEADER) { if(_features & GF_SMALL_HEADER) {
byte offset; byte offset=0;
objptr = getOBCDFromObject(obj); objptr = getOBCDFromObject(obj);
if (objptr) if (objptr)

View file

@ -657,7 +657,7 @@ int Scumm::loadResource(int type, int idx) {
int Scumm::readSoundResource(int type, int idx) { int Scumm::readSoundResource(int type, int idx) {
uint32 pos, total_size, size, tag,basetag; uint32 pos, total_size, size, tag,basetag;
int pri, best_pri; int pri, best_pri;
uint32 best_size, best_offs; uint32 best_size=0, best_offs=0;
debug(9, "readSoundResource(%d,%d)", type, idx); debug(9, "readSoundResource(%d,%d)", type, idx);

View file

@ -1655,7 +1655,7 @@ void Scumm::o5_quitPauseRestart() {
} }
void Scumm::o5_resourceRoutines() { void Scumm::o5_resourceRoutines() {
int resid; int resid=0;
_opcode = fetchScriptByte(); _opcode = fetchScriptByte();
if (_opcode != 17) if (_opcode != 17)
@ -1742,7 +1742,7 @@ void Scumm::o5_resourceRoutines() {
} }
void Scumm::o5_roomOps() { void Scumm::o5_roomOps() {
int a,b,c,d,e; int a=0,b=0,c,d,e;
if(_features & GF_OLD256) if(_features & GF_OLD256)
{ {

View file

@ -979,8 +979,8 @@ int main(int argc, char* argv[]) {
scumm->_scummStackPos=0; scumm->_scummStackPos=0;
scumm->_verbMouseOver=0; scumm->_verbMouseOver=0;
scumm->_palDirtyMax=-1; scumm->_palDirtyMax=0;
scumm->_palDirtyMin=-1; scumm->_palDirtyMin=0;
scumm->_debugger=0; scumm->_debugger=0;
scumm->camera._cur.x=0; scumm->camera._cur.x=0;
scumm->camera._cur.y=0; scumm->camera._cur.y=0;

View file

@ -695,7 +695,7 @@ int SoundEngine::enqueue_trigger(int sound, int marker) {
int32 SoundEngine::do_command(int a, int b, int c, int d, int e, int f, int g, int h) { int32 SoundEngine::do_command(int a, int b, int c, int d, int e, int f, int g, int h) {
byte cmd = a&0xFF; byte cmd = a&0xFF;
byte param = a>>8; byte param = a>>8;
Player *player; Player *player=NULL;
if (!_initialized && (cmd || param)) if (!_initialized && (cmd || param))
return -1; return -1;

View file

@ -427,7 +427,7 @@ void Scumm::drawString(int a) {
byte buf[256]; byte buf[256];
byte *charsetptr,*space; byte *charsetptr,*space;
int i; int i;
byte byte1, chr; byte byte1=0, chr;
uint color; uint color;
_msgPtrToAdd = buf; _msgPtrToAdd = buf;
@ -701,7 +701,7 @@ void Scumm::initCharset(int charsetno) {
void CharsetRenderer::printCharOld(int chr) { // Loom3 / Zak256 void CharsetRenderer::printCharOld(int chr) { // Loom3 / Zak256
VirtScreen *vs; VirtScreen *vs;
byte *char_ptr, *dest_ptr; byte *char_ptr, *dest_ptr;
unsigned int buffer, mask=0, x = 0, y = 0; unsigned int buffer=0, mask=0, x = 0, y = 0;
unsigned char color; unsigned char color;
_vm->checkRange(_vm->_maxCharsets-1, 0, _curId, "Printing with bad charset %d"); _vm->checkRange(_vm->_maxCharsets-1, 0, _curId, "Printing with bad charset %d");