MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / TCAMCallback

Function TCAMCallback

Descent3/TelComAutoMap.cpp:787–837  ·  view source on GitHub ↗

The callback function that the telcom calls every frame

Source from the content-addressed store, hash-verified

785
786// The callback function that the telcom calls every frame
787void TCAMCallback(void) {
788 StartFrame(Telcom_system.Monitor_coords[MONITOR_MAIN].left, Telcom_system.Monitor_coords[MONITOR_MAIN].top,
789 Telcom_system.Monitor_coords[MONITOR_MAIN].right, Telcom_system.Monitor_coords[MONITOR_MAIN].bottom);
790
791 // Start a 3d frame
792 g3_StartFrame(&AM_view_pos, &AM_view_orient, Render_zoom);
793
794 if (AM_center_on_player) {
795 TCAMCenterOnPlayer();
796 AM_center_on_player = 0;
797 }
798
799 if (AM_realign) {
800 AM_pitch = 0;
801 AM_realign = 0;
802 }
803
804 rend_SetFiltering(1);
805 rend_SetAlphaType(AT_VERTEX);
806 rend_SetTextureType(TT_FLAT);
807 rend_SetLighting(LS_GOURAUD);
808 rend_SetColorModel(CM_RGB);
809 rend_SetOverlayType(OT_NONE);
810 rend_SetZBufferState(1);
811
812 if (AM_terrain)
813 rend_SetZValues(0, VisibleTerrainZ);
814
815 TCAMBuildRoomList(Viewer_object->roomnum);
816 // Render all rooms in view
817 for (int i = 0; i < Num_AM_rooms; i++) {
818 TCAMRenderRoom(AM_room_list[i]);
819 }
820
821 // Render terrain
822 if (AM_terrain)
823 TCAMRenderTerrain();
824
825 g3_EndFrame();
826
827 rend_SetFiltering(1);
828
829 TCAMDrawObjects();
830 EndFrame();
831
832 rend_SetFiltering(0);
833
834 TCAMDrawMenu();
835
836 TCAMReadControls();
837}

Callers

nothing calls this directly

Calls 15

StartFrameFunction · 0.85
g3_StartFrameFunction · 0.85
TCAMCenterOnPlayerFunction · 0.85
TCAMBuildRoomListFunction · 0.85
TCAMRenderRoomFunction · 0.85
TCAMRenderTerrainFunction · 0.85
g3_EndFrameFunction · 0.85
TCAMDrawObjectsFunction · 0.85
EndFrameFunction · 0.85
TCAMDrawMenuFunction · 0.85
TCAMReadControlsFunction · 0.85
rend_SetFilteringFunction · 0.50

Tested by

no test coverage detected