Files
kq4-decompile/rooms/kq4-032-ocean-near-island/kq4-032-ocean-near-island.md
2026-02-20 14:00:40 -08:00

69 lines
3.2 KiB
Markdown

# Room 32: Ocean Near Island
## High-Level Summary
Room 32 is a swimming area in the ocean near the island containing Tamir's palace. This transitional room connects the main ocean (room 31) to the beach area (room 40). The player encounters this room when swimming toward the island from the southern approach. The room displays a scenic view of the enchanted white palace on the island and contains animated aquatic creatures (likely fish or flamingos) swimming in the water.
## Look Description
"As you swim, you notice a splendid white palace on a small island to the north."
## Interactions
| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `/tamir` | "You see Tamir in the distance." |
| TODO | Look | `/island` | "The small island contains a beautiful white palace. Lush vegetation encircles it." |
| TODO | Look | `/castle` | "The white palace is quite enchanting! (Maybe it IS enchanted). With its tall slender towers, lovely arched windows, and beautiful island setting, the palace radiates goodness, peace, and serenity." |
| TODO | Look | `/fish` | "You don't see any here." |
| TODO | Look | `[<around>][/room]` | "As you swim, you notice a splendid white palace on a small island to the north." |
## Scripts
| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Background | Prop animations (newProp, newProp_2, newProp_3, newProp_4) | Room initialization | Four animated props using view 660 with forward cycling at varying positions create swimming creature effects in the water |
| TODO | Background | Palace view (newView) | Room initialization | Static view 613 loop 2 cel 0 positioned at 163,62 displays the white palace on the island |
| TODO | Interaction | Edge handling | Player reaches screen edge | Handles screen wrapping (x: 0↔319) and directional exit determination based on player position |
## Technical Notes
- **Room Number**: 32
- **Picture**: 32
- **Region**: 504 (Gull Region), 519 (Ocean Region)
- **Exits**: North→40 (beach), West→31 (ocean), East→31 (ocean), South→31 (ocean)
- **Horizon**: 114
- **View**: 613 (palace view)
### State Variables
| Variable | Values | Description |
|----------|--------|-------------|
| `global100` | `0`, `1` | Nighttime flag - when true, changes picture to 132 |
| `gPrevRoomNum` | `39`, `40`, `41` | Previous room number - determines entry position |
### Entry Points
| From Room | Entry Position |
|-----------|---------------|
| 40 (north) | x:164, y:115 |
| 39 (west) | x:100, y:115 |
| 41 (east) | x:226, y:115 |
### Objects
| Object | View | Loop | Cel | Position | Description |
|--------|------|------|-----|----------|-------------|
| newView | 613 | 2 | 0 | 163, 62 | Palace/island scenery |
| newProp | 660 | 0 | 1 | 79, 81 | Animated aquatic creature |
| newProp_2 | 660 | 1 | 2 | 118, 92 | Animated aquatic creature |
| newProp_3 | 660 | 2 | 0 | 214, 93 | Animated aquatic creature |
| newProp_4 | 660 | 3 | 3 | 266, 86 | Animated aquatic creature |
### Exit Logic
When player hits north edge (edgeHit = 1):
- If x < 115: exit to room 39 (west beach)
- If x > 198: exit to room 41 (east beach)
- Otherwise: exit to room 40 (north beach)