mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Categorised more sprites
This commit is contained in:
parent
e5aa8cd3b7
commit
777d03b361
@ -156,6 +156,7 @@ impl Block {
|
||||
|
||||
/* Constructors */
|
||||
|
||||
// TODO: Rename to `filled`
|
||||
#[inline]
|
||||
pub const fn new(kind: BlockKind, color: Rgb<u8>) -> Self {
|
||||
// TODO: we should probably assert this, overwriting the data fields with a
|
||||
|
@ -64,253 +64,105 @@ sprites! {
|
||||
Empty = 0,
|
||||
},
|
||||
// Generic collection of sprites, no attributes but anything goes
|
||||
// Also used as a 'dumping ground' for old-style sprites without orientation until we recategorise them.
|
||||
Misc = 1 {
|
||||
Apple = 0x10,
|
||||
Mushroom = 0x11,
|
||||
Liana = 0x12,
|
||||
Velorite = 0x13,
|
||||
VeloriteFrag = 0x14,
|
||||
Pumpkin = 0x16,
|
||||
Welwitch = 0x17,
|
||||
LingonBerry = 0x18,
|
||||
LeafyPlant = 0x19,
|
||||
Fern = 0x1A,
|
||||
DeadBush = 0x1B,
|
||||
Blueberry = 0x1C,
|
||||
Ember = 0x1D,
|
||||
Corn = 0x1E,
|
||||
WheatYellow = 0x1F,
|
||||
WheatGreen = 0x20,
|
||||
Cabbage = 0x21,
|
||||
Flax = 0x22,
|
||||
Carrot = 0x23,
|
||||
Tomato = 0x24,
|
||||
Radish = 0x25,
|
||||
Coconut = 0x26,
|
||||
Turnip = 0x27,
|
||||
Scarecrow = 0x2C,
|
||||
StreetLamp = 0x2D,
|
||||
StreetLampTall = 0x2E,
|
||||
LargeGrass = 0x44,
|
||||
Stones = 0x46,
|
||||
Twigs = 0x47,
|
||||
GrassSnow = 0x4A,
|
||||
Reed = 0x4B,
|
||||
LargeCactus = 0x4D,
|
||||
GrassBlue = 0x50,
|
||||
ChestBuried = 0x51,
|
||||
Mud = 0x52,
|
||||
CaveMushroom = 0x54,
|
||||
SavannaGrass = 0x56,
|
||||
TallSavannaGrass = 0x57,
|
||||
RedSavannaGrass = 0x58,
|
||||
SavannaBush = 0x59,
|
||||
Amethyst = 0x5A,
|
||||
Ruby = 0x5B,
|
||||
Sapphire = 0x5C,
|
||||
Emerald = 0x5D,
|
||||
Topaz = 0x5E,
|
||||
Diamond = 0x5F,
|
||||
AmethystSmall = 0x60,
|
||||
TopazSmall = 0x61,
|
||||
DiamondSmall = 0x62,
|
||||
RubySmall = 0x63,
|
||||
EmeraldSmall = 0x64,
|
||||
SapphireSmall = 0x65,
|
||||
StonyCoral = 0x68,
|
||||
SoftCoral = 0x69,
|
||||
SeaweedTemperate = 0x6A,
|
||||
SeaweedTropical = 0x6B,
|
||||
GiantKelp = 0x6C,
|
||||
BullKelp = 0x6D,
|
||||
WavyAlgae = 0x6E,
|
||||
SeaGrapes = 0x6F,
|
||||
MermaidsFan = 0x70,
|
||||
SeaAnemone = 0x71,
|
||||
Seashells = 0x72,
|
||||
Seagrass = 0x73,
|
||||
RedAlgae = 0x74,
|
||||
UnderwaterVent = 0x75,
|
||||
CrystalHigh = 0x84,
|
||||
Bloodstone = 0x85,
|
||||
Coal = 0x86,
|
||||
Cobalt = 0x87,
|
||||
Copper = 0x88,
|
||||
Iron = 0x89,
|
||||
Tin = 0x8A,
|
||||
Silver = 0x8B,
|
||||
Gold = 0x8C,
|
||||
Cotton = 0x8D,
|
||||
Moonbell = 0x8E,
|
||||
Pyrebloom = 0x8F,
|
||||
WildFlax = 0x91,
|
||||
CrystalLow = 0x92,
|
||||
CeilingMushroom = 0x93,
|
||||
Orb = 0x94,
|
||||
EnsnaringVines = 0x95,
|
||||
WitchWindow = 0x96,
|
||||
SmokeDummy = 0x97,
|
||||
Bones = 0x98,
|
||||
CavernGrassBlueShort = 0x99,
|
||||
CavernGrassBlueMedium = 0x9A,
|
||||
CavernGrassBlueLong = 0x9B,
|
||||
CavernLillypadBlue = 0x9C,
|
||||
CavernMycelBlue = 0x9D,
|
||||
JungleFern = 0x9F,
|
||||
LillyPads = 0xA0,
|
||||
JungleLeafyPlant = 0xA1,
|
||||
JungleRedGrass = 0xA2,
|
||||
Bomb = 0xA3,
|
||||
EnsnaringWeb = 0xA6,
|
||||
DecorSetArabic = 0xAA,
|
||||
SepareArabic = 0xAB,
|
||||
CushionArabic = 0xAC,
|
||||
TableArabicSmall = 0xAE,
|
||||
FountainArabic = 0xB5,
|
||||
CliffDecorBlock = 0xB8,
|
||||
Wood = 0xB9,
|
||||
Bamboo = 0xBA,
|
||||
Hardwood = 0xBB,
|
||||
Ironwood = 0xBC,
|
||||
Frostwood = 0xBD,
|
||||
Eldwood = 0xBE,
|
||||
SeaUrchin = 0xBF,
|
||||
GlassBarrier = 0xC0,
|
||||
SeaDecorChain = 0xC2,
|
||||
SeaDecorBlock = 0xC3,
|
||||
SeaDecorWindowHor = 0xC4,
|
||||
SeaDecorPillar = 0xC7,
|
||||
SeashellLantern = 0xC8,
|
||||
Rope = 0xC9,
|
||||
IceSpike = 0xCA,
|
||||
BedrollSnow = 0xCC,
|
||||
BedrollPirate = 0xCD,
|
||||
MagicalSeal = 0xD4,
|
||||
WallLampWizard = 0xD5,
|
||||
Candle = 0xD6,
|
||||
Keyhole = 0xD7,
|
||||
KeyDoor = 0xD8,
|
||||
CommonLockedChest = 0xD9,
|
||||
// FireBlock for Burning Buff
|
||||
FireBlock = 0xDF,
|
||||
GlassKeyhole = 0xE3,
|
||||
TallCactus = 0xE4,
|
||||
DoorBars = 0xE6,
|
||||
KeyholeBars = 0xE7,
|
||||
SewerMushroom = 0xE9,
|
||||
DiamondLight = 0xEA,
|
||||
Mine = 0xEB,
|
||||
IronSpike = 0xF0,
|
||||
HotSurface = 0xF1,
|
||||
Barrel = 0xF2,
|
||||
CrateBlock = 0xF3,
|
||||
},
|
||||
// 'Dumping ground' for old-style sprites with orientation until we recategorise them.
|
||||
MiscWithOri = 2 has Ori {
|
||||
Window1 = 0,
|
||||
Window2 = 1,
|
||||
Window3 = 2,
|
||||
Window4 = 3,
|
||||
Bed = 4,
|
||||
Bench = 5,
|
||||
ChairSingle = 6,
|
||||
ChairDouble = 7,
|
||||
CoatRack = 8,
|
||||
Crate = 9,
|
||||
DrawerLarge = 10,
|
||||
DrawerMedium = 11,
|
||||
DrawerSmall = 12,
|
||||
DungeonWallDecor = 13,
|
||||
HangingBasket = 14,
|
||||
HangingSign = 15,
|
||||
WallLamp = 16,
|
||||
WallLampSmall = 17,
|
||||
WallSconce = 18,
|
||||
Planter = 19,
|
||||
Shelf = 20,
|
||||
TableSide = 21,
|
||||
TableDining = 22,
|
||||
TableDouble = 23,
|
||||
WardrobeSingle = 24,
|
||||
WardrobeDouble = 25,
|
||||
Pot = 26,
|
||||
Chest = 27,
|
||||
DungeonChest0 = 28,
|
||||
DungeonChest1 = 29,
|
||||
DungeonChest2 = 30,
|
||||
DungeonChest3 = 31,
|
||||
DungeonChest4 = 32,
|
||||
DungeonChest5 = 33,
|
||||
CoralChest = 34,
|
||||
SeaDecorWindowVer = 35,
|
||||
SeaDecorEmblem = 36,
|
||||
DropGate = 37,
|
||||
DropGateBottom = 38,
|
||||
Door = 39,
|
||||
DoorDark = 40,
|
||||
Beehive = 41,
|
||||
PotionMinor = 42,
|
||||
PotionDummy = 43,
|
||||
Bowl = 44,
|
||||
VialEmpty = 45,
|
||||
FireBowlGround = 46,
|
||||
Lantern = 47,
|
||||
CraftingBench = 48,
|
||||
Forge = 49,
|
||||
Cauldron = 50,
|
||||
Anvil = 51,
|
||||
CookingPot = 52,
|
||||
SpinningWheel = 53,
|
||||
TanningRack = 54,
|
||||
Loom = 55,
|
||||
DismantlingBench = 56,
|
||||
RepairBench = 57,
|
||||
ChristmasOrnament = 58,
|
||||
ChristmasWreath = 59,
|
||||
WindowArabic = 60,
|
||||
BookshelfArabic = 61,
|
||||
TableArabicLarge = 62,
|
||||
CanapeArabic = 63,
|
||||
CupboardArabic = 64,
|
||||
WallTableArabic = 65,
|
||||
JugAndBowlArabic = 66,
|
||||
JugArabic = 67,
|
||||
MelonCut = 68,
|
||||
OvenArabic = 69,
|
||||
Hearth = 70,
|
||||
ForgeTools = 71,
|
||||
Tent = 72,
|
||||
Bedroll = 73,
|
||||
Grave = 74,
|
||||
Gravestone = 75,
|
||||
MagicalBarrier = 76,
|
||||
Helm = 77,
|
||||
DoorWide = 78,
|
||||
BoneKeyhole = 79,
|
||||
BoneKeyDoor = 80,
|
||||
IceCrystal = 81,
|
||||
OneWayWall = 82,
|
||||
GlowIceCrystal = 83,
|
||||
Sign = 84,
|
||||
WoodBarricades = 85,
|
||||
SmithingTable = 86,
|
||||
Forge0 = 87,
|
||||
GearWheel0 = 88,
|
||||
Quench0 = 89,
|
||||
Ember = 0x00,
|
||||
SmokeDummy = 0x01,
|
||||
Bomb = 0x02,
|
||||
FireBlock = 0x03, // FireBlock for Burning Buff
|
||||
Mine = 0x04,
|
||||
HotSurface = 0x05,
|
||||
},
|
||||
// Furniture. In the future, we might add an attribute to customise material
|
||||
Furniture = 3 has Ori {
|
||||
// TODO: add stuff to this
|
||||
// TODO: Remove sizes and variants, represent with attributes
|
||||
Furniture = 2 has Ori {
|
||||
// Indoor
|
||||
CoatRack = 0x00,
|
||||
Bed = 0x01,
|
||||
Bench = 0x02,
|
||||
ChairSingle = 0x03,
|
||||
ChairDouble = 0x04,
|
||||
DrawerLarge = 0x05,
|
||||
DrawerMedium = 0x06,
|
||||
DrawerSmall = 0x07,
|
||||
TableSide = 0x08,
|
||||
TableDining = 0x09,
|
||||
TableDouble = 0x0A,
|
||||
WardrobeSingle = 0x0B,
|
||||
WardrobeDouble = 0x0C,
|
||||
BookshelfArabic = 0x0D,
|
||||
WallTableArabic = 0x0E,
|
||||
TableArabicLarge = 0x0F,
|
||||
TableArabicSmall = 0x10,
|
||||
CupboardArabic = 0x11,
|
||||
OvenArabic = 0x12,
|
||||
CushionArabic = 0x13,
|
||||
CanapeArabic = 0x14,
|
||||
Shelf = 0x15,
|
||||
Planter = 0x16,
|
||||
Pot = 0x17,
|
||||
// Crafting
|
||||
CraftingBench = 0x20,
|
||||
Forge = 0x21,
|
||||
Cauldron = 0x22,
|
||||
Anvil = 0x23,
|
||||
CookingPot = 0x24,
|
||||
SpinningWheel = 0x25,
|
||||
TanningRack = 0x26,
|
||||
Loom = 0x27,
|
||||
DismantlingBench = 0x28,
|
||||
RepairBench = 0x29,
|
||||
// Containers
|
||||
Chest = 0x30,
|
||||
DungeonChest0 = 0x31,
|
||||
DungeonChest1 = 0x32,
|
||||
DungeonChest2 = 0x33,
|
||||
DungeonChest3 = 0x34,
|
||||
DungeonChest4 = 0x35,
|
||||
DungeonChest5 = 0x36,
|
||||
CoralChest = 0x37,
|
||||
CommonLockedChest = 0x38,
|
||||
ChestBuried = 0x39,
|
||||
Crate = 0x3A,
|
||||
Barrel = 0x3B,
|
||||
CrateBlock = 0x3C,
|
||||
// Standalone lights
|
||||
Lantern = 0x40,
|
||||
StreetLamp = 0x41,
|
||||
StreetLampTall = 0x42,
|
||||
SeashellLantern = 0x43,
|
||||
FireBowlGround = 0x44,
|
||||
// Wall
|
||||
HangingBasket = 0x50,
|
||||
HangingSign = 0x51,
|
||||
ChristmasOrnament = 0x52,
|
||||
ChristmasWreath = 0x53,
|
||||
WallLampWizard = 0x54,
|
||||
WallLamp = 0x55,
|
||||
WallLampSmall = 0x56,
|
||||
WallSconce = 0x57,
|
||||
DungeonWallDecor = 0x58,
|
||||
// Outdoor
|
||||
Tent = 0x60,
|
||||
Bedroll = 0x61,
|
||||
BedrollSnow = 0x62,
|
||||
BedrollPirate = 0x63,
|
||||
Sign = 0x64,
|
||||
Helm = 0x65,
|
||||
// Misc
|
||||
Scarecrow = 0x70,
|
||||
FountainArabic = 0x71,
|
||||
Hearth = 0x72,
|
||||
},
|
||||
// Sprites representing plants that may grow over time (this does not include plant parts, like fruit).
|
||||
Plant = 4 has Ori, Growth {
|
||||
Plant = 3 has Growth {
|
||||
// Cacti
|
||||
BarrelCactus = 0x00,
|
||||
RoundCactus = 0x01,
|
||||
ShortCactus = 0x02,
|
||||
MedFlatCactus = 0x03,
|
||||
ShortFlatCactus = 0x04,
|
||||
LargeCactus = 0x05,
|
||||
TallCactus = 0x06,
|
||||
// Flowers
|
||||
BlueFlower = 0x10,
|
||||
PinkFlower = 0x11,
|
||||
@ -319,10 +171,184 @@ sprites! {
|
||||
WhiteFlower = 0x14,
|
||||
YellowFlower = 0x15,
|
||||
Sunflower = 0x16,
|
||||
// Grasses
|
||||
LongGrass = 0x20,
|
||||
MediumGrass = 0x21,
|
||||
ShortGrass = 0x22,
|
||||
Moonbell = 0x17,
|
||||
Pyrebloom = 0x18,
|
||||
// Grasses, ferns, and other 'wild' plants/fungi
|
||||
// TODO: remove sizes, make part of the `Growth` attribute
|
||||
LongGrass = 0x20,
|
||||
MediumGrass = 0x21,
|
||||
ShortGrass = 0x22,
|
||||
Fern = 0x23,
|
||||
LargeGrass = 0x24,
|
||||
GrassSnow = 0x25,
|
||||
Reed = 0x26,
|
||||
GrassBlue = 0x27,
|
||||
SavannaGrass = 0x28,
|
||||
TallSavannaGrass = 0x29,
|
||||
RedSavannaGrass = 0x2A,
|
||||
SavannaBush = 0x2B,
|
||||
Welwitch = 0x2C,
|
||||
LeafyPlant = 0x2D,
|
||||
DeadBush = 0x2E,
|
||||
JungleFern = 0x2F,
|
||||
CavernGrassBlueShort = 0x30,
|
||||
CavernGrassBlueMedium = 0x31,
|
||||
CavernGrassBlueLong = 0x32,
|
||||
CavernLillypadBlue = 0x33,
|
||||
EnsnaringVines = 0x34,
|
||||
LillyPads = 0x35,
|
||||
JungleLeafyPlant = 0x36,
|
||||
JungleRedGrass = 0x37,
|
||||
// Crops, berries, and fungi
|
||||
Corn = 0x40,
|
||||
WheatYellow = 0x41,
|
||||
WheatGreen = 0x42, // TODO: Remove `WheatGreen`, make part of the `Growth` attribute
|
||||
LingonBerry = 0x43,
|
||||
Blueberry = 0x44,
|
||||
Cabbage = 0x45,
|
||||
Pumpkin = 0x46,
|
||||
Carrot = 0x47,
|
||||
Tomato = 0x48,
|
||||
Radish = 0x49,
|
||||
Turnip = 0x4A,
|
||||
Flax = 0x4B,
|
||||
Mushroom = 0x4C,
|
||||
CaveMushroom = 0x4D,
|
||||
Cotton = 0x4E,
|
||||
WildFlax = 0x4F,
|
||||
SewerMushroom = 0x50,
|
||||
// Seaweeds, corals, and other underwater plants
|
||||
StonyCoral = 0x60,
|
||||
SoftCoral = 0x61,
|
||||
SeaweedTemperate = 0x62,
|
||||
SeaweedTropical = 0x63,
|
||||
GiantKelp = 0x64,
|
||||
BullKelp = 0x65,
|
||||
WavyAlgae = 0x66,
|
||||
SeaGrapes = 0x67,
|
||||
MermaidsFan = 0x68,
|
||||
SeaAnemone = 0x69,
|
||||
Seagrass = 0x6A,
|
||||
RedAlgae = 0x6B,
|
||||
// Danglying ceiling plants/fungi
|
||||
Liana = 0x70,
|
||||
CavernMycelBlue = 0x71,
|
||||
CeilingMushroom = 0x72,
|
||||
},
|
||||
// Solid resources
|
||||
// TODO: Remove small variants, make deposit size be an attribute
|
||||
Resources = 4 {
|
||||
// Gems and ores
|
||||
Amethyst = 0x00,
|
||||
AmethystSmall = 0x01,
|
||||
Ruby = 0x02,
|
||||
RubySmall = 0x03,
|
||||
Sapphire = 0x04,
|
||||
SapphireSmall = 0x05,
|
||||
Emerald = 0x06,
|
||||
EmeraldSmall = 0x07,
|
||||
Topaz = 0x08,
|
||||
TopazSmall = 0x09,
|
||||
Diamond = 0x0A,
|
||||
DiamondSmall = 0x0B,
|
||||
Bloodstone = 0x0C,
|
||||
Coal = 0x0D,
|
||||
Cobalt = 0x0E,
|
||||
Copper = 0x0F,
|
||||
Iron = 0x10,
|
||||
Tin = 0x11,
|
||||
Silver = 0x12,
|
||||
Gold = 0x13,
|
||||
Velorite = 0x14,
|
||||
VeloriteFrag = 0x15,
|
||||
// Woods and twigs
|
||||
Twigs = 0x20,
|
||||
Wood = 0x21,
|
||||
Bamboo = 0x22,
|
||||
Hardwood = 0x23,
|
||||
Ironwood = 0x24,
|
||||
Frostwood = 0x25,
|
||||
Eldwood = 0x26,
|
||||
// Other
|
||||
Apple = 0x30,
|
||||
Coconut = 0x31,
|
||||
Stones = 0x32,
|
||||
Seashells = 0x33,
|
||||
Beehive = 0x34,
|
||||
Bowl = 0x35,
|
||||
PotionMinor = 0x36,
|
||||
PotionDummy = 0x37,
|
||||
VialEmpty = 0x38,
|
||||
},
|
||||
// Structural elements including doors and building parts
|
||||
Structural = 5 has Ori {
|
||||
// Doors and keyholes
|
||||
Door = 0x00,
|
||||
DoorDark = 0x01,
|
||||
DoorWide = 0x02,
|
||||
BoneKeyhole = 0x03,
|
||||
BoneKeyDoor = 0x04,
|
||||
Keyhole = 0x05,
|
||||
KeyDoor = 0x06,
|
||||
GlassKeyhole = 0x07,
|
||||
KeyholeBars = 0x08,
|
||||
// Windows
|
||||
Window1 = 0x10,
|
||||
Window2 = 0x11,
|
||||
Window3 = 0x12,
|
||||
Window4 = 0x13,
|
||||
WitchWindow = 0x14,
|
||||
WindowArabic = 0x15,
|
||||
// Walls
|
||||
GlassBarrier = 0x20,
|
||||
SeaDecorBlock = 0x21,
|
||||
CliffDecorBlock = 0x22,
|
||||
MagicalBarrier = 0x23,
|
||||
OneWayWall = 0x24,
|
||||
// Gates and grates
|
||||
SeaDecorWindowHor = 0x30,
|
||||
SeaDecorWindowVer = 0x31,
|
||||
DropGate = 0x32,
|
||||
DropGateBottom = 0x33,
|
||||
WoodBarricades = 0x34,
|
||||
// Misc
|
||||
Rope = 0x40,
|
||||
SeaDecorChain = 0x41,
|
||||
IronSpike = 0x42,
|
||||
DoorBars = 0x43,
|
||||
},
|
||||
// Decorative items, both natural and artificial
|
||||
Decor = 6 has Ori {
|
||||
// Natural
|
||||
Bones = 0x00,
|
||||
IceCrystal = 0x01,
|
||||
GlowIceCrystal = 0x02,
|
||||
CrystalHigh = 0x03,
|
||||
CrystalLow = 0x04,
|
||||
UnderwaterVent = 0x05,
|
||||
SeaUrchin = 0x06,
|
||||
IceSpike = 0x07,
|
||||
Mud = 0x08,
|
||||
Orb = 0x09,
|
||||
EnsnaringWeb = 0x0A,
|
||||
DiamondLight = 0x0B,
|
||||
// Artificial
|
||||
Grave = 0x10,
|
||||
Gravestone = 0x11,
|
||||
MelonCut = 0x12,
|
||||
ForgeTools = 0x13,
|
||||
JugAndBowlArabic = 0x14,
|
||||
JugArabic = 0x15,
|
||||
DecorSetArabic = 0x16,
|
||||
SepareArabic = 0x17,
|
||||
Candle = 0x18,
|
||||
SmithingTable = 0x19,
|
||||
Forge0 = 0x1A,
|
||||
GearWheel0 = 0x1B,
|
||||
Quench0 = 0x1C,
|
||||
SeaDecorEmblem = 0x1D,
|
||||
SeaDecorPillar = 0x1E,
|
||||
MagicalSeal = 0x1F,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -181,6 +181,9 @@ struct SpriteConfig<Model> {
|
||||
/// Configuration data for all sprite models.
|
||||
///
|
||||
/// NOTE: Model is an asset path to the appropriate sprite .vox model.
|
||||
// TODO: Overhaul this entirely to work with the new sprite attribute system. We'll probably be
|
||||
// wanting a way to specify inexact mappings between sprite models and sprite configurations. For
|
||||
// example, the ability to use a model for a range of plant growth states.
|
||||
#[derive(Deserialize)]
|
||||
#[serde(try_from = "HashMap<SpriteKind, Option<SpriteConfig<String>>>")]
|
||||
pub struct SpriteSpec(HashMap<SpriteKind, Option<SpriteConfig<String>>>);
|
||||
|
Loading…
Reference in New Issue
Block a user