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

Function ObjInitSoundSource

Descent3/ObjInit.cpp:916–931  ·  view source on GitHub ↗

Initialize a sound object Returns 1 if ok, 0 if error

Source from the content-addressed store, hash-verified

914// Initialize a sound object
915// Returns 1 if ok, 0 if error
916int ObjInitSoundSource(object *objp) {
917 // Set size & shields
918 objp->size = 0.5;
919 objp->shields = 0;
920 // Set up various info
921 SetObjectControlType(objp, CT_SOUNDSOURCE);
922 objp->movement_type = MT_NONE;
923 objp->lm_object.used = 0;
924#ifdef EDITOR
925 objp->render_type = RT_EDITOR_SPHERE; // draw cameras as spheres in the editor
926 objp->rtype.sphere_color = GR_RGB(0, 255, 0);
927#else
928 objp->render_type = RT_NONE;
929#endif
930 return 1;
931}
932// Initialize a waypoint object
933// Returns 1 if ok, 0 if error
934int ObjInitWaypoint(object *objp) {

Callers 1

ObjInitTypeSpecificFunction · 0.85

Calls 2

SetObjectControlTypeFunction · 0.85
GR_RGBFunction · 0.50

Tested by

no test coverage detected