From 7abc5b096096fa62a595fce03385c88fa97e5087 Mon Sep 17 00:00:00 2001 From: gerstrong Date: Mon, 3 Aug 2009 15:11:51 +0000 Subject: [PATCH] Fixed a minor tilebug git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@207 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/ai/butler.cpp | 4 +--- src/ai/yorp.cpp | 16 +++++++++------- src/externals.cpp | 4 ++++ src/fileio/CTileLoader.h | 14 ++++++++------ src/gamedo.cpp | 8 ++++---- src/keen.h | 9 --------- src/main.cpp | 2 -- 7 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/ai/butler.cpp b/src/ai/butler.cpp index 3c6cb8274..f2d548881 100644 --- a/src/ai/butler.cpp +++ b/src/ai/butler.cpp @@ -39,10 +39,8 @@ char not_about_to_fall; objects[o].ai.butler.movedir = RIGHT; objects[o].ai.butler.animtimer = 0; objects[o].canbezapped = 1; // will stop bullets but are not harmed - //objects[o].inhibitfall = 1; objects[o].needinit = 0; - //objects[o].x -= 16; - objects[o].x -= 4; + objects[o].y -= 8; } // push keen if (objects[o].touchPlayer && !player[objects[o].touchedBy].pdie) diff --git a/src/ai/yorp.cpp b/src/ai/yorp.cpp index 00f5706cd..45d4673ce 100644 --- a/src/ai/yorp.cpp +++ b/src/ai/yorp.cpp @@ -6,11 +6,14 @@ // Yorp (ep1) -#define YORP_LOOK 0 // yorp is "looking around" (waving his eye) -#define YORP_MOVE 1 // yorp is walking either left or right -#define YORP_STUNNED 2 // the yorp is stunned -#define YORP_DYING 3 // the yorp is getting fried! -#define YORP_DEAD 4 // they look so sad when they're dead +enum +{ +YORP_LOOK, // yorp is "looking around" (waving his eye) +YORP_MOVE, // yorp is walking either left or right +YORP_STUNNED, // the yorp is stunned +YORP_DYING, // the yorp is getting fried! +YORP_DEAD // they look so sad when they're dead +}; #define YORP_LOOK_TIME 100 // time each frame of YORP_LOOK is shown #define YORP_STUN_ANIM_TIME 40 @@ -42,6 +45,7 @@ #define YORP_DYING_FRAME 58 #define YORP_DEAD_FRAME 59 #define YORP_DIE_TIME 90 + void yorp_ai(int o, stLevelControl levelcontrol) { int pushamt; @@ -52,9 +56,7 @@ char numlooks; { objects[o].wasoffscreen = 0; if (objects[o].ai.yorp.state==YORP_STUNNED) - { objects[o].needinit = 1; - } } if (objects[o].needinit) { // first time initilization diff --git a/src/externals.cpp b/src/externals.cpp index 5440e6801..398cc35a7 100644 --- a/src/externals.cpp +++ b/src/externals.cpp @@ -10,4 +10,8 @@ * In future that file should be able to be removed. */ +#include + int highest_objslot; // the highest object slot in use, +1 +int numtiles; +int **TileProperty = NULL; diff --git a/src/fileio/CTileLoader.h b/src/fileio/CTileLoader.h index 180bdeb89..f1f05a1cb 100644 --- a/src/fileio/CTileLoader.h +++ b/src/fileio/CTileLoader.h @@ -11,12 +11,14 @@ #define MAX_TILES 800 // Tile information planes -#define ANIMATION 0 -#define BEHAVIOR 1 -#define BUP 2 -#define BRIGHT 3 -#define BDOWN 4 -#define BLEFT 5 +enum TileEmurations{ + ANIMATION, + BEHAVIOR, + BUP, + BRIGHT, + BDOWN, + BLEFT +}; extern int numtiles; extern int **TileProperty; // This version will replace the old stTile Structure and save memory diff --git a/src/gamedo.cpp b/src/gamedo.cpp index 4d6c26491..1a1029efd 100644 --- a/src/gamedo.cpp +++ b/src/gamedo.cpp @@ -331,7 +331,7 @@ int cplayer; y = (objects[o].y>>CSF)+ysize+1; for(xa=0;xa>CSF)-1; for(xa=1;xa