sprite.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SPRITE_H
00013 #define SPRITE_H
00014
00015 #include "gfx_type.h"
00016
00017 #define GENERAL_SPRITE_COLOUR(colour) ((colour) + PALETTE_RECOLOUR_START)
00018 #define COMPANY_SPRITE_COLOUR(owner) (GENERAL_SPRITE_COLOUR(_company_colours[owner]))
00019
00027 #define IS_CUSTOM_SPRITE(sprite) ((sprite) >= SPR_SIGNALS_BASE)
00028
00029
00030
00031
00032
00034 struct DrawTileSeqStruct {
00035 int8 delta_x;
00036 int8 delta_y;
00037 int8 delta_z;
00038 byte size_x;
00039 byte size_y;
00040 byte size_z;
00041 PalSpriteID image;
00042 };
00043
00045 struct DrawTileSprites {
00046 PalSpriteID ground;
00047 const DrawTileSeqStruct *seq;
00048 };
00049
00054 struct DrawBuildingsTileStruct {
00055 PalSpriteID ground;
00056 PalSpriteID building;
00057 byte subtile_x;
00058 byte subtile_y;
00059 byte width;
00060 byte height;
00061 byte dz;
00062 byte draw_proc;
00063 };
00064
00066 #define foreach_draw_tile_seq(idx, list) for (idx = list; ((byte) idx->delta_x) != 0x80; idx++)
00067
00068 bool SkipSpriteData(byte type, uint16 num);
00069
00070 #endif