mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-24 00:02:45 +02:00
D303: model converter copied 1/4 of each star muzzle flash's vertices
The op-22 DisplayListPrimaryRecord count is the number of star-flash arms; dorottex (and PD's modelRenderNodeStarGunfire) read count*4 vertices. d43_emit/d43_convert sized the array as count vertices, so 3/4 of every muzzle star came from neighbouring sidecar bytes and drew as long spikes (M16 "shooting up"). Size it 16*4*count. Emitter round-trip checks all pass; M16 renders a clean star headless. Also TEMP GE_STARTWEAPON (bondview_r.c) for weapon repros. Re-run tools_pc/d43_emit.py to regenerate data/pcmodels-*.
This commit is contained in:
1 parent
00b0006971
commit
d061ca3d12
7 files changed
+45
-4
No files matched your search
@@ -154,9 +154,10 @@ for r in rows:
|
||||
if nv and puo:
|
||||
dstpos = add_region(puo, 2*nv, dstpos) # PointUsage s16 x numVertices
|
||||
elif op == 22:
|
||||
# D303: op-22 count = star-flash arms; 4 vertices each (see d43_emit).
|
||||
nv = struct.unpack_from(">i", src, data)[0]; vo = be32o(src, data+4)
|
||||
if nv and vo:
|
||||
vtx_regions.append((vo, nv)); dstpos = add_region(vo, 16*nv, dstpos)
|
||||
vtx_regions.append((vo, 4*nv)); dstpos = add_region(vo, 16*4*nv, dstpos)
|
||||
|
||||
# zero-count vertex arrays: size up to the next higher object offset
|
||||
obj_offs_now = sorted(set([no for no,_ in nodes]) | set(rec_newoff.keys()) |
|
||||
|
||||
@@ -343,9 +343,14 @@ def process(name):
|
||||
dstpos = add_region(puo, 2 * nv, dstpos)
|
||||
op24_pointusage[puo] = nv
|
||||
elif op == 22:
|
||||
# D303 (M-201): the op-22 count is the number of star-flash ARMS
|
||||
# (quads), not vertices -- dorottex (model.c) and PD's
|
||||
# modelRenderNodeStarGunfire read count*4 vertices. Sizing this as
|
||||
# 16*nv copied only the first quarter, so the rest of each muzzle
|
||||
# star rendered from neighbouring bytes (long spikes, M16 etc.).
|
||||
nv = struct.unpack_from(">i", src, data)[0]; vo = be32o(src, data + 4)
|
||||
if nv and vo:
|
||||
vtx_regions.append((vo, nv)); dstpos = add_region(vo, 16 * nv, dstpos)
|
||||
vtx_regions.append((vo, 4 * nv)); dstpos = add_region(vo, 16 * 4 * nv, dstpos)
|
||||
|
||||
# All record-referenced GDLs (needed before zero-vtx/blob layout so the
|
||||
# "next object" boundaries include them).
|
||||
|
||||
Reference in new issue
Block a user