diff --git a/src/CGraphics.cpp b/src/CGraphics.cpp index e90dde1cc..9abfc39a0 100644 --- a/src/CGraphics.cpp +++ b/src/CGraphics.cpp @@ -651,7 +651,7 @@ void CGraphics::sb_font_draw(const std::string& text, int xoff, int yoff) { if (text[i]!=13) { - sb_drawCharacter(x, y, text[i]); + sb_drawCharacter(x, y, (unsigned char)text[i]); x+=8; } else diff --git a/src/eseq_ep1.cpp b/src/eseq_ep1.cpp index a0e4b3a1f..984405894 100644 --- a/src/eseq_ep1.cpp +++ b/src/eseq_ep1.cpp @@ -105,7 +105,7 @@ int scrollingon; scrollingon = 1; - #define MARK_SPR_NUM 5 + #define MARK_SPR_NUM 2 initgame(pCKP); // set up the ship's route diff --git a/src/menu.cpp b/src/menu.cpp index 24b433de3..f6c2895be 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -970,7 +970,7 @@ void showPage(const std::string& str_text, stCloneKeenPlus *pCKP, int textsize) dlgH = 15; textpos=0; - memset(buffer,0,200*40*sizeof(char)); + memset(buffer,0,200*40); // Prepare the buffer char sbuf[256]; @@ -1004,7 +1004,7 @@ void showPage(const std::string& str_text, stCloneKeenPlus *pCKP, int textsize) } - buffer[i][j]=text[textpos]; + buffer[i][j] = text[textpos]; textpos++; if(textpos >= textsize) break; diff --git a/src/vorticon/CEGALatch.cpp b/src/vorticon/CEGALatch.cpp index 6485dcbed..0a2d61ddc 100644 --- a/src/vorticon/CEGALatch.cpp +++ b/src/vorticon/CEGALatch.cpp @@ -111,7 +111,7 @@ bool CEGALatch::loadData(const std::string& filename, bool compresseddata) 0); // Load 8x8 Tiles - unsigned char c=0; + int c=0; for(int p=0;p<4;p++) { for(int t=0;t // Constructor initializes the positions,getbit will retrieve data from -CPlanes::CPlanes(unsigned long p1, unsigned long p2, unsigned long p3,\ +CPlanes::CPlanes(unsigned long p1, unsigned long p2, unsigned long p3, unsigned long p4, unsigned long p5) { - int i; - getbit_bytepos[0] = p1; + + getbit_bytepos[0] = p1; getbit_bytepos[1] = p2; getbit_bytepos[2] = p3; getbit_bytepos[3] = p4; getbit_bytepos[4] = p5; - for(i=0;i<=4;i++) - { + for(int i=0;i<5;i++) getbit_bitmask[i] = 128; - } } // retrieves a bit from plane "plane". the positions of the planes @@ -35,7 +34,6 @@ unsigned char CPlanes::getbit(char *buf, unsigned char plane) getbit_bitmask[plane] = 128; getbit_bytepos[plane]++; } - byt = buf[getbit_bytepos[plane]]; if (byt & getbit_bitmask[plane])