Commit 8c131b49 authored by alistert's avatar alistert

Small fixes.

parent 0d00bb30
...@@ -527,6 +527,8 @@ int JJ2Level::load (char *fileName, unsigned char diff, bool checkpoint) { ...@@ -527,6 +527,8 @@ int JJ2Level::load (char *fileName, unsigned char diff, bool checkpoint) {
pitch = createInt(aBuffer + 8403 + 80 + (count << 2)); pitch = createInt(aBuffer + 8403 + 80 + (count << 2));
height = createInt(aBuffer + 8403 + 112 + (count << 2)); height = createInt(aBuffer + 8403 + 112 + (count << 2));
if (pitch & 3) pitch += 4;
if (aBuffer[8403 + 40 + count]) { if (aBuffer[8403 + 40 + count]) {
layers[count] = new JJ2Layer(width, height, flags); layers[count] = new JJ2Layer(width, height, flags);
......
...@@ -68,7 +68,7 @@ int loadMain (int argc, char *argv[]) { ...@@ -68,7 +68,7 @@ int loadMain (int argc, char *argv[]) {
File* file; File* file;
unsigned char* pixels; unsigned char* pixels;
int count, x, y; int count;
int screenW, screenH; int screenW, screenH;
int scaleFactor; int scaleFactor;
#ifndef FULLSCREEN_ONLY #ifndef FULLSCREEN_ONLY
......
...@@ -473,7 +473,7 @@ bool JJ2LevelPlayer::touchEvent (JJ2Event* touched, unsigned int ticks, int msps ...@@ -473,7 +473,7 @@ bool JJ2LevelPlayer::touchEvent (JJ2Event* touched, unsigned int ticks, int msps
case 85: // Red spring case 85: // Red spring
throwY = y - TTOF(7); throwY = y - TTOF(8);
dx = 0; dx = 0;
event = LPE_SPRING; event = LPE_SPRING;
......
...@@ -405,7 +405,7 @@ void JJ2LevelPlayer::control (unsigned int ticks, int msps) { ...@@ -405,7 +405,7 @@ void JJ2LevelPlayer::control (unsigned int ticks, int msps) {
// If there is an obstacle above and the player is not floating up, stop // If there is an obstacle above and the player is not floating up, stop
// rising // rising
if (jj2Level->checkMaskUp(x + PXO_MID, y + PYO_TOP - F4) && (throwY < y) && (event != LPE_FLOAT)) { if (jj2Level->checkMaskUp(x + PXO_MID, y + PYO_TOP - F1) && (throwY < y) && (event != LPE_FLOAT)) {
throwY = TTOF(256); throwY = TTOF(256);
if (dy < 0) dy = 0; if (dy < 0) dy = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment