X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.h;h=e042fa66bf5ae3561eb8aea7c49f865f92f93477;hb=12a8eb6ca28aa97f422e7cf9317f01eb0dfc9a11;hp=a09eee5a877533500388c3e76b6f80b7337c4be2;hpb=5bc457a755a2cd99ac689da3205cce06b3e40e68;p=rocksndiamonds.git diff --git a/src/tools.h b/src/tools.h index a09eee5a..e042fa66 100644 --- a/src/tools.h +++ b/src/tools.h @@ -49,6 +49,16 @@ #define DOOR_GET_STATE (1 << 8) #define DOOR_SET_STATE (1 << 9) +#define DOOR_1 (DOOR_ACTION_1) +#define DOOR_2 (DOOR_ACTION_2) +#define DOOR_OPEN (DOOR_OPEN_ALL) +#define DOOR_CLOSE (DOOR_CLOSE_ALL) + +#define DOOR_INDEX_FROM_TOKEN(x) ((x) == DOOR_1 ? 0 : 1) +#define DOOR_TOKEN_FROM_INDEX(x) ((x) == 0 ? DOOR_1 ? : DOOR_2) +#define REDRAW_DOOR_FROM_TOKEN(x) ((x) == DOOR_1 ? REDRAW_DOOR_1 : \ + REDRAW_DOOR_2) + /* for Request */ #define REQ_ASK (1 << 0) #define REQ_CONFIRM (1 << 1) @@ -60,25 +70,6 @@ #define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER) -struct RequestButtonInfo -{ - struct TextPosInfo yes; - struct TextPosInfo no; - struct TextPosInfo confirm; - struct TextPosInfo player_1; - struct TextPosInfo player_2; - struct TextPosInfo player_3; - struct TextPosInfo player_4; -}; - -struct RequestInfo -{ - struct RequestButtonInfo button; -}; - -extern struct RequestInfo request; - - void DumpTile(int, int); void DrawMaskedBorder_FIELD(); @@ -89,7 +80,11 @@ void DrawMaskedBorder_ALL(); void DrawMaskedBorder(int); void SetDrawtoField(int); +#if 1 +void RedrawPlayfield(); +#else void RedrawPlayfield(boolean, int, int, int, int); +#endif void BlitScreenToBitmap(Bitmap *); void BackToFront(); @@ -190,8 +185,10 @@ void DrawMiniLevel(int, int, int, int); void DrawPreviewLevelInitial(void); void DrawPreviewLevelAnimation(void); -void WaitForEventToContinue(); +void WaitForEventToContinue(void); boolean Request(char *, unsigned int); +void InitGraphicCompatibilityInfo_Doors(void); +void InitDoors(void); unsigned int OpenDoor(unsigned int); unsigned int CloseDoor(unsigned int); unsigned int GetDoorState(void);