Un-ignored: the dev drive is the ground truth the restoration and emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio content). Kept in-repo for the pod-owner community. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
155 lines
3.7 KiB
Scheme
155 lines
3.7 KiB
Scheme
--{{{ registers
|
|
// void safe_binitize ( int macro_lo, int macro_hi,
|
|
// float fminx, float fminy,
|
|
// float fmaxx, float fmaxy,
|
|
// int screen_bins_x )
|
|
//
|
|
//
|
|
// draw an unclipped pmesh....
|
|
//
|
|
// void draw_geom ( int *icoeff_pp,
|
|
// int *icoeff_basep,
|
|
// dpl_CONNECTION *connection,
|
|
// int draw_mode,
|
|
// int backwards,
|
|
// int opacity,
|
|
// float material )
|
|
|
|
#define iparam1 r16
|
|
#define iparam2 r17
|
|
#define iparam3 r18
|
|
#define iparam4 r19
|
|
#define iparam5 r20
|
|
#define iparam6 r21
|
|
|
|
#define rcoeff_pp r4
|
|
#define rcoeff_basep r5
|
|
#define connection r6
|
|
#define draw_mode r7
|
|
#define backwards r8
|
|
|
|
#define rcoeffptr r9
|
|
#define rcoeffbase r10
|
|
#define tri_coeffbase r11
|
|
|
|
#define rv1 r12
|
|
#define rv2 r13
|
|
#define rv3 r14
|
|
|
|
#define vert0_ref r15
|
|
#define vertex_ref r19
|
|
#define pvertex_ref r20
|
|
#define n_verts r21
|
|
#define opacity r22
|
|
|
|
#define egde_opcode backwards
|
|
|
|
#define itemp1 r25
|
|
#define itemp2 r26
|
|
#define itemp3 r27
|
|
#define itemp4 r29
|
|
#define itemp5 r30
|
|
|
|
//
|
|
// screen-space minimax for binitizing
|
|
//
|
|
#define fparam1 f8
|
|
#define fparam2 f9
|
|
#define fparam3 f10
|
|
#define fparam4 f11
|
|
|
|
#define fminx f8
|
|
#define fminy f9
|
|
#define fmaxx f10
|
|
#define fmaxy f11
|
|
|
|
#define ftexscale f2
|
|
#define fmaterial f3
|
|
|
|
// x, y coords for tris/quads
|
|
|
|
#define fx0 f4
|
|
#define fy0 f5
|
|
#define fx1 f6
|
|
#define fy1 f7
|
|
#define fx2 f12
|
|
#define fy2 f13
|
|
#define fdx1 f14
|
|
#define fdy1 f15
|
|
#define fdx2 f16
|
|
#define fdy2 f17
|
|
|
|
#define fr0 f18
|
|
#define fg0 f19
|
|
#define fb0 f20
|
|
#define fminz f21
|
|
|
|
#define fr1 f22
|
|
#define fg1 f23
|
|
#define fb1 f24
|
|
#define fC f25
|
|
|
|
#define fr2 f26
|
|
#define fg2 f27
|
|
#define fb2 f28
|
|
|
|
#define fA f29
|
|
#define fB f30
|
|
#define ftmp f31
|
|
|
|
--}}}
|
|
--{{{ declare offsets in VERTEX structure
|
|
|
|
//
|
|
// Note new placement of next field - ensures double-alignment of
|
|
// position, normal and texcoords
|
|
//
|
|
// typedef struct s_rvert {
|
|
// 0 dpl_POINT position;
|
|
// 16 dpl_POINT normcol;
|
|
// 32 float32 texcoords [3];
|
|
// 44 struct s_rvert *next;
|
|
// 48 dpl_POINT xform_posn;
|
|
// 64 float32 rendered_color[3];
|
|
// int32 touched;
|
|
// 80 } dpl_REMOTE_VERTEX;
|
|
//
|
|
// typedef struct s_conn {
|
|
// 0 struct s_conn *next;
|
|
// 4 int32 n_verts;
|
|
// 8 dpl_REMOTE_VERTEX* indices[6];
|
|
// 32 dpl_POINT planeEqn;
|
|
// 48 float32 rendered_color[3];
|
|
// 60 int32 touched;
|
|
// } dpl_REMOTE_CONNECTION;
|
|
|
|
|
|
#define VERT_position_offs 48
|
|
#define VERT_normal_offs 64
|
|
#define VERT_tex_offs 32
|
|
#define VERT_size 80
|
|
|
|
#define VERT_x_offs ((VERT_position_offs) + 0)
|
|
#define VERT_y_offs ((VERT_position_offs) + 4)
|
|
#define VERT_z_offs ((VERT_position_offs) + 8)
|
|
#define VERT_w_offs ((VERT_position_offs) + 12)
|
|
|
|
#define VERT_r_offs (VERT_normal_offs)
|
|
#define VERT_g_offs ((VERT_normal_offs)+4)
|
|
#define VERT_b_offs ((VERT_normal_offs)+8)
|
|
|
|
#define VERT_tex_u_offs ((VERT_tex_offs)+0)
|
|
#define VERT_tex_v_offs ((VERT_tex_offs)+4)
|
|
#define VERT_a_offs ((VERT_tex_offs)+8)
|
|
|
|
#define FACET_next_offs 0
|
|
#define FACET_nverts_offs 4
|
|
#define FACET_vert0_offs 8
|
|
#define FACET_plane_offs 32
|
|
#define FACET_r_offs 48
|
|
#define FACET_g_offs (48+4)
|
|
#define FACET_b_offs (48+8)
|
|
#define FACET_touched_offs 60
|
|
|
|
--}}}
|