Skip to content

Commit 9e27888

Browse files
Merge pull request #2243 from AlmostSeagull/unKrasha
Revert PR2204
2 parents 67f8aa9 + aedd0d7 commit 9e27888

File tree

15 files changed

+254
-380
lines changed

15 files changed

+254
-380
lines changed

base-hack/Build/BuildEnums.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -866,16 +866,6 @@ class ExtraTextures(IntEnum):
866866
BeanSpin10 = auto()
867867
BeanSpin11 = auto()
868868
BeanSpin12 = auto()
869-
KrushaFace1 = auto()
870-
KrushaFace2 = auto()
871-
KrushaFace3 = auto()
872-
KrushaFace4 = auto()
873-
KrushaFace5 = auto()
874-
KrushaFace321 = auto()
875-
KrushaFace322 = auto()
876-
KrushaFace323 = auto()
877-
KrushaFace324 = auto()
878-
KrushaFace325 = auto()
879869

880870

881871
class MoveTypes(IntEnum):

base-hack/Build/build.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,27 +1127,6 @@
11271127
)
11281128
)
11291129

1130-
1131-
for x in range(5):
1132-
file_dict.append(
1133-
File(
1134-
name=f"Krusha Head {x + 1}",
1135-
pointer_table_index=TableNames.TexturesGeometry,
1136-
file_index=getBonusSkinOffset(ExtraTextures.KrushaFace1 + x),
1137-
source_file=f"assets/displays/krusha_head_{x + 1}_64.png",
1138-
texture_format=TextureFormat.RGBA5551,
1139-
)
1140-
)
1141-
file_dict.append(
1142-
File(
1143-
name=f"Krusha Head 32 {x + 1}",
1144-
pointer_table_index=TableNames.TexturesGeometry,
1145-
file_index=getBonusSkinOffset(ExtraTextures.KrushaFace321 + x),
1146-
source_file=f"assets/displays/krusha_head_{x + 1}_32.png",
1147-
texture_format=TextureFormat.RGBA32,
1148-
)
1149-
)
1150-
11511130
kong_palettes = {
11521131
0xE8C: [(32, 32), "block"], # DK Base
11531132
0xE8D: [(43, 32), "checkered"], # DK Tie Hang
@@ -2187,16 +2166,6 @@
21872166
"win_con_logo",
21882167
"25y_mipped",
21892168
"y25_small",
2190-
"krusha_head_1_64",
2191-
"krusha_head_2_64",
2192-
"krusha_head_3_64",
2193-
"krusha_head_4_64",
2194-
"krusha_head_5_64",
2195-
"krusha_head_1_32",
2196-
"krusha_head_2_32",
2197-
"krusha_head_3_32",
2198-
"krusha_head_4_32",
2199-
"krusha_head_5_32",
22002169
]
22012170
for b in barrel_skins:
22022171
displays.extend([f"barrel_{b}_0", f"barrel_{b}_1", f"dirt_reward_{b}"])

base-hack/Build/createComplexImages.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,6 @@ def bump_saturation(image: Image, factor: float) -> Image:
379379
krusha_im = krusha_im.transpose(Image.Transpose.FLIP_TOP_BOTTOM)
380380
krusha_im.save(f"{disp_dir}krusha_head64.png")
381381

382-
# Krusha Heads 1-5
383-
for x in range(5):
384-
krusha_im = Image.open(f"{disp_dir}krusha_head_{x + 1}.png")
385-
krusha_im = krusha_im.resize((64, 64), Image.Resampling.NEAREST)
386-
krusha_im = krusha_im.transpose(Image.Transpose.FLIP_TOP_BOTTOM)
387-
krusha_im.save(f"{disp_dir}krusha_head_{x + 1}_64.png")
388-
krusha_im = Image.open(f"{disp_dir}krusha_head_{x + 1}.png")
389-
krusha_im = krusha_im.resize((32, 32), Image.Resampling.NEAREST)
390-
krusha_im.save(f"{disp_dir}krusha_head_{x + 1}_32.png")
391-
392382
# Wrinkly
393383
wrinkly_im = Image.open(f"{hash_dir}wrinkly.png").resize((48, 48)).save(f"{disp_dir}wrinkly_sprite.png")
394384

