2020-05-27 19:07:34 +02:00
|
|
|
#pragma once
|
2020-05-30 15:55:23 +02:00
|
|
|
#include "items.h"
|
2020-05-28 15:17:34 +02:00
|
|
|
#include "collide.h"
|
2020-05-27 19:07:34 +02:00
|
|
|
|
2020-12-30 02:12:14 +01:00
|
|
|
typedef struct PUSHABLE_INFO // void* data of pushable
|
|
|
|
{
|
|
|
|
int height; // height for collision, also in floor procedure
|
|
|
|
int weight;
|
|
|
|
int stackLimit;
|
|
|
|
short linkedIndex; // using itemFlags[1] for now
|
|
|
|
short gravity; // fall acceleration
|
|
|
|
short loopSound; // looped sound index for movement
|
|
|
|
short stopSound; // ending sound index
|
|
|
|
short fallSound; // sound on hitting floor (if dropped)
|
|
|
|
short climb; // not used for now
|
|
|
|
bool canFall; // OCB 32
|
|
|
|
bool hasFloorCeiling; // has floor and ceiling procedures (OCB 64)
|
|
|
|
bool disablePull; // OCB 128
|
|
|
|
bool disablePush; // OCB 256
|
|
|
|
bool disableW; // OCB 512 (W+E)
|
|
|
|
bool disableE; // OCB 512 (W+E)
|
|
|
|
bool disableN; // OCB 1024 (N+S)
|
|
|
|
bool disableS; // OCB 1024 (N+S)
|
|
|
|
};
|
|
|
|
|
2020-05-27 19:07:34 +02:00
|
|
|
void ClearMovableBlockSplitters(int x, int y, int z, short roomNumber);
|
|
|
|
void InitialisePushableBlock(short itemNum);
|
|
|
|
void PushableBlockControl(short itemNum);
|
|
|
|
void PushableBlockCollision(short itemNum, ITEM_INFO* laraitem, COLL_INFO* coll);
|
2020-11-04 12:07:53 -03:00
|
|
|
int TestBlockMovable(ITEM_INFO* item, int blokhite);
|
|
|
|
int TestBlockPush(ITEM_INFO* item, int blockhite, unsigned short quadrant);
|
|
|
|
int TestBlockPull(ITEM_INFO* item, int blockhite, short quadrant);
|
2020-12-30 02:12:14 +01:00
|
|
|
void MoveStackXZ(int itemNum);
|
|
|
|
void MoveStackY(int itemNum, int y);
|
|
|
|
void RemoveFromStack(int itemNum);
|
|
|
|
int FindStack(int itemNum);
|
|
|
|
int GetStackHeight(ITEM_INFO* item);
|
|
|
|
int CheckStackLimit(ITEM_INFO* item);
|
|
|
|
void pushLoop(ITEM_INFO* item);
|
|
|
|
void pushEnd(ITEM_INFO* item);
|
|
|
|
PUSHABLE_INFO* pushable_info(ITEM_INFO* item);
|
2020-11-11 15:01:45 -03:00
|
|
|
std::tuple<std::optional<int>, bool> PushableBlockFloor(short itemNumber, int x, int y, int z);
|
|
|
|
std::tuple<std::optional<int>, bool> PushableBlockCeiling(short itemNumber, int x, int y, int z);
|