57 guLookAtReflectF(cam->
mtxViewPlayer, &
gDisplayContext->
lookAt, cam->
lookAt_eye.
x, cam->
lookAt_eye.
y, cam->
lookAt_eye.
z, cam->
lookAt_obj.
x, cam->
lookAt_obj.
y, cam->
lookAt_obj.
z, 0, 1.0f, 0);
111 for (camID = firstCamID; camID < lastCamID; camID++) {
129 gSPClearGeometryMode(
gMainGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
130 G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
131 gSPTexture(
gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
166 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
173 gDPSetCombineMode(
gMainGfxPos++, G_CC_SHADE, G_CC_SHADE);
176 gDPSetRenderMode(
gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
208 if (!dx_debug_should_hide_models()) {
227 dx_debug_draw_collision();
235 G_MTX_LOAD | G_MTX_PROJECTION);
274 camDataPtr->
vfov = 50;
285 camDataPtr->
vfov = 50;
296 camDataPtr->
vfov = 50;
307 camDataPtr->
vfov = 50;
318 if (camera->
flags == 0) {
343 camera->
params.world.zoomPercent = 100;
381 camera->
vp.vp.vscale[0] = 2.0f * camera->
viewportW;
382 camera->
vp.vp.vscale[1] = 2.0f * camera->
viewportH;
383 camera->
vp.vp.vscale[2] = 0x1FF;
384 camera->
vp.vp.vscale[3] = 0;
388 camera->
vp.vp.vtrans[1] = 4 * camera->
vp.vp.vtrans[1];
389 camera->
vp.vp.vtrans[2] = 0x1FF;
390 camera->
vp.vp.vtrans[3] = 0;
394 camera->
vpAlt.vp.vscale[2] = 0x1FF;
395 camera->
vpAlt.vp.vscale[3] = 0;
399 camera->
vpAlt.vp.vtrans[2] = 0x200;
400 camera->
vpAlt.vp.vtrans[3] = 0;
410void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ) {
419 *screenZ = tZ + 5000.0f;
422 }
else if (*screenZ > 10000) {
426 if (tW < 0.01 && tW > -0.01) {
444 }
else if (x > endX) {
446 }
else if (y < startY) {
448 }
else if (y > endY) {
void create_cameras(void)
void get_cam_viewport(s32 camID, u16 *x, u16 *y, u16 *width, u16 *height)
b32 is_outside_cam_viewport_bounds(s32 camID, s32 x, s32 y)
void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32 *screenX, s32 *screenY, s32 *screenZ)
void get_cam_viewport_bounds(s32 camID, s32 *x, s32 *y, s32 *width, s32 *height)
void execute_render_tasks(void)
void render_frame(s32 isSecondPass)
void update_cameras(void)
Camera * initialize_next_camera(CameraInitData *initData)
DisplayContext * gDisplayContext
void render_item_entities(void)
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height)
void update_camera_zone_interp(Camera *camera)
void update_camera_no_interp(Camera *)
void update_camera_unused_radial(Camera *)
void create_camera_leadplayer_matrix(Camera *)
void update_camera_unused_confined(Camera *)
void update_camera_unused_leading(Camera *)
void update_camera_minimal(Camera *)
void update_camera_interp_pos(Camera *)
#define ASSERT(condition)
@ CAMERA_FLAG_RENDER_MODELS
@ CAMERA_FLAG_LEAD_PLAYER
@ CAMERA_FLAG_RENDER_ENTITIES
@ CAMERA_FLAG_INITIALIZED
@ CAM_UPDATE_UNUSED_RADIAL
@ CAM_UPDATE_UNUSED_CONFINED
@ CAM_UPDATE_UNUSED_LEADING
void render_entities(void)
void render_effects_world(void)
void render_workers_world(void)
void mdl_update_transform_matrices(void)
void render_transformed_hud_elements(void)
void render_npcs(void)
Renders all NPCs.
#define GFX_PROFILER_SWITCH(complete, begin)
@ PROFILER_TIME_SUB_GFX_HUD_ELEMENTS
@ PROFILER_TIME_SUB_GFX_ENTITIES
@ PROFILER_TIME_SUB_GFX_WORKERS
@ PROFILER_TIME_SUB_GFX_PLAYER
@ PROFILER_TIME_SUB_GFX_EFFECTS
@ PROFILER_TIME_SUB_GFX_MODELS
@ PROFILER_TIME_SUB_GFX_RENDER_TASKS
@ PROFILER_TIME_SUB_GFX_NPCS
#define GFX_PROFILER_COMPLETE(which)
#define GFX_PROFILER_START(which)
b32 needsInitialConstrainDir
CameraControlSettings * prevLeadSettings
void(* fpDoPreRender)(struct Camera *)
void(* fpDoPostRender)(struct Camera *)
GameStatus * gGameStatusPtr