The grid of the cells of the track the view frustum covers, which decides what is drawn.
More...
Go to the source code of this file.
The grid of the cells of the track the view frustum covers, which decides what is drawn.
◆ VISIBLE_GRID_SIZE
| #define VISIBLE_GRID_SIZE 64 |
The cells along each side of the grid.
◆ FRUSTUM_POINTS
The number of points of the frustum.
◆ FRUSTUM_CAMERA
◆ FRUSTUM_RIGHT_TOP
| #define FRUSTUM_RIGHT_TOP 1 |
The far corner at the top right.
◆ FRUSTUM_LEFT_TOP
| #define FRUSTUM_LEFT_TOP 2 |
The far corner at the top left.
◆ FRUSTUM_LEFT_BOTTOM
| #define FRUSTUM_LEFT_BOTTOM 3 |
The far corner at the bottom left.
◆ FRUSTUM_RIGHT_BOTTOM
| #define FRUSTUM_RIGHT_BOTTOM 4 |
The far corner at the bottom right.
◆ FRUSTUM_FAR
The centre of the far plane.
◆ MarkVisibleCell()
| void MarkVisibleCell |
( |
s32 | col, |
|
|
s32 | row ) |
Widen the covered columns of a row to take in a cell, clamped to the grid.
- Parameters
-
| col | The column of the cell. |
| row | The row of the cell. |
- Ghidra address:
- USA: 0x8022d090
- Ghidra address:
- Asia: 0x8022CBE0
- Ghidra address:
- EUR: 0x8022e5a0
- Ghidra address:
- JPN: 0x8022dd50
- Ghidra address:
- BRD3D: 0x1003a660
- Ghidra address:
- BRGlide: 0x10033ce0
◆ MarkVisibleEdge()
Mark the cells a line between two points of the track passes through.
- Parameters
-
| x0 | The X coordinate of the first point. |
| y0 | The Y coordinate of the first point. |
| x1 | The X coordinate of the second point. |
| y1 | The Y coordinate of the second point. |
- Ghidra address:
- USA: 0x8022d104
- Ghidra address:
- Asia: 0x8022CC54
- Ghidra address:
- EUR: 0x8022e614
- Ghidra address:
- JPN: 0x8022ddc4
- Ghidra address:
- BRD3D: 0x1003a6b0
- Ghidra address:
- BRGlide: 0x10033d30
◆ IsCellVisible()
Whether a cell is covered.
- Parameters
-
| col | The column of the cell. |
| row | The row of the cell. |
- Returns
- Non-zero when the cell is covered.
- Ghidra address:
- USA: 0x8022d3d4
- Ghidra address:
- Asia: 0x8022CF24
- Ghidra address:
- EUR: 0x8022e8e4
- Ghidra address:
- JPN: 0x8022e094
- Ghidra address:
- BRD3D: 0x1003a910
- Ghidra address:
- BRGlide: 0x10033f90
◆ IsPointVisible()
Whether the cell under a point of the track is covered.
- Parameters
-
| x | The X coordinate of the point. |
| y | The Y coordinate of the point. |
- Returns
- Non-zero when the cell is covered.
- Ghidra address:
- USA: 0x8022d43c
- Ghidra address:
- Asia: 0x8022CF8C
- Ghidra address:
- EUR: 0x8022e94c
- Ghidra address:
- JPN: 0x8022e0fc
- Ghidra address:
- BRD3D: 0x1003a950
- Ghidra address:
- BRGlide: 0x10033fd0
◆ BuildVisibleGrid()
| void BuildVisibleGrid |
( |
void | | ) |
|
Build the grid from the edges of the view frustum.
- Ghidra address:
- USA: 0x8022d49c
- Ghidra address:
- Asia: 0x8022CFEC
- Ghidra address:
- EUR: 0x8022e9ac
- Ghidra address:
- JPN: 0x8022e15c
- Ghidra address:
- BRD3D: 0x1003a990
- Ghidra address:
- BRGlide: 0x10034010
◆ g_avFrustumPoints
The camera and five far-plane points of the view frustum.
- Ghidra address:
- USA: 0x8031b1f0
- Ghidra address:
- Asia: 0x8031ACA0
- Ghidra address:
- EUR: 0x8031d6f0
- Ghidra address:
- JPN: 0x8031c320
- Ghidra address:
- BRD3D: 0x106c3310
- Ghidra address:
- BRGlide: 0x106ea3a0
◆ g_dwVisibleGridMinCol
| s32 g_dwVisibleGridMinCol |
|
extern |
The bounds of the covered cells.
- Ghidra address:
- USA: 0x8028bd90
- Ghidra address:
- Asia: 0x8028B8E0
- Ghidra address:
- EUR: 0x8028e4f0
- Ghidra address:
- JPN: 0x8028df20
- Ghidra address:
- BRD3D: 0x10a9bbc8
- Ghidra address:
- BRGlide: 0x10ac2c58
◆ g_dwVisibleGridMinRow
| s32 g_dwVisibleGridMinRow |
|
extern |
The first row of the cells covered by the view frustum.
- Ghidra address:
- USA: 0x8028bd94
- Ghidra address:
- Asia: 0x8028B8E4
- Ghidra address:
- EUR: 0x8028e4f4
- Ghidra address:
- JPN: 0x8028df24
- Ghidra address:
- BRD3D: 0x10a9bbcc
- Ghidra address:
- BRGlide: 0x10ac2c5c
◆ g_dwVisibleGridMaxCol
| s32 g_dwVisibleGridMaxCol |
|
extern |
The last column of the cells covered by the view frustum.
- Ghidra address:
- USA: 0x8028bd98
- Ghidra address:
- Asia: 0x8028B8E8
- Ghidra address:
- EUR: 0x8028e4f8
- Ghidra address:
- JPN: 0x8028df28
- Ghidra address:
- BRD3D: 0x10a9bbc0
- Ghidra address:
- BRGlide: 0x10ac2c50
◆ g_dwVisibleGridMaxRow
| s32 g_dwVisibleGridMaxRow |
|
extern |
The last row of the cells covered by the view frustum.
- Ghidra address:
- USA: 0x8028bd9c
- Ghidra address:
- Asia: 0x8028B8EC
- Ghidra address:
- EUR: 0x8028e4fc
- Ghidra address:
- JPN: 0x8028df2c
- Ghidra address:
- BRD3D: 0x10a9bbc4
- Ghidra address:
- BRGlide: 0x10ac2c54
◆ g_adwVisibleGridRowMinCol
The first covered column of each row.
- Ghidra address:
- USA: 0x8034e5b0
- Ghidra address:
- Asia: 0x8034E060
- Ghidra address:
- EUR: 0x80350ab0
- Ghidra address:
- JPN: 0x8034eb30
- Ghidra address:
- BRD3D: 0x10a9bbd0
- Ghidra address:
- BRGlide: 0x10ac2c60
◆ g_adwVisibleGridRowMaxCol
The last covered column of each row.
- Ghidra address:
- USA: 0x8034e6b0
- Ghidra address:
- Asia: 0x8034E160
- Ghidra address:
- EUR: 0x80350bb0
- Ghidra address:
- JPN: 0x8034ec30
- Ghidra address:
- BRD3D: 0x10a9bcd0
- Ghidra address:
- BRGlide: 0x10ac2d60
◆ g_adwVisibleGridColMinRow
The first covered row of each column.
- Ghidra address:
- USA: 0x8034e7b0
- Ghidra address:
- Asia: 0x8034E260
- Ghidra address:
- EUR: 0x80350cb0
- Ghidra address:
- JPN: 0x8034ed30
- Ghidra address:
- BRD3D: 0x10a9bdd0
- Ghidra address:
- BRGlide: 0x10ac2e60
◆ g_adwVisibleGridColMaxRow
The last covered row of each column.
- Ghidra address:
- USA: 0x8034e8b0
- Ghidra address:
- Asia: 0x8034E360
- Ghidra address:
- EUR: 0x80350db0
- Ghidra address:
- JPN: 0x8034ee30
- Ghidra address:
- BRD3D: 0x10a9bed0
- Ghidra address:
- BRGlide: 0x10ac2f60