{
  "schema": 1,
  "game": "X1",
  "actor": "Gulpfer",
  "eventId": 29,
  "romSha1": "449A00631208FBCC8D58209E66D0D488674B7FB1",
  "entry": "82A33A",
  "sourcePacket": "x1/1d-gulpfer",
  "sourceMethod": "Static revision-pinned ROM code and metadata extraction; no new original-game runtime capture.",
  "spans": [
    {
      "address": "82A33A",
      "length": 1178,
      "sha256": "7C64F2CB2DDCC731718D6A07C07FEEB40050F2C4B9ED88117F5737AC943CC41F",
      "purpose": "Complete dispatcher, body states, capture/suction/struggle, own death and small-pool17 helpers"
    },
    {
      "address": "86CB2E",
      "length": 24,
      "sha256": "B17BDE72E42F9F5F5E9637B255DD20ED353E04624B50D81D23684B3AD5736141",
      "purpose": "Independent ordinary combat/terrain, mouth combat and swallowed-state combat/terrain shapes"
    },
    {
      "address": "86EE37",
      "length": 128,
      "sha256": "FC1F9F572DBDDE7BF520DDB365DB2D42F08F80C12DAFE50ED94762043DEBAFF7",
      "purpose": "32 signed 8.8 vectors: direct suction and arithmetic quarter-speed roaming"
    },
    {
      "address": "86BB5A",
      "length": 64,
      "sha256": "F638D4CF27A30ADB194614BE6ECB799E446467D33D18F2D97D8C02AE7E2DFD2F",
      "purpose": "Integer sector codes used by the shared target-angle helper"
    },
    {
      "address": "86EFD7",
      "length": 30,
      "sha256": "FEBFFC196546713E6C6F289E6D2843802811331CC77B9001D862574742BC9BC1",
      "purpose": "Default selector3 weapon damage row"
    },
    {
      "address": "849DC8",
      "length": 72,
      "sha256": "292EE23E4B548B84CEBA4AF17126DA128CF7911BE2EB4E682F1E00D76CAD09E2",
      "purpose": "Temporary player-weapon receiver while the player is swallowed"
    },
    {
      "address": "849F85",
      "length": 68,
      "sha256": "3786E95B7B7A63E0104A5AE876469A16A209CCB73D0FBC7EEBB4384E711DAB7F",
      "purpose": "Native player-state suspend/restore helpers; restore includes an RNG-dependent ROM-integrity check"
    },
    {
      "address": "82EE62",
      "length": 171,
      "sha256": "FFC4FD51E96F0DBA38FC77840FF06882EDCD15CD11E3CB0A02C212704A3ACB8F",
      "purpose": "Complete SMALL EFFECT17 body-linked/rising-water bubble controller; group2B/resource29, no audio/RNG"
    },
    {
      "address": "849F25",
      "length": 84,
      "sha256": "5B2CA5F12412134C244FE6ECD20AA79D1DDE675200EAD9125E343200859574FD",
      "purpose": "Periodic captured-player damage: armor mitigation and HP/death only; no nonlethal hurt state/knockback/sound"
    }
  ],
  "auditStatus": "Preparatory source review and scripts/data preserved. Gulpfer remains in generic idle; native coupled player-capture controller and its audio timing are pending.",
  "implementationState": {
    "usesGenericController": true,
    "nativeControllerEnabled": false,
    "preparedOnly": "Group2A selectors0..7 and reached bytes, native shape/vector/sector/damage tables; metadata does not activate native animation or AI.",
    "pending": "Port the complete body/suction/captured-player/shooting/struggle/death and small-pool17 cosmetic adapters before removing idle policy.",
    "capturePrerequisite": "Generic core Player.TryCapture/SetCapturedPose/ReleaseCapture API is available in29d3415 and docs/player-capture.md;313 headless checks and X1/X2/X3 DX9 buster/pause/save/RNG smoke pass. The Gulpfer-specific adapter remains pending."
  },
  "initialization": {
    "health": 10,
    "contactDamage": 2,
    "damageSelector": 3,
    "script": 0,
    "anchor": "Initial integer X in31",
    "facing": "Mode2 entry faces current player; equality selects right.",
    "receiver": "Ordinary body continues the shared weapon receiver; no generic closed-until-near defense appears in this reviewed path."
  },
  "states": {
    "mode2": "Initial straight drift at0.5px toward initial facing for30 updates; then helperA72B selects mode4 and allocates small-pool17/sub0.",
    "mode4": "Animate stationary for180 updates, with capture-cone checks while player is available. For dx=playerX-fishX: right/equality requires0..95 and facing right; left requires-96..-1 and facing left. Integer sector ranges6..10 /22..26 further gate suction/capture; preserve this asymmetric horizontal boundary.",
    "suction": "Helper82A6A1 moves player using negated full vectors86EE37; restores horizontal velocity and cancels previously downward vertical velocity. Expanded mouth box86CB38 determines transition to capture.",
    "mouthCapture": "Marks native player lock, mode4/phase4, script1, small-pool17/sub1 at mouth offset16 and player-state suspend849F85. Script completion hides/swallows player, changes shape toCB3C and starts180-update damage timer.",
    "mode6": "Roaming segments use target vector divided arithmetically by4 for30 updates, bounded by NPC terrain; upward water-surface probe can suppress vertical movement. Segment counter and849086 bit0 decide periodic return to mode4 after counter reaches8.",
    "mode8": "Swallowed player follows integer fish origin. Fish patrols horizontally0.5px, flips at side contacts / outward anchor limit128, and requests common player damage2 each180 updates. Native directional/current input and pressed80 select struggle scripts3/4; physical button meaning must be confirmed before binding.",
    "struggle": "Helper82A6E4 subtracts2 from fish HP on the pressed80 escape action. Lethal struggle selects own script6 and cue23; it does not run the generic centered-explosion/drop path.",
    "mode10": "Own script6 (struggle death) or7 (weapon death) advances until end, then source removal and final small-pool17/sub1 at offset0."
  },
  "shapes": {
    "ordinaryCombat": "86CB2E center(1,0), half(12,17)",
    "ordinaryTerrain": "86CB33 center(-1,0), half(14,23), inset6",
    "mouthCombat": "86CB38 center(-15,2), half(5,12)",
    "swallowedCombat": "86CB3C center(0,0), half(20,23)",
    "swallowedTerrain": "86CB41 center(-1,0), half(14,23), inset6",
    "rule": "Combat and terrain descriptor portions are independent; terrain begins at descriptor+5."
  },
  "audio": {
    "directQueues": [
      {
        "address": "82A376",
        "command": 35,
        "meaning": "Weapon-lethal own death/script7"
      },
      {
        "address": "82A701",
        "command": 35,
        "meaning": "Struggle-lethal own death/script6"
      }
    ],
    "shared": "Weapon receiver can use nonlethal11 and punch3C. Exact action timing is pending its native adapter.",
    "renames": "Both direct cues are known common explosion23; no new native filename or manifest renaming is needed for these IDs.",
    "drop": "No84A37F drop call in the reviewed complete controller; a native adapter must suppress generic drops."
  },
  "rngAndPools": {
    "roaming": "849086 requested only when the segment-counter gate is met; do not draw a random number every frame.",
    "release": "849FAD also calls849086 during native player-state restoration/ROM-integrity checking; its RNG consumption must be considered separately from AI.",
    "smallPool17": "8282D3 allocates SMALL EFFECT17 with subtype0/1 and owner pointer; these are not enemy/projectile17 or copies of the fish.",
    "hostRecovery": "Capture must restore player visibility/input/state on owner removal, culling, death and save restore."
  },
  "limits": [
    "Gulpfer native body/capture/struggle/death and effect17 adapters remain unimplemented; generic idle is retained.",
    "The generic captured-player API is validated, but its Gulpfer-specific integration and silent periodic damage path are pending.",
    "The exact pressed80 physical/logical mapping and swallowed weapon-request adaptation still need confirmation/integration.",
    "No new Gulpfer original-game runtime or frame-paired fidelity certification."
  ],
  "validation": {
    "selectedTests": 275,
    "failed": 0,
    "skipped": 0,
    "scope": "Prepared Gulpfer source/animation/data checks plus previous Flamer/SineFaller/terrain/art/inventory/native-audio checks and all58 remaining generic-idle actors; no new Gulpfer native-controller/runtime validation.",
    "latestHelperReview": "All9 pinned source spans and all retained animation/data segments rechecked against the original ROM after adding the complete bubble17 and silent periodic-damage helper."
  },
  "periodicPlayerDamage": {
    "entry": "849F25",
    "request": "Gulpfer82A60C writes damage2 then calls849F25 each180 swallowed updates.",
    "armor": "Native body-armor flag1F99 bit04 halves the integer request, rounding upward. Use the selected engine armor profile rather than native bit layout in shared engine APIs.",
    "effect": "HP is reduced directly, ignoring a previous hurt/invincibility flag; zero HP requests native death. A nonlethal request does NOT enter the normal hurt/knockback state or queue hurt audio.",
    "integration": "Do not substitute generic Hurt(player,2). Provide an owner-authorized captured HP-damage path or equivalent that applies armor and normal death cleanup without hurt animation/knockback/audio."
  },
  "smallEffect17": {
    "entry": "82EE62",
    "pool": "small-effect, not enemy/projectile",
    "group": 43,
    "resource": 41,
    "scripts": "Selector equals subtype0/1; own group2B art, never Gulpfer body art.",
    "subtype0": "Retains body pointer0C, animates while parent phase byte03 is nonzero; otherwise removes silently.",
    "subtype1": "Initial upward speed0100. Moves upward1px, samples raw terrain at X,Y-18, and animates/draws only on0D/0E water. Non-water or failed draw window removes silently.",
    "audio": "No direct sound queue or RNG call in the reviewed complete helper.",
    "pending": "Own group2B/resource29 asset export and live effect adapter."
  }
}
