ARE-Format geknackt (Sektor-Tabelle + Objektrecords, tools/are_dump.py): echte Item-/Tuer-/Gegner-Positionen -- plus Smacks' Wasserblasen v1 (ALT beim Schwimmen)

This commit is contained in:
2026-07-26 03:10:21 +02:00
parent 5afe598337
commit 696e3c1d8e
3 changed files with 127 additions and 0 deletions
+25
View File
@@ -751,6 +751,7 @@ def run_level(clock, assets, audio_paths, map_name='W1L1'):
down_gap = 0.0 # Grace gegen Taste/on_ground-Flackern
look_down = 0.0 # Kamera-Offset beim gehaltenen Ducken
dying = None # dict(t, vy, drop_y, drop_vy) waehrend Tod-Anim
bubbles = [] # Smacks' Wasserblasen (dict x,y,vx,t)
while True:
dt = min(clock.tick(60) / 1000.0, 1 / 20)
@@ -771,6 +772,12 @@ def run_level(clock, assets, audio_paths, map_name='W1L1'):
and player.on_ground and abs(player.vx) < 1
and door_open_t is None):
door_open_t = 0.0
elif player.swimming and 29 in player.slots:
# Smacks: Wasserblase (Handbuch: ALT beim Schwimmen/
# Tauchen). Waechst 29->30->31, treibt vor und steigt.
bubbles.append(dict(x=player.x + 14 * player.facing,
y=player.y - 26,
vx=55.0 * player.facing, t=0.0))
keys = pygame.key.get_pressed()
if dying is None:
@@ -861,6 +868,24 @@ def run_level(clock, assets, audio_paths, map_name='W1L1'):
canvas.blit(door_open_sprite, (door.x - cam_x, door.y - cam_y))
else:
canvas.blit(door_sign_sprite, (door.x - cam_x, door.y - cam_y))
# Wasserblasen: wachsen (29->30->31), treiben vorwaerts, steigen,
# platzen an der Oberflaeche. (Gegner-Fang kommt mit den Gegnern.)
wy_b = info.get('water_y')
for b in bubbles[:]:
b['t'] += dt
b['x'] += b['vx'] * dt
b['vx'] *= 0.96
if b['t'] > 0.5:
b['y'] -= 28 * dt
if (wy_b is not None and b['y'] < wy_b + 8) or b['t'] > 4.0:
bubbles.remove(b)
continue
slot = 29 if b['t'] < 0.25 else (30 if b['t'] < 0.5 else 31)
entry = player.slots.get(slot)
if entry:
bs = entry[0]
canvas.blit(bs, (int(b['x'] - bs.get_width() / 2 - cam_x),
int(b['y'] - bs.get_height() / 2 - cam_y)))
player.draw(canvas, cam_x, cam_y)
if dying is not None and SLOT_DROP1 in player.slots:
# fallendes Accessoire (16x16, Slots 48/49 im Wechsel = Flattern)