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

Function ObjInitCamera

Descent3/ObjInit.cpp:898–913  ·  view source on GitHub ↗

Initialize a camera Returns 1 if ok, 0 if error

Source from the content-addressed store, hash-verified

896// Initialize a camera
897// Returns 1 if ok, 0 if error
898int ObjInitCamera(object *objp) {
899 // Set size & shields
900 objp->size = 0.5;
901 objp->shields = 0;
902 // Set up various info
903 SetObjectControlType(objp, CT_NONE);
904 objp->movement_type = MT_NONE;
905 objp->lm_object.used = 0;
906#ifdef EDITOR
907 objp->render_type = RT_EDITOR_SPHERE; // draw cameras as spheres in the editor
908 objp->rtype.sphere_color = GR_RGB(255, 255, 0);
909#else
910 objp->render_type = RT_NONE;
911#endif
912 return 1;
913}
914// Initialize a sound object
915// Returns 1 if ok, 0 if error
916int ObjInitSoundSource(object *objp) {

Callers 1

ObjInitTypeSpecificFunction · 0.85

Calls 2

SetObjectControlTypeFunction · 0.85
GR_RGBFunction · 0.50

Tested by

no test coverage detected