Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
MeshDrawState Struct Reference

A Mesh's drawing state while its drawer (FIGHTSTG_drawMesh) walks its command bytes: a high nibble of 8 to 14 sets one of the flags, a low nibble of 1 the texture page and CLUT, 2 to 5 one of the flat colors, and 0 starts a run of polygons, each a 0 byte then its vertices' indices, its normals' indices when lit and its UVs when textured. More...

#include <battle/battle_mode/model.h>

Collaboration diagram for MeshDrawState:
[legend]

Data Fields

s32 textured
 
s32 unk4
 the 0xB nibble: on the disc, 1 on the textured polygons that are not lit and 0 on those that are; nothing reads it
 
s32 unk8
 the 0xA nibble: on the disc, 0 but in two effect meshes; nothing reads it
 
s32 quad
 
s32 lit
 
s32 gouraud
 
s32 abr
 the semi-transparency mode + 1, 0 for opaque
 
u8 * cmd
 
s32 * screen
 
s32 * depth
 
u_long * otBase
 
CVECTOR * normalColors
 
Vec2 texPos
 
s32 u
 
s32 v
 
u16 tpage
 
u16 clut
 
CVECTOR color [4]
 
union { 
 
   void *   ptr 
 
   u_long *   tag 
 the primitive's first word More...
 
   POLY_FT3 *   ft3 
 
   POLY_FT4 *   ft4 
 
   POLY_GT3 *   gt3 
 
   POLY_GT4 *   gt4 
 
   LINE_F2 *   lineF2 
 
   LINE_F4 *   lineF4 
 
} prim 
 
s32 sxy [4]
 the polygon's screen points
 
u_long * ot
 
u8 uv [4][2]
 
CVECTOR colors [4]
 the polygon's vertex colors
 

Detailed Description

A Mesh's drawing state while its drawer (FIGHTSTG_drawMesh) walks its command bytes: a high nibble of 8 to 14 sets one of the flags, a low nibble of 1 the texture page and CLUT, 2 to 5 one of the flat colors, and 0 starts a run of polygons, each a 0 byte then its vertices' indices, its normals' indices when lit and its UVs when textured.

0xFF ends the commands.

Definition at line 45 of file model.h.

Field Documentation

◆ textured

s32 MeshDrawState::textured

Definition at line 46 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ unk4

s32 MeshDrawState::unk4

the 0xB nibble: on the disc, 1 on the textured polygons that are not lit and 0 on those that are; nothing reads it

Definition at line 47 of file model.h.

Referenced by FIGHTSTG_drawMesh().

◆ unk8

s32 MeshDrawState::unk8

the 0xA nibble: on the disc, 0 but in two effect meshes; nothing reads it

Definition at line 48 of file model.h.

Referenced by FIGHTSTG_drawMesh().

◆ quad

◆ lit

s32 MeshDrawState::lit

Definition at line 50 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ gouraud

s32 MeshDrawState::gouraud

Definition at line 51 of file model.h.

Referenced by drawMeshPolygons(), and FIGHTSTG_drawMesh().

◆ abr

s32 MeshDrawState::abr

the semi-transparency mode + 1, 0 for opaque

Definition at line 52 of file model.h.

Referenced by FIGHTSTG_addMeshPolyFT(), FIGHTSTG_addMeshPolyGT(), FIGHTSTG_drawMesh(), and setMeshTexture().

◆ cmd

u8* MeshDrawState::cmd

◆ screen

s32* MeshDrawState::screen

Definition at line 54 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ depth

s32* MeshDrawState::depth

Definition at line 55 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ otBase

u_long* MeshDrawState::otBase

Definition at line 56 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ normalColors

CVECTOR* MeshDrawState::normalColors

Definition at line 57 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ texPos

Vec2 MeshDrawState::texPos

Definition at line 58 of file model.h.

Referenced by FIGHTSTG_drawMesh(), FIGHTSTG_drawMeshWireframe(), and setMeshTexture().

◆ u

s32 MeshDrawState::u

Definition at line 59 of file model.h.

Referenced by drawMeshPolygons(), and setMeshTexture().

◆ v

s32 MeshDrawState::v

Definition at line 60 of file model.h.

Referenced by drawMeshPolygons(), and setMeshTexture().

◆ tpage

u16 MeshDrawState::tpage

Definition at line 61 of file model.h.

Referenced by FIGHTSTG_addMeshPolyFT(), FIGHTSTG_addMeshPolyGT(), and setMeshTexture().

◆ clut

u16 MeshDrawState::clut

Definition at line 62 of file model.h.

Referenced by FIGHTSTG_addMeshPolyFT(), FIGHTSTG_addMeshPolyGT(), and setMeshTexture().

◆ color

CVECTOR MeshDrawState::color[4]

Definition at line 63 of file model.h.

Referenced by drawMeshPolygons(), and FIGHTSTG_drawMesh().

◆ ptr

void* MeshDrawState::ptr

Definition at line 65 of file model.h.

Referenced by FIGHTSTG_drawMesh(), and FIGHTSTG_drawMeshWireframe().

◆ tag

u_long* MeshDrawState::tag

the primitive's first word

Definition at line 66 of file model.h.

Referenced by FIGHTSTG_drawMeshWireframe().

◆ ft3

POLY_FT3* MeshDrawState::ft3

Definition at line 67 of file model.h.

Referenced by FIGHTSTG_addMeshPolyFT().

◆ ft4

POLY_FT4* MeshDrawState::ft4

Definition at line 68 of file model.h.

Referenced by FIGHTSTG_addMeshPolyFT().

◆ gt3

POLY_GT3* MeshDrawState::gt3

Definition at line 69 of file model.h.

Referenced by FIGHTSTG_addMeshPolyGT().

◆ gt4

POLY_GT4* MeshDrawState::gt4

Definition at line 70 of file model.h.

Referenced by FIGHTSTG_addMeshPolyGT().

◆ lineF2

LINE_F2* MeshDrawState::lineF2

Definition at line 71 of file model.h.

Referenced by FIGHTSTG_drawMeshWireframe().

◆ lineF4

LINE_F4* MeshDrawState::lineF4

Definition at line 72 of file model.h.

Referenced by FIGHTSTG_drawMeshWireframe().

◆ [union]

◆ sxy

s32 MeshDrawState::sxy[4]

the polygon's screen points

Definition at line 74 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_addMeshPolyFT(), FIGHTSTG_addMeshPolyGT(), and FIGHTSTG_drawMeshWireframe().

◆ ot

u_long* MeshDrawState::ot

◆ uv

u8 MeshDrawState::uv[4][2]

Definition at line 76 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_addMeshPolyFT(), and FIGHTSTG_addMeshPolyGT().

◆ colors

CVECTOR MeshDrawState::colors[4]

the polygon's vertex colors

Definition at line 77 of file model.h.

Referenced by drawMeshPolygons(), FIGHTSTG_addMeshPolyFT(), and FIGHTSTG_addMeshPolyGT().


The documentation for this struct was generated from the following file: