Skip to content

Commit

Permalink
Set width hints
Browse files Browse the repository at this point in the history
  • Loading branch information
tiliv committed Jun 1, 2024
1 parent b455764 commit 2dcb062
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/hooks/useSubDisplayEquip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export default function useSubDisplayEquip(enabled, {
width, height, keyMap,
}) {
const slots = useMemo(() => ({
weapon: ["Wp ", [0, 0]],
body: ["Bd ", [1, 0]],
legs: ["Lg ", [2, 0]],
feet: ["Ft ", [3, 0]],
head: ["Hd ", [0, width - 4]],
arms: ["Ar ", [1, width - 4]],
shield: ["Sh ", [2, width - 4]],
waist: ["Ws ", [3, width - 4]],
weapon: ["Wp ", [0, 0], 4],
body: ["Bd ", [1, 0], 4],
legs: ["Lg ", [2, 0], 4],
feet: ["Ft ", [3, 0], 4],
head: ["Hd ", [0, width - 4], 4],
arms: ["Ar ", [1, width - 4], 4],
shield: ["Sh ", [2, width - 4], 4],
waist: ["Ws ", [3, width - 4], 4],
}), [width]);

const { sprites, layers } = useSpriteLayers({
Expand Down
16 changes: 8 additions & 8 deletions src/hooks/useSubDisplayRings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const SLOT_ORDER = [
'ring4b',
];
const SLOTS = {
ring1a: ["", [0, 0]],
ring2a: ["", [1, 0]],
ring3a: ["", [2, 0]],
ring4a: ["", [3, 0]],
ring1b: ["", [0, 2]],
ring2b: ["", [1, 2]],
ring3b: ["", [2, 2]],
ring4b: ["", [3, 2]],
ring1a: ["", [0, 0], 2],
ring2a: ["", [1, 0], 2],
ring3a: ["", [2, 0], 2],
ring4a: ["", [3, 0], 2],
ring1b: ["", [0, 2], 2],
ring2b: ["", [1, 2], 2],
ring3b: ["", [2, 2], 2],
ring4b: ["", [3, 2], 2],
};
const SPRITE_POSITIONS = Object.fromEntries(
Object.entries(SLOTS).map(([kind, [,position]]) => [kind, [position]])
Expand Down

0 comments on commit 2dcb062

Please sign in to comment.