|
| 1 | +/** |
| 2 | + * VUEngine Plugins Library |
| 3 | + * |
| 4 | + * (c) Christian Radke and Jorge Eremiev |
| 5 | + * |
| 6 | + * For the full copyright and license information, please view the LICENSE file |
| 7 | + * that was distributed with this source code. |
| 8 | + */ |
| 9 | + |
| 10 | + |
| 11 | +//--------------------------------------------------------------------------------------------------------- |
| 12 | +// INCLUDES |
| 13 | +//--------------------------------------------------------------------------------------------------------- |
| 14 | + |
| 15 | +#include <Entity.h> |
| 16 | +#include <VIPManager.h> |
| 17 | +#include <BgmapSprite.h> |
| 18 | + |
| 19 | + |
| 20 | +//--------------------------------------------------------------------------------------------------------- |
| 21 | +// DECLARATIONS |
| 22 | +//--------------------------------------------------------------------------------------------------------- |
| 23 | + |
| 24 | +extern uint32 AdjustmentIconTiles[]; |
| 25 | +extern uint16 AdjustmentIconMap[]; |
| 26 | + |
| 27 | + |
| 28 | +//--------------------------------------------------------------------------------------------------------- |
| 29 | +// DEFINITIONS |
| 30 | +//--------------------------------------------------------------------------------------------------------- |
| 31 | + |
| 32 | +CharSetROMSpec AdjustmentIconCharset = |
| 33 | +{ |
| 34 | + // number of chars, depending on allocation type: |
| 35 | + // __ANIMATED_SINGLE*, __ANIMATED_SHARED*: number of chars of a single animation frame (cols * rows) |
| 36 | + // __ANIMATED_MULTI, __NOT_ANIMATED: sum of all chars |
| 37 | + 4, |
| 38 | + |
| 39 | + // allocation type |
| 40 | + // (__ANIMATED_SINGLE, __ANIMATED_SINGLE_OPTIMIZED, __ANIMATED_SHARED, __ANIMATED_SHARED_COORDINATED, __ANIMATED_MULTI or __NOT_ANIMATED) |
| 41 | + __NOT_ANIMATED, |
| 42 | + |
| 43 | + // char spec |
| 44 | + AdjustmentIconTiles, |
| 45 | + |
| 46 | + // pointer to the frames offsets |
| 47 | + NULL, |
| 48 | +}; |
| 49 | + |
| 50 | +TextureROMSpec AdjustmentIconTexture = |
| 51 | +{ |
| 52 | + // charset spec |
| 53 | + (CharSetSpec*)&AdjustmentIconCharset, |
| 54 | + |
| 55 | + // bgmap spec |
| 56 | + AdjustmentIconMap, |
| 57 | + |
| 58 | + // cols (max 64) |
| 59 | + 2, |
| 60 | + |
| 61 | + // rows (max 64) |
| 62 | + 2, |
| 63 | + |
| 64 | + // padding for affine/hbias transformations (cols, rows) |
| 65 | + {0, 0}, |
| 66 | + |
| 67 | + // number of frames, depending on charset's allocation type: |
| 68 | + // __ANIMATED_SINGLE*, __ANIMATED_SHARED*, __NOT_ANIMATED: 1 |
| 69 | + // __ANIMATED_MULTI: total number of frames |
| 70 | + 1, |
| 71 | + |
| 72 | + // palette number (0-3) |
| 73 | + 0, |
| 74 | + |
| 75 | + // recyclable |
| 76 | + false, |
| 77 | + |
| 78 | + // vertical flip |
| 79 | + false, |
| 80 | + |
| 81 | + // horizontal flip |
| 82 | + false, |
| 83 | +}; |
| 84 | + |
| 85 | +BgmapSpriteROMSpec AdjustmentIconLSprite = |
| 86 | +{ |
| 87 | + { |
| 88 | + // sprite's type |
| 89 | + __TYPE(BgmapSprite), |
| 90 | + |
| 91 | + // texture spec |
| 92 | + (TextureSpec*)&AdjustmentIconTexture, |
| 93 | + |
| 94 | + // transparent (__TRANSPARENCY_NONE, __TRANSPARENCY_EVEN or __TRANSPARENCY_ODD) |
| 95 | + __TRANSPARENCY_NONE, |
| 96 | + |
| 97 | + // displacement |
| 98 | + {0, 0, 0, 0}, |
| 99 | + }, |
| 100 | + |
| 101 | + // bgmap mode (__WORLD_BGMAP, __WORLD_AFFINE, __WORLD_OBJECT or __WORLD_HBIAS) |
| 102 | + // make sure to use the proper corresponding sprite type throughout the spec (BgmapSprite or ObjectSprite) |
| 103 | + __WORLD_BGMAP, |
| 104 | + |
| 105 | + // pointer to affine/hbias manipulation function |
| 106 | + NULL, |
| 107 | + |
| 108 | + // display mode (__WORLD_ON, __WORLD_LON or __WORLD_RON) |
| 109 | + __WORLD_LON, |
| 110 | +}; |
| 111 | + |
| 112 | +BgmapSpriteROMSpec* const AdjustmentIconLSprites[] = |
| 113 | +{ |
| 114 | + &AdjustmentIconLSprite, |
| 115 | + NULL |
| 116 | +}; |
| 117 | + |
| 118 | +BgmapSpriteROMSpec const ADJUSTMENT_SCREEN_ICON_R_SPRITE = |
| 119 | +{ |
| 120 | + { |
| 121 | + // sprite's type |
| 122 | + __TYPE(BgmapSprite), |
| 123 | + |
| 124 | + // texture spec |
| 125 | + (TextureSpec*)&AdjustmentIconTexture, |
| 126 | + |
| 127 | + // transparent (__TRANSPARENCY_NONE, __TRANSPARENCY_EVEN or __TRANSPARENCY_ODD) |
| 128 | + __TRANSPARENCY_NONE, |
| 129 | + |
| 130 | + // displacement |
| 131 | + {0, 0, 0, 0}, |
| 132 | + }, |
| 133 | + |
| 134 | + // bgmap mode (__WORLD_BGMAP, __WORLD_AFFINE, __WORLD_OBJECT or __WORLD_HBIAS) |
| 135 | + // make sure to use the proper corresponding sprite type throughout the spec (BgmapSprite or ObjectSprite) |
| 136 | + __WORLD_BGMAP, |
| 137 | + |
| 138 | + // pointer to affine/hbias manipulation function |
| 139 | + NULL, |
| 140 | + |
| 141 | + // display mode (__WORLD_ON, __WORLD_LON or __WORLD_RON) |
| 142 | + __WORLD_RON, |
| 143 | +}; |
| 144 | + |
| 145 | +BgmapSpriteROMSpec* const AdjustmentIconRSprites[] = |
| 146 | +{ |
| 147 | + &ADJUSTMENT_SCREEN_ICON_R_SPRITE, |
| 148 | + NULL |
| 149 | + |
| 150 | +}; |
| 151 | + |
| 152 | +EntityROMSpec AdjustmentIconLEntity = |
| 153 | +{ |
| 154 | + // class allocator |
| 155 | + __TYPE(Entity), |
| 156 | + |
| 157 | + // children |
| 158 | + NULL, |
| 159 | + |
| 160 | + // behaviors |
| 161 | + NULL, |
| 162 | + |
| 163 | + // extra |
| 164 | + NULL, |
| 165 | + |
| 166 | + // sprites |
| 167 | + (SpriteSpec**)AdjustmentIconLSprites, |
| 168 | + |
| 169 | + // use z displacement in projection |
| 170 | + false, |
| 171 | + |
| 172 | + // wireframes |
| 173 | + (WireframeSpec**)NULL, |
| 174 | + |
| 175 | + // collision shapes |
| 176 | + (ShapeSpec*)NULL, |
| 177 | + |
| 178 | + // size |
| 179 | + // if 0, width and height will be inferred from the first sprite's texture's size |
| 180 | + {0, 0, 0}, |
| 181 | + |
| 182 | + // gameworld's character's type |
| 183 | + kTypeNone, |
| 184 | + |
| 185 | + // physical specification |
| 186 | + (PhysicalSpecification*)NULL, |
| 187 | +}; |
| 188 | + |
| 189 | +EntityROMSpec AdjustmentIconREntity = |
| 190 | +{ |
| 191 | + // class allocator |
| 192 | + __TYPE(Entity), |
| 193 | + |
| 194 | + // children |
| 195 | + NULL, |
| 196 | + |
| 197 | + // behaviors |
| 198 | + NULL, |
| 199 | + |
| 200 | + // extra |
| 201 | + NULL, |
| 202 | + |
| 203 | + // sprites |
| 204 | + (SpriteSpec**)AdjustmentIconRSprites, |
| 205 | + |
| 206 | + // use z displacement in projection |
| 207 | + false, |
| 208 | + |
| 209 | + // wireframes |
| 210 | + (WireframeSpec**)NULL, |
| 211 | + |
| 212 | + // collision shapes |
| 213 | + (ShapeSpec*)NULL, |
| 214 | + |
| 215 | + // size |
| 216 | + // if 0, width and height will be inferred from the first sprite's texture's size |
| 217 | + {0, 0, 0}, |
| 218 | + |
| 219 | + // gameworld's character's type |
| 220 | + kTypeNone, |
| 221 | + |
| 222 | + // physical specification |
| 223 | + (PhysicalSpecification*)NULL, |
| 224 | +}; |
0 commit comments