mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +02:00
port: D176(a) Surface black-sky investigation + GE_D176 probe (M-36, partial)
Not root-caused; narrowed substantially. Headless -level_36 + GE_D176 probe (bgfog.c fogLoadLevelEnvironment, sky.c skyRender): - Environment data is CORRECT: fog_tables[] matches Id=36, Sky.Clouds=1, warm CloudRGB=240,120,30, SkyImageId=0. Not a serialized-struct byte-order bug (fog_tables is a compiled C initializer). - skyRender runs the cloud path; corner classification is correct (switch case 12, "sky is top half"). - But skyRenderTri/skyRenderFull emit nothing - not even the env->RGB fill shows. Sky polys degenerate after projection, culled, or the skywaterimages[0] bind is failing. Next (findings.md "D176(a)"): probe sub_GAME_7F097388 projected coords; verify skywaterimages resolves on PC (image_bank.c GIMG offset 0xFB4); fast3d sky-tri trace; cross-check Dam/Statue exteriors. GE_D176=1 probe left in tree (#ifdef PORT, env-gated, inert). Build 240/240 links clean; -level_09 framediff 3/3.
This commit is contained in:
1 parent
4069677b82
commit
809e7378e1
4 files changed
+104
-2
No files matched your search
@@ -21,7 +21,7 @@ once the game is playable start-to-finish without crashes.
|
||||
| **D172** | Bullet-impact / blood particle spray renders magenta or cyan instead of dark red (visible on guards hit at close range on Silo). | **Observed, not investigated** (M-34, Silo capture). A channel-order / CC-mode error in the particle-sprite path (magenta = R+B, cyan = G+B) — not the D64/D120 blood-decal family (those are crash/hang + missing decals, not colour). Likely a texture-format or env-colour decode in `blood_animation.c` / the fast3d sprite path. |
|
||||
| **D178** | Objectives not listed correctly on the pre-mission briefing screen (the mission overview shown before starting a level). | **M-36 triage: the objective lines are BLANK, not wrong.** `GE_STARTMENU=10` Dam briefing renders the header fine ("OHMSS / Agent: James Bond / Mission 1: Arkangelsk / Part i: Dam / PRIMARY OBJECTIVES:") then just the bullet "a." with no text and no b/c/d. → **D143/D151 blank-text family** (`langGet()` → NULL → silent blank), *not* a propDef walk / difficulty decode. **Family B** in `docs/dev/M-36-TRIAGE.md` — find which lang bank the front-end briefing flow fails to load. Re-confirm the exact shape in a *real* briefing (the `GE_STARTMENU` boot skips real save state). Close relatives: D151 (watch objective text blank — type-35/23 `text` slot u16→u32 fix, M-28; interactive re-verify was still pending), D143 (briefing/objective text blank via `langGet` NULL), D157 (objective difficulty byte offset — could make difficulty-gated objectives appear/disappear wrongly). The pre-start briefing is a *different surface* from the in-level watch, so D151's fix may not cover it. **Next:** ask user which level + what exactly shows vs expected; compare against `docs/dev/LEVEL-OBJECTIVES.md` (regenerated post-D157); if lines are blank → D143/D151 family (`langGet` NULL guard = silent blank), if wrong objectives listed → propDef type-23 record walk / difficulty decode. |
|
||||
| **D175** | In-game stutter / brief hang during normal play — observed opening a door on Runway (mission 3, `-level_35`) and also on Surface. No backtrace captured (gdb attach missed the window; it self-recovered). | **Observed, not investigated** (user QA report). Matches known transient-hang classes rather than looking new: D155 (post-slow-load catch-up spiral — clamped), D156 (anim NaN loop — guarded, prints one-shot stderr diag if it fires), D134 (SP/DP task-done event swallowed — fixed M-22, Runway was an original victim), D147/D152 (audio `s_imLock` steal = ~2 s hiccup). Door-open specifically = new room first visible → one-off texture-import/frame spike (likely benign). **Next:** reproduce under `tools_pc/debug.ps1` with the box idle; check console for the D156 stderr diag; if it recurs, attach gdb mid-hang and pattern-match `bt` (import_texture = benign slow frame; model.c:3131 spin = D156; pthread_mutex_lock on s_imLock = D147/D152). |
|
||||
| **D176** | Surface exterior renders wrong (two co-located defects). **(a)** Sky is solid **black** — the skybox / sky gradient does not draw at all (reference: warm sunset cloud gradient). **(b)** The perimeter **tree-line backdrop renders as grey TV-static / comb interlacing** instead of snow-laden pines — the geometry is present and roughly the right silhouette but every tree texture is scrambled noise. Ground, tunnel and the dish/bunker building draw fine. | **Observed, screenshots committed** (M-35, user QA; `docs/img/bugs/d176-surface-exterior-our-build.png` vs `-reference.png`). Level is the shared Surface exterior — user reached it Dam→Surface on Agent so this is **Surface (i) `-level_36`** (confirm it also affects `-level_43`). **(a)** black sky: sky DL not emitting / wrong transform (D75 `logoinst` family) or sky tiles failing import — `GE_PCDUMP` + `GE_DTEX` on the sky pass. **(b)** tree/rock static: **M-36 triage — NOT the D159 family.** `texSwapAltRowBytes` is a full `#ifdef PORT` no-op (`image.c:2199`), it cannot cause this. Real cause: `port/fast3d/gfx_pc.cpp` `import_texture_*` assume `line_size_bytes == full_image_line_size_bytes` (`SUPPORT_CHECK`; rgba16's is commented out *"trips ... with a garbage size"* `:658`) → non-PoT / sub-rect tiles get a flat linear read → diagonal row shear = grey static. **Family A** in `docs/dev/M-36-TRIAGE.md`. Fix: honour `line_size_bytes` as the real source pitch. Same defect as D182(2). |
|
||||
| **D176** | Surface exterior renders wrong (two co-located defects). **(a)** Sky is solid **black** — the skybox / sky gradient does not draw at all (reference: warm sunset cloud gradient). **(b)** The perimeter **tree-line backdrop renders as grey TV-static / comb interlacing** instead of snow-laden pines — the geometry is present and roughly the right silhouette but every tree texture is scrambled noise. Ground, tunnel and the dish/bunker building draw fine. | **Observed, screenshots committed** (M-35, user QA; `docs/img/bugs/d176-surface-exterior-our-build.png` vs `-reference.png`). Level is the shared Surface exterior — user reached it Dam→Surface on Agent so this is **Surface (i) `-level_36`** (confirm it also affects `-level_43`). **(a)** black sky: **M-36 partial (findings.md "D176(a)").** Env data is correct (`Sky.Clouds=1`, `CloudRGB=240,120,30`, `SkyImageId=0`); `skyRender` runs the cloud path and classifies corners correctly (switch case 12), but `skyRenderTri`/`skyRenderFull` emit nothing — not even the `env->RGB` fill shows. Not root-caused: next is probing `sub_GAME_7F097388` projected coords, verifying `skywaterimages[0]` resolves on PC (`image_bank.c` GIMG offset `0xFB4`), and a fast3d sky-tri trace. `GE_D176=1` probe shipped. **(b)** tree/rock static: **M-36 triage — NOT the D159 family.** `texSwapAltRowBytes` is a full `#ifdef PORT` no-op (`image.c:2199`), it cannot cause this. Real cause: `port/fast3d/gfx_pc.cpp` `import_texture_*` assume `line_size_bytes == full_image_line_size_bytes` (`SUPPORT_CHECK`; rgba16's is commented out *"trips ... with a garbage size"* `:658`) → non-PoT / sub-rect tiles get a flat linear read → diagonal row shear = grey static. **Family A** in `docs/dev/M-36-TRIAGE.md`. Fix: honour `line_size_bytes` as the real source pitch. Same defect as D182(2). |
|
||||
| **D174** | "No blood effect" — user reports no visible blood when shooting guards / into surfaces. | **User QA report; likely D120, unverified.** Decals: the D120 `PointUsage[]` converter fix (M-30) was never interactively verified and only takes effect after a full sidecar regen (`d43 && d69 && d88 --regen`) — check whether the playtest build had regenerated sidecars before concluding the fix failed. Spray: D172 observed the particle spray *drawing* (wrong colour, magenta/cyan) on Silo — if the user sees no spray either, that's new info (different weapon/range, or the D172 decode is worse than "wrong colour"). First step: BUNKER1 firefight with regenerated sidecars; if decals still absent, instrument the `chr.c:3328` decal walk. |
|
||||
| **D173** | Third-person Bond model (the player-representing figure shown at level start) spawns too high — floats well above the ground "a lot of the time" while the actual player spawn is correct. Same symptom on the Cuba end credits: JB stands ~6 ft in the air above Natalya. | **Observed, not investigated** (user QA report). D75 animated-model family but a *position* defect, not absence — M-33 confirmed the gun-barrel Bond renders fine upright. Suspects: (a) intro/credits puppet chr spawn position vs the model's base transform; (b) anim root-motion accumulation (`modelSetAnimFrame2WithChrStuff`, D156 area) offsetting the rendered joints above the body origin; (c) a `coord3d`/packed-float decode in the intro camera/model setup. "Player spawning is OK" localises it to the render-side model, not `g_CurrentPlayer` state. |
|
||||
| **D182** | SELECT FILE screen degrades after navigating away and back (main menu → file select, or backing out of file select and re-entering). On the fresh screen the 007 gun-barrel spiral / Bond silhouette renders behind the file boxes; after a round-trip **the Bond image stops drawing entirely** and the whole background gains the **comb / interlacing** artifact (horizontal line scramble). File boxes, text and the Copy/Erase icons still draw. | **Observed, screenshot committed** (M-35, user QA; `docs/img/bugs/d182-file-select-backout-20260902.png`). Two symptoms, likely linked: **(1)** background 3D image stops rendering after re-entry → a front-end model/DL whose `render_pos` / segment binding is only valid on first construction (D149 / D75 `constructor_menuXX` family — the dossier/wallet models have the same "renders once" behaviour). **(2)** interlacing = **M-36 triage: Family A**, the `import_texture_*` `line` vs `full_image_line` shear (see D176(b) / `docs/dev/M-36-TRIAGE.md`) — **not** the D159 `texSwapAltRowBytes` path (that is a full PORT no-op). Open question: why only *after* a round-trip — first import may land `line == width`, re-import may not, or the tile descriptor is stale on re-entry. Repro: `GE_STARTMENU` to file-select, back out with ESC/B, re-enter; `GE_DTEX` on the spiral texture across both visits. Shares defect (2) with D176(b). |
|
||||
|
||||
+51
-1
@@ -392,7 +392,7 @@ covers D24–D69; the log continues in §H (D32 procedure, D70–D121).
|
||||
| D169 | **Front-end mouse pointer can't reach the outer cells of the mission/level-select grid — only an inner ~3×3 selectable (M-33, developer bug report).** The D165 pointer P-controller in `port/src/input.c` is hard-coded to a **320×240** virtual field (`MENU_CURSOR_HI_H`/`_HI_V` = 300/220, `MENU_CURSOR_MID_H`/`_MID_V` = 160/120, `input.c:145-149`), but GE's front end runs at **440×330** (`front.c:8570` `viSetViewSize(440,330)`; default cursor home 220/165 `front.c:285`). `frontUpdateControlStickPosition` clamps the real cursor to `[20,420]×[20,310]` (`front.c:1195-1217`); the mission-select hit-test grid spans x 73…352 / y 62…270 with outer split points 317 / 235.5 (`front.c:516,519,3180,3194`). The port clamps its pointer *target* and *estimate* to 300/220 (`input.c:553-564`) → the stick zeroes out once both saturate → the game's `cursor_h_pos`/`cursor_v_pos` park at ≈300/220, short of the two outer columns and the bottom row. File-select / mode-select / main-menu are unaffected because their hit targets (centred folder boxes, the `x=126` mode list, the `x=106` difficulty list) all sit inside the 320×240 sub-box. Not the D118d `joyGetStickY`-threshold class — this is a virtual-resolution constant mismatch, closer to D164 (a front-end layout constant wrong on the PC path). Also note: the "re-syncs whenever the target is held at a screen edge" comment at `input.c:141-143` describes behaviour the code doesn't implement — the only estimator reset is the activation re-home (`input.c:545-549`), so once pinned at the clamp the estimate never recovers. Confidence: **medium-high** (constants + clamp math unambiguous in source; static-only, no build/run this session; exact reachable block "~4×3" vs the reported "3×3" within tolerance). | **FIXED (M-33, `port/src/input.c`, port-only, no `#ifdef PORT`).** The `menuMode` pointer branch now derives its clamp bounds from the live virtual screen — `[screenleft+20, screenleft+screenwidth-20] × [screentop+20, screentop+screenheight-20]` via `getPlayer_c_screenwidth/height/left/top()` (`src/game/bondview.c:880-895`) — falling back to the old 320×240 constants when the front-end screen isn't set (`sw` outside 200…2000). The estimator seed on activation is now the real `cursor_h_pos`/`cursor_v_pos` (`front.c:285`, externed in `front.h`) instead of the 160/120 centre guess. `MENU_CURSOR_HI_H/_V` / `MID_H/_V` kept only as the fallback. **Verified:** builds + links clean (`getPlayer_c_screen*` and `cursor_[hv]_pos` all resolve — non-static engine symbols, as expected); `GE_STARTMENU=7` mission-select boots crash-free 600+ frames; `-level_09` unregressed (framediff 3/3 within threshold, 91.6% nonclear). The in-level path is untouched (menu-only branch). **Interactive feel-check still owed** — headless input can't drive the mouse pointer, so "every grid tile is now reachable" is inferred from the corrected clamp math, not observed. `Input.MenuPointerMode=0` (legacy velocity) and the constant fallback remain as escape hatches. |
|
||||
| D178 | **Pre-mission briefing screen: objectives blank / missing, briefing pages blank (also the D143 "briefing text blank" side effect) — FIXED (M-36).** Root cause: the briefing segment (`Ubrief*Z`, source `assets/obseg/brief/*.c`) is a raw ROM image of `struct BriefStruct` = `{ u16 brief[4]; struct { u16 textid; u16 enabled_difficulty; } objective[10]; }` (48 bytes), loaded by `front.c load_briefing_text_for_stage()` via `_fileNameLoadToAddr()` — **no converter and no BE→LE fixup anywhere in the chain**. On the LE host all 24 `u16` read byte-swapped. Measured on Dam (`GE_D178=1`): raw `brief=002c,012c,022c,032c obj0=042c/0100 obj3=072c/0000` vs correct `2c00,2c01,2c02,2c03 / 2c04/0001 / 2c07/0000`. Two independent symptoms follow: (a) `textid` `0x2C04` (= `getStringID(LDAM,4)`, bank 11 slot 4) reads as `0x042C` → bank 1 slot 44, never loaded → `langGet()` NULL → **blank text** (this is exactly the D143 residual, `front.c:6732` and `brief[0..3]` at `front.c:6855-6867`); (b) `enabled_difficulty` `0x0001` (Secret Agent) reads as `0x0100 = 256`, so `selected_difficulty >= enabled_difficulty` (`front.c:6729`) is false for every difficulty-gated objective — on Agent only the one `DIFFICULTY_AGENT`(0) objective survived the filter, which is why a single bare "a." bullet printed. **Fix:** `romdataFixupBriefing()` in `port/src/romdata.c` (+ `port/include/romdata.h`), called from a `#ifdef PORT` block in `load_briefing_text_for_stage()` right after the load — the same shape as `langFixupLoadedBank()` in `language.c` (BE-serialized-struct reconciliation, semantics-preserving, no game logic touched). `GE_D178=1` prints the raw and fixed words. **Verified:** Dam briefing on Agent now shows "a. Bungee jump from platform"; on `GE_STARTMENU_DIFF=3` (00 Agent) all four (Neutralize all alarms / Install covert modem / Intercept data backup / Bungee jump from platform), correct difficulty gating. `-level_09` framediff 3/3; `GE_STARTMENU=7`/`=13` crash-free. | **FIXED (M-36)** — high confidence |
|
||||
| D175 | **In-game stutter / brief hang during normal play** (user QA report): opening a door on Runway (`-level_35`, mission 3) and also observed on Surface. Self-recovered; no backtrace captured. Likely one of the known transient-hang classes (D155 catch-up spiral / D156 anim NaN loop / D134 task-done event / D147-D152 audio-lock steal) or a benign new-room texture-import frame spike on door open. See `GRAPHICS-BACKLOG.md` D175 for the gdb pattern-match sheet. | Observed, not investigated |
|
||||
| D176 | **Skybox broken on Surface** (user QA report; which of `-level_36`/`-level_43` unconfirmed). Symptom unspecified — missing/black sky, bad transform (D75 family), or sky-tile texture import. See `GRAPHICS-BACKLOG.md` D176. | Observed, not investigated |
|
||||
| D176 | **Surface exterior renders wrong (`-level_36`), two independent defects.** **(a)** sky solid black — env data is correct (`Clouds=1`, warm `CloudRGB`), the cloud-sky path runs, but `skyRenderTri`/`skyRenderFull` emit nothing → see "D176(a)" below, partial, not root-caused. **(b)** cliff/rock walls = grey diagonal static — NOT a texture decode bug (D183 disproved the shear hypothesis, 0/166 loads strided); re-scope from ROM ground truth of the wall texnum. See `GRAPHICS-BACKLOG.md` D176. | (a) partial / (b) open — both M-36 |
|
||||
| D177 | **Ladders don't work** (user QA report): climbing is non-functional and **blocks progression on some levels**. FUNCTIONAL bug, not cosmetic — ranks above the graphics backlog. Untested by every harness so far (level sweep is boot-only; no scripted ladder input). Suspects: player ladder state machine in `bondview2.c`/chr physics (struct-offset family D100/D140), or the climb input mapping (A-button hold?) not reaching the game on the PC input path. **Next:** repro on a level with a mandatory ladder, check whether the player's ladder state ever changes (probe) vs the input never registering (`GE_INPUTLOG`). | Observed, NOT investigated — high priority (progression blocker) |
|
||||
| D174 | **"No blood effect" (user QA report).** Likely the unverified D120 decal fix: `d43_emit.py` now emits the opcode-0x18 `PointUsage[]` chain, but it was never interactively verified and requires a full sidecar regen to take effect (`debug.ps1` does not regen). Spray path is D172 (draws, wrong colour) — total absence would be new. See `GRAPHICS-BACKLOG.md` D174. | Observed; first step = BUNKER1 firefight with regenerated sidecars |
|
||||
| D183 | **M-36 Family A ("texture line/pitch shear") is DISPROVEN for the Surface repro (`-level_36`).** The importers' pitch assumption is real but never fires there; the Surface cliff "grey static" is not a shear. Full evidence + what the walls actually are: §F "D183" below. A defensive, provably-no-op de-stride landed in `import_texture()` anyway (covers the `gfx_dp_load_tile` case the `SUPPORT_CHECK`s assert against), plus `GE_DTEX` STRIDED marker + `GE_TEXRAW` raw-source dump. | Hypothesis DISPROVEN + diagnostics shipped; D176(b)/D182(2) still OPEN |
|
||||
@@ -4588,6 +4588,56 @@ needs ROM ground truth for that texnum.
|
||||
|
||||
---
|
||||
|
||||
## D176(a) — Surface black sky: env data is correct, the cloud-sky emit renders nothing (M-36, partial)
|
||||
|
||||
Surface (`-level_36`) sky is solid **black** where the N64 shows a warm
|
||||
sunset cloud gradient. Headless `-level_36` + `GE_D176=1` probe
|
||||
(`src/game/bgfog.c` `fogLoadLevelEnvironment`, `src/game/sky.c` `skyRender`):
|
||||
|
||||
- **The environment data is right.** `fog_tables[]` matches `Id=36`,
|
||||
`sizeof(EnvironmentRecord)=92`, `Sky.Clouds=1`, `Sky.RGB=96,96,128`,
|
||||
`CloudRGB=240,120,30` (the warm sunset), `CloudRepeat(skyheight)=10000`,
|
||||
`SkyImageId=0`, `IsWater=0`. So this is **not** a serialized-struct
|
||||
byte-order bug like D178 — `fog_tables[]` is a compiled-in C initializer
|
||||
and every field reads sane.
|
||||
- **`skyRender` runs the cloud path** (not the `!Clouds` flat-fill early
|
||||
return). Corner probe: `eye=(-467.7, 374.2, -7190.5)`,
|
||||
`WaterConcavity=7.0`; the four screen-corner unproject rays come back
|
||||
`c0/c1.y ≈ +62` (`skyIsScreenCornerInSky` → TRUE) and `c2/c3.y ≈ -13.5`
|
||||
(→ FALSE). So the corner-classification switch value is
|
||||
`(1<<3)|(1<<2)|0|0 = 12` — the "top half of the screen is sky" case,
|
||||
which is correct for that camera.
|
||||
- **Nothing draws.** Case 12 → `s1=4`, the sky region is built from the
|
||||
edge-vertex path and handed to `sub_GAME_7F097388` (pure-C project +
|
||||
perspective divide → screen coords) then `skyRenderTri` / `skyRenderFull`
|
||||
with `texSelect(&skywaterimages[SkyImageId=0], …)` and a
|
||||
`SHADE,ENV,TEXEL0,ENV` combine. The output is pure black, not even the
|
||||
`env->Red/Green/Blue` (96,96,128) fill — so the sky polygons are either
|
||||
degenerate after projection, culled, or the `skywaterimages[0]` bind is
|
||||
failing in a way that kills the primitive.
|
||||
|
||||
**Not yet root-caused.** Next steps (needs ~1–2 h / a dedicated pass):
|
||||
1. Probe `sub_GAME_7F097388`'s output `unk28/unk2c` (screen x/y ×4 subpixel)
|
||||
for the 4 verts — are they on-screen and non-degenerate, or all clamped
|
||||
to one edge? That splits "projection math wrong" from "emit path wrong".
|
||||
2. Check `skywaterimages` (`src/game/image_bank.c:284`,
|
||||
`globalbank_rdram_offset + GIMG_OFF(s_skywaterimages)`, PC offset
|
||||
`0xFB4`) actually resolves to valid `sImageTableEntry` records on PC, and
|
||||
that entry `[0]` (the Surface sky texture) loads — a bad global-image-bank
|
||||
offset (D69/pccg family) would give `texSelect` a junk texture.
|
||||
3. fast3d-side: trace whether the sky tris reach `gfx_sp_tri` at all and
|
||||
with what verts/CC. `skyRenderTri` is a 500-line subdivided-tri emitter —
|
||||
a PC vtx/DL bug there is plausible (cf. D75 model-transform family).
|
||||
4. Cross-check another cloud-sky level (Dam `-level_33` exterior, Statue
|
||||
`-level_22`) — if they're also black it's the emit path; if only Surface,
|
||||
suspect that level's sky image / `skywaterimages[0]`.
|
||||
|
||||
`GE_D176=1` probe left in tree (`#ifdef PORT`, env-gated, inert):
|
||||
`src/game/bgfog.c` + `src/game/sky.c`. Separate from D176(b) (the tree/rock
|
||||
"grey static", Family A / a different investigation).
|
||||
|
||||
---
|
||||
|
||||
## D132 — D88 propDefs layout audit (M-20)
|
||||
|
||||
Static analysis only (no build, no game run). Goal: prove
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
#include "bondview.h"
|
||||
#include "bgfog.h"
|
||||
#include <limits.h>
|
||||
#ifdef PORT
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Address 0x800825C0.
|
||||
@@ -451,10 +455,24 @@ void fogLoadLevelEnvironment(s32 level_id, s32 arg1)
|
||||
|
||||
fogLoadCurrentEnvironment(g_EnvironmentFoundp);
|
||||
|
||||
#ifdef PORT
|
||||
if (getenv("GE_D176"))
|
||||
fprintf(stderr, "D176 fog: matched fog_tables Id=%d (level_id=%d np=%d) "
|
||||
"Sky.Clouds=%d Sky.RGB=%d,%d,%d sizeof(EnvironmentRecord)=%d\n",
|
||||
phi_v1->Id, level_id, num_players, phi_v1->Sky.Clouds,
|
||||
phi_v1->Sky.Red, phi_v1->Sky.Green, phi_v1->Sky.Blue,
|
||||
(int)sizeof(EnvironmentRecord));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PORT
|
||||
if (getenv("GE_D176"))
|
||||
fprintf(stderr, "D176 fog: NO fog_tables match for level_id=%d (np=%d) -> fogless fallback\n",
|
||||
level_id, num_players);
|
||||
#endif
|
||||
|
||||
if (1) // possibly if(level_id != 26) or another blanked printf
|
||||
{
|
||||
// removed
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include <memp.h>
|
||||
#ifdef PORT
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include "sky.h"
|
||||
#include "player.h"
|
||||
#include "unk_092E50.h"
|
||||
@@ -317,6 +321,18 @@ Gfx *skyRender(Gfx *gdl)
|
||||
sp430 = FALSE;
|
||||
env = fogGetCurrentEnvironmentp();
|
||||
|
||||
#ifdef PORT
|
||||
if (getenv("GE_D176")) {
|
||||
static int n = 0;
|
||||
if (n++ < 4)
|
||||
fprintf(stderr, "D176 sky: Clouds=%d RGB=%d,%d,%d SkyImageId=%d CloudRGB=%.1f,%.1f,%.1f "
|
||||
"CloudRepeat=%.2f players=%d IsWater=%d\n",
|
||||
env->Clouds, env->Red, env->Green, env->Blue, env->SkyImageId,
|
||||
(double)env->CloudRed, (double)env->CloudGreen, (double)env->CloudBlue,
|
||||
(double)env->CloudRepeat, getPlayerCount(), env->IsWater);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!fogGetCurrentEnvironmentp()->Clouds)
|
||||
{
|
||||
if (getPlayerCount() == 1)
|
||||
@@ -361,6 +377,24 @@ Gfx *skyRender(Gfx *gdl)
|
||||
sp530 = skyIsScreenCornerInSky(&sp68c, &sp62c, &sp584);
|
||||
sp52c = skyIsScreenCornerInSky(&sp680, &sp620, &sp580);
|
||||
|
||||
#ifdef PORT
|
||||
if (getenv("GE_D176")) {
|
||||
static int m = 0;
|
||||
if (m++ < 3) {
|
||||
coord3d *eye = bondviewGetCurrentPlayersPosition();
|
||||
fprintf(stderr, "D176 corners: WaterConcavity=%.3f eye=(%.1f,%.1f,%.1f)\n"
|
||||
" c0 ray=(%.3f,%.3f,%.3f) inSky=%d\n c1 ray=(%.3f,%.3f,%.3f) inSky=%d\n"
|
||||
" c2 ray=(%.3f,%.3f,%.3f) inSky=%d\n c3 ray=(%.3f,%.3f,%.3f) inSky=%d\n",
|
||||
(double)fogGetCurrentEnvironmentp()->WaterConcavity,
|
||||
(double)eye->x,(double)eye->y,(double)eye->z,
|
||||
(double)sp6a4.f[0],(double)sp6a4.f[1],(double)sp6a4.f[2], sp538,
|
||||
(double)sp698.f[0],(double)sp698.f[1],(double)sp698.f[2], sp534,
|
||||
(double)sp68c.f[0],(double)sp68c.f[1],(double)sp68c.f[2], sp530,
|
||||
(double)sp680.f[0],(double)sp680.f[1],(double)sp680.f[2], sp52c);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
skyIsCornerInWater(&sp6a4, &sp5e4, &sp56c);
|
||||
skyIsCornerInWater(&sp698, &sp5d8, &sp568);
|
||||
skyIsCornerInWater(&sp68c, &sp5cc, &sp564);
|
||||
|
||||
Reference in new issue
Block a user