-18.6 KB
Binary file not shown.
-16.4 KB
Binary file not shown.
-14.6 KB
Binary file not shown.
-17.4 KB
Binary file not shown.
-17.6 KB
Binary file not shown.

base-hack/src/misc/krusha.c

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -320,26 +320,7 @@ typedef struct projectile_extra {
320320
} projectile_extra;
321321

322322
void setKrushaAmmoColor(void) {
323-
int currentPellet = CurrentActorPointer_0->actorType;
324-
switch (currentPellet) {
325-
case 48:
326-
changeActorColor(0xC0, 0xFF, 0, 0xFF);
327-
break;
328-
case 36:
329-
changeActorColor(0xFF, 0x40, 0x40, 0xFF);
330-
break;
331-
case 42:
332-
changeActorColor(0x18, 0x18, 0xFF, 0xFF);
333-
break;
334-
case 43:
335-
changeActorColor(0x80, 0, 0xFF, 0xFF);
336-
break;
337-
case 38:
338-
changeActorColor(0, 0xFF, 0, 0xFF);
339-
break;
340-
default:
341-
changeActorColor(0, 0xFF, 0, 0xFF);
342-
}
323+
changeActorColor(0, 0xFF, 0, 0xFF);
343324
}
344325

345326
void OrangeGunCode(void) {

randomizer/Patching/CosmeticColors.py

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,42 +2304,17 @@ def applyKongModelSwaps(settings: Settings) -> None:
23042304
if value in (KongModels.krusha, KongModels.krool_cutscene, KongModels.krool_fight):
23052305
fixModelSmallKongCollision(index)
23062306
if value == KongModels.krusha:
2307-
placeKrushaHead(settings, index)
2307+
placeKrushaHead(index)
23082308
if index == Kongs.donkey:
23092309
fixBaboonBlasts()
23102310
# Orange Switches
23112311
switch_faces = [0xB25, 0xB1E, 0xC81, 0xC80, 0xB24]
23122312
base_im = getImageFile(25, 0xC20, True, 32, 32, TextureFormat.RGBA5551)
23132313
orange_im = getImageFile(7, 0x136, False, 32, 32, TextureFormat.RGBA5551)
23142314
if settings.colorblind_mode == ColorblindMode.off:
2315-
match index:
2316-
case Kongs.donkey:
2317-
color_r = 255
2318-
color_g = 224
2319-
color_b = 8
2320-
case Kongs.diddy:
2321-
color_r = 255
2322-
color_g = 48
2323-
color_b = 32
2324-
case Kongs.lanky:
2325-
color_r = 40
2326-
color_g = 168
2327-
color_b = 255
2328-
case Kongs.tiny:
2329-
color_r = 216
2330-
color_g = 100
2331-
color_b = 248
2332-
case Kongs.chunky:
2333-
color_r = 0
2334-
color_g = 255
2335-
color_b = 0
2336-
case _:
2337-
color_r = 100
2338-
color_g = 255
2339-
color_b = 60
2340-
orange_im = maskImageWithColor(orange_im, (color_r, color_g, color_b))
2315+
orange_im = maskImageWithColor(orange_im, (0, 150, 0))
23412316
else:
2342-
orange_im = maskImageWithColor(orange_im, (0, 255, 0))
2317+
orange_im = maskImageWithColor(orange_im, (0, 255, 0)) # Brighter green makes this more distinguishable for colorblindness
23432318
dim_length = int(32 * ORANGE_SCALING)
23442319
dim_offset = int((32 - dim_length) / 2)
23452320
orange_im = orange_im.resize((dim_length, dim_length))
@@ -2552,30 +2527,10 @@ def darkenDPad():
25522527
ROM().writeBytes(px_data)
25532528

25542529

2555-
def placeKrushaHead(settings: Settings, slot):
2530+
def placeKrushaHead(slot):
25562531
"""Replace a kong's face with the Krusha face."""
2557-
if settings.colorblind_mode != ColorblindMode.off:
2558-
return
2559-
25602532
kong_face_textures = [[0x27C, 0x27B], [0x279, 0x27A], [0x277, 0x278], [0x276, 0x275], [0x273, 0x274]]
25612533
unc_face_textures = [[579, 586], [580, 587], [581, 588], [582, 589], [577, 578]]
2562-
krushaFace64 = getImageFile(TableNames.TexturesGeometry, getBonusSkinOffset(ExtraTextures.KrushaFace1 + slot), True, 64, 64, TextureFormat.RGBA5551)
2563-
krushaFace64Left = krushaFace64.crop([0, 0, 32, 64])
2564-
krushaFace64Right = krushaFace64.crop([32, 0, 64, 64])
2565-
krushaFace64
2566-
writeColorImageToROM(krushaFace64Left, 25, kong_face_textures[slot][0], 32, 64, False, TextureFormat.RGBA5551)
2567-
writeColorImageToROM(krushaFace64Right, 25, kong_face_textures[slot][1], 32, 64, False, TextureFormat.RGBA5551)
2568-
writeColorImageToROM(krushaFace64Left, 7, unc_face_textures[slot][0], 32, 64, False, TextureFormat.RGBA5551)
2569-
writeColorImageToROM(krushaFace64Right, 7, unc_face_textures[slot][1], 32, 64, False, TextureFormat.RGBA5551)
2570-
2571-
krushaFace32 = krushaFace64.resize((32, 32))
2572-
krushaFace32 = krushaFace32.transpose(Image.Transpose.FLIP_TOP_BOTTOM)
2573-
krushaFace32RBGA32 = getImageFile(TableNames.TexturesGeometry, getBonusSkinOffset(ExtraTextures.KrushaFace321 + slot), True, 64, 64, TextureFormat.RGBA32)
2574-
writeColorImageToROM(krushaFace32, 14, 190 + slot, 32, 32, False, TextureFormat.RGBA5551)
2575-
writeColorImageToROM(krushaFace32RBGA32, 14, 197 + slot, 32, 32, False, TextureFormat.RGBA32)
2576-
2577-
"""kong_face_textures = [[0x27C, 0x27B], [0x279, 0x27A], [0x277, 0x278], [0x276, 0x275], [0x273, 0x274]]
2578-
unc_face_textures = [[579, 586], [580, 587], [581, 588], [582, 589], [577, 578]]
25792534
ROM_COPY = LocalROM()
25802535
ROM_COPY.seek(0x1FF6000)
25812536
left = []
@@ -2632,7 +2587,7 @@ def placeKrushaHead(settings: Settings, slot):
26322587
ROM_COPY.seek(rgba32_addr32)
26332588
ROM_COPY.writeBytes(bytearray(data32_rgba32))
26342589
ROM_COPY.seek(rgba16_addr32)
2635-
ROM_COPY.writeBytes(bytearray(data32))"""
2590+
ROM_COPY.writeBytes(bytearray(data32))
26362591

26372592

26382593
def getValueFromByteArray(ba: bytearray, offset: int, size: int) -> int:
@@ -4142,7 +4097,6 @@ def showWinCondition(settings: Settings):
41424097
"Enforcing the law of the Jungle",
41434098
"Saving 20 frames",
41444099
"Reporting bugs. Unlike some",
4145-
"Color-coding Krusha for convenience",
41464100
)
41474101

41484102
crown_heads = (

0 commit comments

Comments
 (0)