Skip to content

Commit 2aee93c

Browse files
committed
Faces
1 parent e79b58f commit 2aee93c

File tree

8 files changed

+34
-6
lines changed

8 files changed

+34
-6
lines changed

base-hack/Build/BuildEnums.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,9 @@ class ExtraTextures(IntEnum):
930930
LankyPadRight = auto()
931931
ChunkyPadLeft = auto()
932932
ChunkyPadRight = auto()
933+
AnyGunFront = auto()
934+
AnyInsLeft = auto()
935+
AnyInsRight = auto()
933936

934937

935938
class MoveTypes(IntEnum):

base-hack/Build/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,6 +1929,9 @@
19291929
"lanky_pad_right": ExtraTextures.LankyPadRight,
19301930
"chunky_pad_left": ExtraTextures.ChunkyPadLeft,
19311931
"chunky_pad_right": ExtraTextures.ChunkyPadRight,
1932+
"any_gun": ExtraTextures.AnyGunFront,
1933+
"any_ins_left": ExtraTextures.AnyInsLeft,
1934+
"any_ins_right": ExtraTextures.AnyInsRight,
19321935
}
19331936

19341937
for tex, index in pad_data.items():
@@ -2519,6 +2522,9 @@
25192522
"lanky_pad_right",
25202523
"chunky_pad_left",
25212524
"chunky_pad_right",
2525+
"any_gun",
2526+
"any_ins_left",
2527+
"any_ins_right",
25222528
]
25232529
for b in barrel_skins:
25242530
displays.extend([f"barrel_{b}_0", f"barrel_{b}_1", f"dirt_reward_{b}", f"shop_{b}"])

base-hack/Build/createComplexImages.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,20 @@ def pointInPolygon(x, y, polygon):
706706
px[x, y] = c_px[x, y]
707707
pad_im.save(f"{disp_dir}{kong}_pad_{seg}.png")
708708

709+
# Any kong activators
710+
gun_base = Image.open(f"{hash_dir}gun_face_base.png")
711+
crate_left = Image.open(f"{hash_dir}standard_crate_0.png").transpose(Image.Transpose.FLIP_TOP_BOTTOM)
712+
crate_right = Image.open(f"{hash_dir}standard_crate_1.png").transpose(Image.Transpose.FLIP_TOP_BOTTOM)
713+
crate_im = Image.new(mode="RGBA", size=(64, 64))
714+
crate_im.paste(crate_left, (0, 0), crate_left)
715+
crate_im.paste(crate_right, (32, 0), crate_right)
716+
crate_im = crate_im.resize((32, 32))
717+
gun_base.paste(crate_im, (0, -6), crate_im)
718+
gun_base.crop((0, 0, 32, 32)).save(f"{disp_dir}any_gun.png")
719+
headphones_im = Image.open(f"{hash_dir}headphones.png").transpose(Image.Transpose.FLIP_TOP_BOTTOM)
720+
headphones_im.crop((0, 0, 20, 40)).resize((32, 64)).save(f"{disp_dir}any_ins_left.png")
721+
headphones_im.crop((20, 0, 40, 40)).resize((32, 64)).save(f"{disp_dir}any_ins_right.png")
722+
709723
# AP Pearls
710724
ap_colors = [
711725
"#FB9152", # ORANGE
@@ -992,6 +1006,7 @@ def alterWood(image):
9921006
"w1_pad_right.png",
9931007
"w2_pad_left.png",
9941008
"w2_pad_right.png",
1009+
"gun_face_base.png",
9951010
]
9961011
for kong in kongs:
9971012
for x in range(2):

base-hack/Build/generate_yellow_wrinkly.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def buildAnyKongSwitches():
181181

182182
with open(any_gun_file, "r+b") as switch_f:
183183
switch_f.seek(0x22C)
184-
switch_f.write((0xC20).to_bytes(4, "big"))
184+
switch_f.write((getBonusSkinOffset(ExtraTextures.AnyGunFront)).to_bytes(4, "big"))
185185

186186
with open(ROMName, "rb") as fh:
187187
ins_f = ROMPointerFile(fh, TableNames.ModelTwoGeometry, 0xAB)
@@ -191,10 +191,10 @@ def buildAnyKongSwitches():
191191
fg.write(dec)
192192

193193
with open(any_ins_file, "r+b") as pad_f:
194-
for instruction in (0x368, 0x370, 0x3B8, 0x3C0):
195-
pad_f.seek(instruction)
196-
pad_f.write((0).to_bytes(4, "big"))
197-
pad_f.write((0).to_bytes(4, "big"))
194+
pad_f.seek(0x324)
195+
pad_f.write((getBonusSkinOffset(ExtraTextures.AnyInsLeft)).to_bytes(4, "big"))
196+
pad_f.seek(0x384)
197+
pad_f.write((getBonusSkinOffset(ExtraTextures.AnyInsRight)).to_bytes(4, "big"))
198198
pad_f.seek(0x50)
199199
floor_start = int.from_bytes(pad_f.read(4), "big")
200200
pad_f.seek(floor_start)

base-hack/Build/pull_images_from_rom.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def __init__(self, name: str, format: str, table: int, index: int, width: int, h
130130
ImageData("w1_pad_right", TextureFormat.RGBA5551, TableNames.TexturesGeometry, 0xDFA, 32, 64, False, False),
131131
ImageData("w2_pad_left", TextureFormat.RGBA5551, TableNames.TexturesGeometry, 0xDF6, 32, 64, False, False),
132132
ImageData("w2_pad_right", TextureFormat.RGBA5551, TableNames.TexturesGeometry, 0xDF7, 32, 64, False, False),
133+
ImageData("gun_face_base", TextureFormat.RGBA5551, TableNames.TexturesGeometry, 0xC20, 32, 32, False, False),
133134
]
134135

135136
shop_owners = {

randomizer/Patching/Library/Image.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ class ExtraTextures(IntEnum):
142142
LankyPadRight = auto()
143143
ChunkyPadLeft = auto()
144144
ChunkyPadRight = auto()
145+
AnyGunFront = auto()
146+
AnyInsLeft = auto()
147+
AnyInsRight = auto()
145148

146149

147150
barrel_skins = (

static/patches/pointer_addresses.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

static/patches/shrink-dk64.bps

3.26 KB
Binary file not shown.

0 commit comments

Comments
 (0)