mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-18 09:15:59 -04:00
2332bd7b58
* Add basic EquipmentSlot struct * Add Load function to EquipmentSlot * Move EquipmentSlot struct to inventory_grid.go * Add equipmentSlots arg to ItemGrid struct * Add basic rendering of equipment slots. * Change rendering of equipment slots to simply use their static x and y * Add ChangeEquippedSlot function * Add initialization to all equipped slots types. * Fix Y locations of equipment slots * Move default equipment slots to a genEquipmentSlotsMap function. * Change Item to item * Fix coordinates * Change usage of string to EquippedSlotType when dealing with different slots in rendering. * Fix import error * Remove neck example * Add loading sprites of equipped items. * Clean code in Inventory rendering * Clean code in Inventory rendering * Clean code in Inventory rendering * Change default items that get rendered. * Change default items that get rendered. * Add width and height to EquipementSlot struct * Fill in width and height to current equipment slots. * Fix Y setting of equipment slots * Rename variables for clean code. * Change handling nil itemSprite to condition instead of loop return. * Split Render function to 2 functions. * Add TODO * Change comment to start with capital I
17 lines
374 B
Go
17 lines
374 B
Go
package d2enum
|
|
|
|
type EquippedSlotType int
|
|
|
|
const (
|
|
Head EquippedSlotType = 1
|
|
Torso EquippedSlotType = 2
|
|
Legs EquippedSlotType = 3
|
|
RightArm EquippedSlotType = 4
|
|
LeftArm EquippedSlotType = 5
|
|
LeftHand EquippedSlotType = 6
|
|
RightHand EquippedSlotType = 7
|
|
Neck EquippedSlotType = 8
|
|
Belt EquippedSlotType = 9
|
|
Gloves EquippedSlotType = 10
|
|
)
|