Fixed a minor tilebug

git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@207 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
gerstrong
2009-08-03 15:11:51 +00:00
parent 53b822f703
commit 7abc5b0960
7 changed files with 26 additions and 31 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -10,4 +10,8 @@
* In future that file should be able to be removed.
*/
#include <stdio.h>
int highest_objslot; // the highest object slot in use, +1
int numtiles;
int **TileProperty = NULL;

View File

@@ -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

View File

@@ -331,7 +331,7 @@ int cplayer;
y = (objects[o].y>>CSF)+ysize+1;
for(xa=0;xa<xsize-2;xa+=16)
{
if (TileProperty[getmaptileat(x+xa,y)][BDOWN] || IsStopPoint(x+xa,y,o))
if (TileProperty[getmaptileat(x+xa,y)][BUP] || IsStopPoint(x+xa,y,o))
{
objects[o].blockedd = 1;
break;
@@ -340,7 +340,7 @@ int cplayer;
if (!objects[o].blockedd) // check final point
{
if (TileProperty[getmaptileat(x+xsize-2, y)][BDOWN] || IsStopPoint(x+xsize-2,y,o))
if (TileProperty[getmaptileat(x+xsize-2, y)][BUP] || IsStopPoint(x+xsize-2,y,o))
{
objects[o].blockedd = 1;
}
@@ -353,7 +353,7 @@ int cplayer;
y = (objects[o].y>>CSF)-1;
for(xa=1;xa<xsize;xa+=16) // change start pixel to xa=1 for icecannon in ep1l8
{
if (TileProperty[getmaptileat(x+xa,y)][BUP] || IsStopPoint(x+xa,y,o))
if (TileProperty[getmaptileat(x+xa,y)][BDOWN] || IsStopPoint(x+xa,y,o))
{
objects[o].blockedu = 1;
break;
@@ -362,7 +362,7 @@ int cplayer;
if (!objects[o].blockedu) // check final point
{
if (TileProperty[getmaptileat(x+xsize-2, y)][BUP] || IsStopPoint(x+xsize-2,y,o))
if (TileProperty[getmaptileat(x+xsize-2, y)][BDOWN] || IsStopPoint(x+xsize-2,y,o))
{
objects[o].blockedu = 1;
}

View File

@@ -108,15 +108,6 @@ typedef struct stMap
char firsttime; // used when generating multiplayer positions on world map
} stMap;
// Tile information planes
#define ANIMATION 0
#define BEHAVIOR 1
#define BUP 2
#define BRIGHT 3
#define BDOWN 4
#define BLEFT 5
struct stBitmap
{
int xsize;

View File

@@ -91,8 +91,6 @@ stFade fade;
stMap map;
unsigned int AnimTileInUse[ATILEINUSE_SIZEX][ATILEINUSE_SIZEY];
stTile tiles[MAX_TILES+1];
int numtiles;
int **TileProperty = NULL; // This version will replace the old stTile Structure and save memory
unsigned char tiledata[MAX_TILES+1][16][16];
stSprite *sprites = NULL;
stBitmap bitmaps[MAX_BITMAPS+1];