2022-05-21 06:56:54 +02:00
|
|
|
#ifndef ITEM_ENTITY_H
|
|
|
|
#define ITEM_ENTITY_H
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2023-02-01 18:48:25 +01:00
|
|
|
typedef s32 ItemScript[];
|
2022-05-21 06:56:54 +02:00
|
|
|
|
|
|
|
enum {
|
|
|
|
ITEM_SCRIPT_OP_End,
|
|
|
|
ITEM_SCRIPT_OP_SetImage,
|
|
|
|
ITEM_SCRIPT_OP_Restart,
|
|
|
|
ITEM_SCRIPT_OP_Loop,
|
|
|
|
ITEM_SCRIPT_OP_RandomRestart
|
|
|
|
};
|
|
|
|
|
|
|
|
#define is_End ITEM_SCRIPT_OP_End,
|
|
|
|
#define is_SetIcon(time, icon) ITEM_SCRIPT_OP_SetImage, time, ICON_##icon##_raster, ICON_##icon##_palette, 0, 0,
|
|
|
|
#define is_Restart ITEM_SCRIPT_OP_Restart,
|
|
|
|
#define is_Loop ITEM_SCRIPT_OP_Loop,
|
|
|
|
#define is_RandomRestart(max, cutoff) ITEM_SCRIPT_OP_RandomRestart, max, cutoff,
|
|
|
|
|
2023-07-22 19:20:37 +02:00
|
|
|
#define STANDARD_ITEM_SCRIPT(icon) \
|
|
|
|
{ \
|
|
|
|
is_SetIcon(60, icon) \
|
|
|
|
is_Restart \
|
|
|
|
is_End \
|
|
|
|
}
|
|
|
|
|
2022-05-21 06:56:54 +02:00
|
|
|
#endif
|