mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix to prevent rain and storm from happening at once
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1534 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+38
-49
@@ -19,27 +19,6 @@
|
||||
|
||||
#define WORLD_BASE_HEIGHT 0
|
||||
#define WORLD_CLIFF_HEIGHT 80
|
||||
|
||||
//ADB I'm tired of seeing a 5 digit number when looking at something's gridno.
|
||||
//I need to see an x and y. I created this class for the AStar,
|
||||
//but moved it here as you can convert a regular INT16 gridno to a GridNode then print it out for debugging.
|
||||
//Don't switch between the 2 types too often, IntToGridNode is especially slow
|
||||
class GridNode
|
||||
{
|
||||
public:
|
||||
GridNode () {x = -1; y = -1;};
|
||||
GridNode (INT16 const loc) {this->x = loc % WORLD_COLS; this->y = loc / WORLD_COLS;};
|
||||
GridNode (int x, int y) {GridNode::x = x; GridNode::y = y;};
|
||||
GridNode operator + (const GridNode& point) const {return GridNode(this->x + point.x, this->y + point.y);};
|
||||
bool operator == (const GridNode& point) const {return this->x == point.x && this->y == point.y;};
|
||||
bool operator != (const GridNode& point) const {return !(*this == point);};
|
||||
INT16 GridNodeToInt() {return (this->x + this->y * WORLD_COLS);};
|
||||
void IntToGridNode(INT16 const loc) {this->x = loc % WORLD_COLS; this->y = loc / WORLD_COLS;};
|
||||
bool isInWorld() {return (this->x < WORLD_COLS && this->x >= 0 &&
|
||||
this->y < WORLD_ROWS && this->y >= 0);};
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
//A macro that actually memcpy's over data and increments the pointer automatically
|
||||
//based on the size. Works like a FileRead except with a buffer instead of a file pointer.
|
||||
@@ -116,7 +95,8 @@ public:
|
||||
#define MAPELEMENT_EXT_NOBURN_STRUCT 0x0020 //0x20
|
||||
#define MAPELEMENT_EXT_ROOFCODE_VISITED 0x0040 //0x40
|
||||
#define MAPELEMENT_EXT_CREATUREGAS 0x0080 //0x80
|
||||
#define MAPELEMENT_EXT_BURNABLEGAS 0x0100 //0x60
|
||||
#define MAPELEMENT_EXT_BURNABLEGAS 0x0100 //0x100
|
||||
#define MAPELEMENT_EXT_CLIMBPOINT 0x0200 //0x200
|
||||
|
||||
#define FIRST_LEVEL 0
|
||||
#define SECOND_LEVEL 1
|
||||
@@ -165,27 +145,27 @@ struct LEVELNODE
|
||||
};
|
||||
|
||||
// Some can contains index values into dead corpses
|
||||
struct
|
||||
{
|
||||
//struct
|
||||
//{
|
||||
INT32 iCorpseID; // Index into corpse ID
|
||||
};
|
||||
//};
|
||||
|
||||
struct
|
||||
{
|
||||
//struct
|
||||
//{
|
||||
UINT32 uiAnimHitLocationFlags; // Animation profile flags for soldier placeholders ( prone merc hit location values )
|
||||
};
|
||||
//};
|
||||
|
||||
// Some can contains index values into animated tile data
|
||||
struct
|
||||
{
|
||||
//struct
|
||||
//{
|
||||
struct TAG_anitile *pAniTile;
|
||||
};
|
||||
//};
|
||||
|
||||
// Can be an item pool as well...
|
||||
struct
|
||||
{
|
||||
//struct
|
||||
//{
|
||||
ITEM_POOL *pItemPool; // ITEM POOLS
|
||||
};
|
||||
//};
|
||||
|
||||
|
||||
};
|
||||
@@ -207,33 +187,42 @@ struct LEVELNODE
|
||||
#define ONROOF_START_INDEX 7
|
||||
#define TOPMOST_START_INDEX 8
|
||||
|
||||
#define pLandHead pLevelNodes[ 0 ]
|
||||
#define pLandStart pLevelNodes[ 1 ]
|
||||
#define pObjectHead pLevelNodes[ 2 ]
|
||||
#define pStructHead pLevelNodes[ 3 ]
|
||||
#define pShadowHead pLevelNodes[ 4 ]
|
||||
#define pMercHead pLevelNodes[ 5 ]
|
||||
#define pRoofHead pLevelNodes[ 6 ]
|
||||
#define pOnRoofHead pLevelNodes[ 7 ]
|
||||
#define pTopmostHead pLevelNodes[ 8 ]
|
||||
|
||||
typedef struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
LEVELNODE *pLandHead; //0
|
||||
LEVELNODE *pLandStart; //1
|
||||
//union
|
||||
//{
|
||||
//struct
|
||||
//{
|
||||
//LEVELNODE *pLandHead; //0
|
||||
//LEVELNODE *pLandStart; //1
|
||||
|
||||
LEVELNODE *pObjectHead; //2
|
||||
//LEVELNODE *pObjectHead; //2
|
||||
|
||||
LEVELNODE *pStructHead; //3
|
||||
//LEVELNODE *pStructHead; //3
|
||||
|
||||
LEVELNODE *pShadowHead; //4
|
||||
//LEVELNODE *pShadowHead; //4
|
||||
|
||||
LEVELNODE *pMercHead; //5
|
||||
//LEVELNODE *pMercHead; //5
|
||||
|
||||
LEVELNODE *pRoofHead; //6
|
||||
//LEVELNODE *pRoofHead; //6
|
||||
|
||||
LEVELNODE *pOnRoofHead; //7
|
||||
//LEVELNODE *pOnRoofHead; //7
|
||||
|
||||
LEVELNODE *pTopmostHead; //8
|
||||
};
|
||||
//LEVELNODE *pTopmostHead; //8
|
||||
//};
|
||||
|
||||
LEVELNODE *pLevelNodes[ 9 ];
|
||||
};
|
||||
//};
|
||||
|
||||
STRUCTURE *pStructureHead;
|
||||
STRUCTURE *pStructureTail;
|
||||
|
||||
Reference in New Issue
Block a user