1 /*  NAME:
2         QD3DLight.c
3 
4     DESCRIPTION:
5         Entry point for Quesa API calls. Performs parameter checking and
6         then forwards each API call to the equivalent E3xxxxx routine.
7 
8     COPYRIGHT:
9         Copyright (c) 1999-2005, Quesa Developers. All rights reserved.
10 
11         For the current release of Quesa, please see:
12 
13             <http://www.quesa.org/>
14 
15         Redistribution and use in source and binary forms, with or without
16         modification, are permitted provided that the following conditions
17         are met:
18 
19             o Redistributions of source code must retain the above copyright
20               notice, this list of conditions and the following disclaimer.
21 
22             o Redistributions in binary form must reproduce the above
23               copyright notice, this list of conditions and the following
24               disclaimer in the documentation and/or other materials provided
25               with the distribution.
26 
27             o Neither the name of Quesa nor the names of its contributors
28               may be used to endorse or promote products derived from this
29               software without specific prior written permission.
30 
31         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32         "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33         LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34         A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35         OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
37         TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
38         PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39         LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40         NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41         SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42     ___________________________________________________________________________
43 */
44 //=============================================================================
45 //      Include files
46 //-----------------------------------------------------------------------------
47 #include "E3Prefix.h"
48 #include "E3Light.h"
49 
50 
51 
52 
53 
54 //=============================================================================
55 //      Internal constants
56 //-----------------------------------------------------------------------------
57 // Internal constants go here
58 
59 
60 
61 
62 
63 //=============================================================================
64 //      Internal types
65 //-----------------------------------------------------------------------------
66 // Internal types go here
67 
68 
69 
70 
71 
72 //=============================================================================
73 //      Internal macros
74 //-----------------------------------------------------------------------------
75 // Internal macros go here
76 
77 
78 
79 
80 
81 //=============================================================================
82 //      Public functions
83 //-----------------------------------------------------------------------------
84 //      Q3Light_GetType : Quesa API entry point.
85 //-----------------------------------------------------------------------------
86 #pragma mark -
87 TQ3ObjectType
Q3Light_GetType(TQ3LightObject light)88 Q3Light_GetType(TQ3LightObject light)
89 {
90 
91 
92 	// Release build checks
93 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3ObjectTypeInvalid);
94 
95 
96 
97 	// Debug build checks
98 #if Q3_DEBUG
99 	if (0) // Further checks on light
100 		return(kQ3ObjectTypeInvalid);
101 #endif
102 
103 
104 
105 	// Call the bottleneck
106 	E3System_Bottleneck();
107 
108 
109 
110 	// Call our implementation
111 	return(E3Light_GetType(light));
112 }
113 
114 
115 
116 
117 
118 //=============================================================================
119 //      Q3Light_GetState : Quesa API entry point.
120 //-----------------------------------------------------------------------------
121 TQ3Status
Q3Light_GetState(TQ3LightObject light,TQ3Boolean * isOn)122 Q3Light_GetState(TQ3LightObject light, TQ3Boolean *isOn)
123 {
124 
125 
126 	// Release build checks
127 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
128 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(isOn), kQ3Failure);
129 
130 
131 
132 	// Debug build checks
133 #if Q3_DEBUG
134 	if (0) // Further checks on light
135 		return(kQ3Failure);
136 
137 	if (0) // Further checks on isOn
138 		return(kQ3Failure);
139 #endif
140 
141 
142 
143 	// Call the bottleneck
144 	E3System_Bottleneck();
145 
146 
147 
148 	// Call our implementation
149 	return(E3Light_GetState(light, isOn));
150 }
151 
152 
153 
154 
155 
156 //=============================================================================
157 //      Q3Light_GetBrightness : Quesa API entry point.
158 //-----------------------------------------------------------------------------
159 TQ3Status
Q3Light_GetBrightness(TQ3LightObject light,float * brightness)160 Q3Light_GetBrightness(TQ3LightObject light, float *brightness)
161 {
162 
163 
164 	// Release build checks
165 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
166 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(brightness), kQ3Failure);
167 
168 
169 
170 	// Debug build checks
171 #if Q3_DEBUG
172 	if (0) // Further checks on light
173 		return(kQ3Failure);
174 
175 	if (0) // Further checks on brightness
176 		return(kQ3Failure);
177 #endif
178 
179 
180 
181 	// Call the bottleneck
182 	E3System_Bottleneck();
183 
184 
185 
186 	// Call our implementation
187 	return(E3Light_GetBrightness(light, brightness));
188 }
189 
190 
191 
192 
193 
194 //=============================================================================
195 //      Q3Light_GetColor : Quesa API entry point.
196 //-----------------------------------------------------------------------------
197 TQ3Status
Q3Light_GetColor(TQ3LightObject light,TQ3ColorRGB * color)198 Q3Light_GetColor(TQ3LightObject light, TQ3ColorRGB *color)
199 {
200 
201 
202 	// Release build checks
203 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
204 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(color), kQ3Failure);
205 
206 
207 
208 	// Debug build checks
209 #if Q3_DEBUG
210 	if (0) // Further checks on light
211 		return(kQ3Failure);
212 
213 	if (0) // Further checks on color
214 		return(kQ3Failure);
215 #endif
216 
217 
218 
219 	// Call the bottleneck
220 	E3System_Bottleneck();
221 
222 
223 
224 	// Call our implementation
225 	return(E3Light_GetColor(light, color));
226 }
227 
228 
229 
230 
231 
232 //=============================================================================
233 //      Q3Light_SetState : Quesa API entry point.
234 //-----------------------------------------------------------------------------
235 TQ3Status
Q3Light_SetState(TQ3LightObject light,TQ3Boolean isOn)236 Q3Light_SetState(TQ3LightObject light, TQ3Boolean isOn)
237 {
238 
239 
240 	// Release build checks
241 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
242 
243 
244 
245 	// Debug build checks
246 #if Q3_DEBUG
247 	if (0) // Further checks on light
248 		return(kQ3Failure);
249 
250 	if (0) // Further checks on isOn
251 		return(kQ3Failure);
252 #endif
253 
254 
255 
256 	// Call the bottleneck
257 	E3System_Bottleneck();
258 
259 
260 
261 	// Call our implementation
262 	return(E3Light_SetState(light, isOn));
263 }
264 
265 
266 
267 
268 
269 //=============================================================================
270 //      Q3Light_SetBrightness : Quesa API entry point.
271 //-----------------------------------------------------------------------------
272 TQ3Status
Q3Light_SetBrightness(TQ3LightObject light,float brightness)273 Q3Light_SetBrightness(TQ3LightObject light, float brightness)
274 {
275 
276 
277 	// Release build checks
278 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
279 
280 
281 
282 	// Debug build checks
283 #if Q3_DEBUG
284 	if (0) // Further checks on light
285 		return(kQ3Failure);
286 
287 	if (0) // Further checks on brightness
288 		return(kQ3Failure);
289 #endif
290 
291 
292 
293 	// Call the bottleneck
294 	E3System_Bottleneck();
295 
296 
297 
298 	// Call our implementation
299 	return(E3Light_SetBrightness(light, brightness));
300 }
301 
302 
303 
304 
305 
306 //=============================================================================
307 //      Q3Light_SetColor : Quesa API entry point.
308 //-----------------------------------------------------------------------------
309 TQ3Status
Q3Light_SetColor(TQ3LightObject light,const TQ3ColorRGB * color)310 Q3Light_SetColor(TQ3LightObject light, const TQ3ColorRGB *color)
311 {
312 
313 
314 	// Release build checks
315 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
316 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(color), kQ3Failure);
317 
318 
319 
320 	// Debug build checks
321 #if Q3_DEBUG
322 	if (0) // Further checks on light
323 		return(kQ3Failure);
324 
325 	if (0) // Further checks on color
326 		return(kQ3Failure);
327 #endif
328 
329 
330 
331 	// Call the bottleneck
332 	E3System_Bottleneck();
333 
334 
335 
336 	// Call our implementation
337 	return(E3Light_SetColor(light, color));
338 }
339 
340 
341 
342 
343 
344 //=============================================================================
345 //      Q3Light_GetData : Quesa API entry point.
346 //-----------------------------------------------------------------------------
347 TQ3Status
Q3Light_GetData(TQ3LightObject light,TQ3LightData * lightData)348 Q3Light_GetData(TQ3LightObject light, TQ3LightData *lightData)
349 {
350 
351 
352 	// Release build checks
353 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
354 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightData), kQ3Failure);
355 
356 
357 
358 	// Debug build checks
359 #if Q3_DEBUG
360 	if (0) // Further checks on light
361 		return(kQ3Failure);
362 
363 	if (0) // Further checks on lightData
364 		return(kQ3Failure);
365 #endif
366 
367 
368 
369 	// Call the bottleneck
370 	E3System_Bottleneck();
371 
372 
373 
374 	// Call our implementation
375 	return(E3Light_GetData(light, lightData));
376 }
377 
378 
379 
380 
381 
382 //=============================================================================
383 //      Q3Light_SetData : Quesa API entry point.
384 //-----------------------------------------------------------------------------
385 TQ3Status
Q3Light_SetData(TQ3LightObject light,const TQ3LightData * lightData)386 Q3Light_SetData(TQ3LightObject light, const TQ3LightData *lightData)
387 {
388 
389 
390 	// Release build checks
391 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
392 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightData), kQ3Failure);
393 
394 
395 
396 	// Debug build checks
397 #if Q3_DEBUG
398 	if (0) // Further checks on light
399 		return(kQ3Failure);
400 
401 	if (0) // Further checks on lightData
402 		return(kQ3Failure);
403 #endif
404 
405 
406 
407 	// Call the bottleneck
408 	E3System_Bottleneck();
409 
410 
411 
412 	// Call our implementation
413 	return(E3Light_SetData(light, lightData));
414 }
415 
416 
417 
418 #pragma mark -
419 
420 //=============================================================================
421 //      Q3AmbientLight_New : Quesa API entry point.
422 //-----------------------------------------------------------------------------
423 TQ3LightObject
Q3AmbientLight_New(const TQ3LightData * lightData)424 Q3AmbientLight_New(const TQ3LightData *lightData)
425 {
426 
427 
428 	// Release build checks
429 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightData), NULL);
430 
431 
432 
433 	// Debug build checks
434 #if Q3_DEBUG
435 	if (0) // Further checks on lightData
436 		return(NULL);
437 #endif
438 
439 
440 
441 	// Call the bottleneck
442 	E3System_Bottleneck();
443 
444 
445 
446 	// Call our implementation
447 	return(E3AmbientLight_New(lightData));
448 }
449 
450 
451 
452 
453 
454 //=============================================================================
455 //      Q3AmbientLight_GetData : Quesa API entry point.
456 //-----------------------------------------------------------------------------
457 TQ3Status
Q3AmbientLight_GetData(TQ3LightObject light,TQ3LightData * lightData)458 Q3AmbientLight_GetData(TQ3LightObject light, TQ3LightData *lightData)
459 {
460 
461 
462 	// Release build checks
463 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
464 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightData), kQ3Failure);
465 
466 
467 
468 	// Debug build checks
469 #if Q3_DEBUG
470 	if (0) // Further checks on light
471 		return(kQ3Failure);
472 
473 	if (0) // Further checks on lightData
474 		return(kQ3Failure);
475 #endif
476 
477 
478 
479 	// Call the bottleneck
480 	E3System_Bottleneck();
481 
482 
483 
484 	// Call our implementation
485 	return(E3AmbientLight_GetData(light, lightData));
486 }
487 
488 
489 
490 
491 
492 //=============================================================================
493 //      Q3AmbientLight_SetData : Quesa API entry point.
494 //-----------------------------------------------------------------------------
495 TQ3Status
Q3AmbientLight_SetData(TQ3LightObject light,const TQ3LightData * lightData)496 Q3AmbientLight_SetData(TQ3LightObject light, const TQ3LightData *lightData)
497 {
498 
499 
500 	// Release build checks
501 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
502 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightData), kQ3Failure);
503 
504 
505 
506 	// Debug build checks
507 #if Q3_DEBUG
508 	if (0) // Further checks on light
509 		return(kQ3Failure);
510 
511 	if (0) // Further checks on lightData
512 		return(kQ3Failure);
513 #endif
514 
515 
516 
517 	// Call the bottleneck
518 	E3System_Bottleneck();
519 
520 
521 
522 	// Call our implementation
523 	return(E3AmbientLight_SetData(light, lightData));
524 }
525 
526 
527 
528 #pragma mark -
529 
530 //=============================================================================
531 //      Q3DirectionalLight_New : Quesa API entry point.
532 //-----------------------------------------------------------------------------
533 TQ3LightObject
Q3DirectionalLight_New(const TQ3DirectionalLightData * directionalLightData)534 Q3DirectionalLight_New(const TQ3DirectionalLightData *directionalLightData)
535 {
536 
537 
538 	// Release build checks
539 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(directionalLightData), NULL);
540 
541 
542 
543 	// Debug build checks
544 #if Q3_DEBUG
545 	if (0) // Further checks on directionalLightData
546 		return(NULL);
547 #endif
548 
549 
550 
551 	// Call the bottleneck
552 	E3System_Bottleneck();
553 
554 
555 
556 	// Call our implementation
557 	return(E3DirectionalLight_New(directionalLightData));
558 }
559 
560 
561 
562 
563 
564 //=============================================================================
565 //      Q3DirectionalLight_GetCastShadowsState : Quesa API entry point.
566 //-----------------------------------------------------------------------------
567 TQ3Status
Q3DirectionalLight_GetCastShadowsState(TQ3LightObject light,TQ3Boolean * castsShadows)568 Q3DirectionalLight_GetCastShadowsState(TQ3LightObject light, TQ3Boolean *castsShadows)
569 {
570 
571 
572 	// Release build checks
573 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
574 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(castsShadows), kQ3Failure);
575 
576 
577 
578 	// Debug build checks
579 #if Q3_DEBUG
580 	if (0) // Further checks on light
581 		return(kQ3Failure);
582 
583 	if (0) // Further checks on castsShadows
584 		return(kQ3Failure);
585 #endif
586 
587 
588 
589 	// Call the bottleneck
590 	E3System_Bottleneck();
591 
592 
593 
594 	// Call our implementation
595 	return(E3DirectionalLight_GetCastShadowsState(light, castsShadows));
596 }
597 
598 
599 
600 
601 
602 //=============================================================================
603 //      Q3DirectionalLight_GetDirection : Quesa API entry point.
604 //-----------------------------------------------------------------------------
605 TQ3Status
Q3DirectionalLight_GetDirection(TQ3LightObject light,TQ3Vector3D * direction)606 Q3DirectionalLight_GetDirection(TQ3LightObject light, TQ3Vector3D *direction)
607 {
608 
609 
610 	// Release build checks
611 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
612 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(direction), kQ3Failure);
613 
614 
615 
616 	// Debug build checks
617 #if Q3_DEBUG
618 	if (0) // Further checks on light
619 		return(kQ3Failure);
620 
621 	if (0) // Further checks on direction
622 		return(kQ3Failure);
623 #endif
624 
625 
626 
627 	// Call the bottleneck
628 	E3System_Bottleneck();
629 
630 
631 
632 	// Call our implementation
633 	return(E3DirectionalLight_GetDirection(light, direction));
634 }
635 
636 
637 
638 
639 
640 //=============================================================================
641 //      Q3DirectionalLight_SetCastShadowsState : Quesa API entry point.
642 //-----------------------------------------------------------------------------
643 TQ3Status
Q3DirectionalLight_SetCastShadowsState(TQ3LightObject light,TQ3Boolean castsShadows)644 Q3DirectionalLight_SetCastShadowsState(TQ3LightObject light, TQ3Boolean castsShadows)
645 {
646 
647 
648 	// Release build checks
649 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
650 
651 
652 
653 	// Debug build checks
654 #if Q3_DEBUG
655 	if (0) // Further checks on light
656 		return(kQ3Failure);
657 
658 	if (0) // Further checks on castsShadows
659 		return(kQ3Failure);
660 #endif
661 
662 
663 
664 	// Call the bottleneck
665 	E3System_Bottleneck();
666 
667 
668 
669 	// Call our implementation
670 	return(E3DirectionalLight_SetCastShadowsState(light, castsShadows));
671 }
672 
673 
674 
675 
676 
677 //=============================================================================
678 //      Q3DirectionalLight_SetDirection : Quesa API entry point.
679 //-----------------------------------------------------------------------------
680 TQ3Status
Q3DirectionalLight_SetDirection(TQ3LightObject light,const TQ3Vector3D * direction)681 Q3DirectionalLight_SetDirection(TQ3LightObject light, const TQ3Vector3D *direction)
682 {
683 
684 
685 	// Release build checks
686 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
687 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(direction), kQ3Failure);
688 
689 
690 
691 	// Debug build checks
692 #if Q3_DEBUG
693 	if (0) // Further checks on light
694 		return(kQ3Failure);
695 
696 	if (0) // Further checks on direction
697 		return(kQ3Failure);
698 #endif
699 
700 
701 
702 	// Call the bottleneck
703 	E3System_Bottleneck();
704 
705 
706 
707 	// Call our implementation
708 	return(E3DirectionalLight_SetDirection(light, direction));
709 }
710 
711 
712 
713 
714 
715 //=============================================================================
716 //      Q3DirectionalLight_GetData : Quesa API entry point.
717 //-----------------------------------------------------------------------------
718 TQ3Status
Q3DirectionalLight_GetData(TQ3LightObject light,TQ3DirectionalLightData * directionalLightData)719 Q3DirectionalLight_GetData(TQ3LightObject light, TQ3DirectionalLightData *directionalLightData)
720 {
721 
722 
723 	// Release build checks
724 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
725 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(directionalLightData), kQ3Failure);
726 
727 
728 
729 	// Debug build checks
730 #if Q3_DEBUG
731 	if (0) // Further checks on light
732 		return(kQ3Failure);
733 
734 	if (0) // Further checks on directionalLightData
735 		return(kQ3Failure);
736 #endif
737 
738 
739 
740 	// Call the bottleneck
741 	E3System_Bottleneck();
742 
743 
744 
745 	// Call our implementation
746 	return(E3DirectionalLight_GetData(light, directionalLightData));
747 }
748 
749 
750 
751 
752 
753 //=============================================================================
754 //      Q3DirectionalLight_SetData : Quesa API entry point.
755 //-----------------------------------------------------------------------------
756 TQ3Status
Q3DirectionalLight_SetData(TQ3LightObject light,const TQ3DirectionalLightData * directionalLightData)757 Q3DirectionalLight_SetData(TQ3LightObject light, const TQ3DirectionalLightData *directionalLightData)
758 {
759 
760 
761 	// Release build checks
762 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
763 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(directionalLightData), kQ3Failure);
764 
765 
766 
767 	// Debug build checks
768 #if Q3_DEBUG
769 	if (0) // Further checks on light
770 		return(kQ3Failure);
771 
772 	if (0) // Further checks on directionalLightData
773 		return(kQ3Failure);
774 #endif
775 
776 
777 
778 	// Call the bottleneck
779 	E3System_Bottleneck();
780 
781 
782 
783 	// Call our implementation
784 	return(E3DirectionalLight_SetData(light, directionalLightData));
785 }
786 
787 
788 
789 #pragma mark -
790 
791 //=============================================================================
792 //      Q3PointLight_New : Quesa API entry point.
793 //-----------------------------------------------------------------------------
794 TQ3LightObject
Q3PointLight_New(const TQ3PointLightData * pointLightData)795 Q3PointLight_New(const TQ3PointLightData *pointLightData)
796 {
797 
798 
799 	// Release build checks
800 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(pointLightData), NULL);
801 
802 
803 
804 	// Debug build checks
805 #if Q3_DEBUG
806 	if (0) // Further checks on pointLightData
807 		return(NULL);
808 #endif
809 
810 
811 
812 	// Call the bottleneck
813 	E3System_Bottleneck();
814 
815 
816 
817 	// Call our implementation
818 	return(E3PointLight_New(pointLightData));
819 }
820 
821 
822 
823 
824 
825 //=============================================================================
826 //      Q3PointLight_GetCastShadowsState : Quesa API entry point.
827 //-----------------------------------------------------------------------------
828 TQ3Status
Q3PointLight_GetCastShadowsState(TQ3LightObject light,TQ3Boolean * castsShadows)829 Q3PointLight_GetCastShadowsState(TQ3LightObject light, TQ3Boolean *castsShadows)
830 {
831 
832 
833 	// Release build checks
834 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
835 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(castsShadows), kQ3Failure);
836 
837 
838 
839 	// Debug build checks
840 #if Q3_DEBUG
841 	if (0) // Further checks on light
842 		return(kQ3Failure);
843 
844 	if (0) // Further checks on castsShadows
845 		return(kQ3Failure);
846 #endif
847 
848 
849 
850 	// Call the bottleneck
851 	E3System_Bottleneck();
852 
853 
854 
855 	// Call our implementation
856 	return(E3PointLight_GetCastShadowsState(light, castsShadows));
857 }
858 
859 
860 
861 
862 
863 //=============================================================================
864 //      Q3PointLight_GetAttenuation : Quesa API entry point.
865 //-----------------------------------------------------------------------------
866 TQ3Status
Q3PointLight_GetAttenuation(TQ3LightObject light,TQ3AttenuationType * attenuation)867 Q3PointLight_GetAttenuation(TQ3LightObject light, TQ3AttenuationType *attenuation)
868 {
869 
870 
871 	// Release build checks
872 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
873 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(attenuation), kQ3Failure);
874 
875 
876 
877 	// Debug build checks
878 #if Q3_DEBUG
879 	if (0) // Further checks on light
880 		return(kQ3Failure);
881 
882 	if (0) // Further checks on attenuation
883 		return(kQ3Failure);
884 #endif
885 
886 
887 
888 	// Call the bottleneck
889 	E3System_Bottleneck();
890 
891 
892 
893 	// Call our implementation
894 	return(E3PointLight_GetAttenuation(light, attenuation));
895 }
896 
897 
898 
899 
900 
901 //=============================================================================
902 //      Q3PointLight_GetLocation : Quesa API entry point.
903 //-----------------------------------------------------------------------------
904 TQ3Status
Q3PointLight_GetLocation(TQ3LightObject light,TQ3Point3D * location)905 Q3PointLight_GetLocation(TQ3LightObject light, TQ3Point3D *location)
906 {
907 
908 
909 	// Release build checks
910 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
911 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(location), kQ3Failure);
912 
913 
914 
915 	// Debug build checks
916 #if Q3_DEBUG
917 	if (0) // Further checks on light
918 		return(kQ3Failure);
919 
920 	if (0) // Further checks on location
921 		return(kQ3Failure);
922 #endif
923 
924 
925 
926 	// Call the bottleneck
927 	E3System_Bottleneck();
928 
929 
930 
931 	// Call our implementation
932 	return(E3PointLight_GetLocation(light, location));
933 }
934 
935 
936 
937 
938 
939 //=============================================================================
940 //      Q3PointLight_GetData : Quesa API entry point.
941 //-----------------------------------------------------------------------------
942 TQ3Status
Q3PointLight_GetData(TQ3LightObject light,TQ3PointLightData * pointLightData)943 Q3PointLight_GetData(TQ3LightObject light, TQ3PointLightData *pointLightData)
944 {
945 
946 
947 	// Release build checks
948 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
949 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(pointLightData), kQ3Failure);
950 
951 
952 
953 	// Debug build checks
954 #if Q3_DEBUG
955 	if (0) // Further checks on light
956 		return(kQ3Failure);
957 
958 	if (0) // Further checks on pointLightData
959 		return(kQ3Failure);
960 #endif
961 
962 
963 
964 	// Call the bottleneck
965 	E3System_Bottleneck();
966 
967 
968 
969 	// Call our implementation
970 	return(E3PointLight_GetData(light, pointLightData));
971 }
972 
973 
974 
975 
976 
977 //=============================================================================
978 //      Q3PointLight_SetCastShadowsState : Quesa API entry point.
979 //-----------------------------------------------------------------------------
980 TQ3Status
Q3PointLight_SetCastShadowsState(TQ3LightObject light,TQ3Boolean castsShadows)981 Q3PointLight_SetCastShadowsState(TQ3LightObject light, TQ3Boolean castsShadows)
982 {
983 
984 
985 	// Release build checks
986 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
987 
988 
989 
990 	// Debug build checks
991 #if Q3_DEBUG
992 	if (0) // Further checks on light
993 		return(kQ3Failure);
994 
995 	if (0) // Further checks on castsShadows
996 		return(kQ3Failure);
997 #endif
998 
999 
1000 
1001 	// Call the bottleneck
1002 	E3System_Bottleneck();
1003 
1004 
1005 
1006 	// Call our implementation
1007 	return(E3PointLight_SetCastShadowsState(light, castsShadows));
1008 }
1009 
1010 
1011 
1012 
1013 
1014 //=============================================================================
1015 //      Q3PointLight_SetAttenuation : Quesa API entry point.
1016 //-----------------------------------------------------------------------------
1017 TQ3Status
Q3PointLight_SetAttenuation(TQ3LightObject light,TQ3AttenuationType attenuation)1018 Q3PointLight_SetAttenuation(TQ3LightObject light, TQ3AttenuationType attenuation)
1019 {
1020 
1021 
1022 	// Release build checks
1023 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1024 
1025 
1026 
1027 	// Debug build checks
1028 #if Q3_DEBUG
1029 	if (0) // Further checks on light
1030 		return(kQ3Failure);
1031 
1032 	if (0) // Further checks on attenuation
1033 		return(kQ3Failure);
1034 #endif
1035 
1036 
1037 
1038 	// Call the bottleneck
1039 	E3System_Bottleneck();
1040 
1041 
1042 
1043 	// Call our implementation
1044 	return(E3PointLight_SetAttenuation(light, attenuation));
1045 }
1046 
1047 
1048 
1049 
1050 
1051 //=============================================================================
1052 //      Q3PointLight_SetLocation : Quesa API entry point.
1053 //-----------------------------------------------------------------------------
1054 TQ3Status
Q3PointLight_SetLocation(TQ3LightObject light,const TQ3Point3D * location)1055 Q3PointLight_SetLocation(TQ3LightObject light, const TQ3Point3D *location)
1056 {
1057 
1058 
1059 	// Release build checks
1060 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1061 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(location), kQ3Failure);
1062 
1063 
1064 
1065 	// Debug build checks
1066 #if Q3_DEBUG
1067 	if (0) // Further checks on light
1068 		return(kQ3Failure);
1069 
1070 	if (0) // Further checks on location
1071 		return(kQ3Failure);
1072 #endif
1073 
1074 
1075 
1076 	// Call the bottleneck
1077 	E3System_Bottleneck();
1078 
1079 
1080 
1081 	// Call our implementation
1082 	return(E3PointLight_SetLocation(light, location));
1083 }
1084 
1085 
1086 
1087 
1088 
1089 //=============================================================================
1090 //      Q3PointLight_SetData : Quesa API entry point.
1091 //-----------------------------------------------------------------------------
1092 TQ3Status
Q3PointLight_SetData(TQ3LightObject light,const TQ3PointLightData * pointLightData)1093 Q3PointLight_SetData(TQ3LightObject light, const TQ3PointLightData *pointLightData)
1094 {
1095 
1096 
1097 	// Release build checks
1098 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1099 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(pointLightData), kQ3Failure);
1100 
1101 
1102 
1103 	// Debug build checks
1104 #if Q3_DEBUG
1105 	if (0) // Further checks on light
1106 		return(kQ3Failure);
1107 
1108 	if (0) // Further checks on pointLightData
1109 		return(kQ3Failure);
1110 #endif
1111 
1112 
1113 
1114 	// Call the bottleneck
1115 	E3System_Bottleneck();
1116 
1117 
1118 
1119 	// Call our implementation
1120 	return(E3PointLight_SetData(light, pointLightData));
1121 }
1122 
1123 
1124 
1125 #pragma mark -
1126 
1127 //=============================================================================
1128 //      Q3SpotLight_New : Quesa API entry point.
1129 //-----------------------------------------------------------------------------
1130 TQ3LightObject
Q3SpotLight_New(const TQ3SpotLightData * spotLightData)1131 Q3SpotLight_New(const TQ3SpotLightData *spotLightData)
1132 {
1133 
1134 
1135 	// Release build checks
1136 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(spotLightData), NULL);
1137 
1138 
1139 
1140 	// Debug build checks
1141 #if Q3_DEBUG
1142 	if (0) // Further checks on spotLightData
1143 		return(NULL);
1144 #endif
1145 
1146 
1147 
1148 	// Call the bottleneck
1149 	E3System_Bottleneck();
1150 
1151 
1152 
1153 	// Call our implementation
1154 	return(E3SpotLight_New(spotLightData));
1155 }
1156 
1157 
1158 
1159 
1160 
1161 //=============================================================================
1162 //      Q3SpotLight_GetCastShadowsState : Quesa API entry point.
1163 //-----------------------------------------------------------------------------
1164 TQ3Status
Q3SpotLight_GetCastShadowsState(TQ3LightObject light,TQ3Boolean * castsShadows)1165 Q3SpotLight_GetCastShadowsState(TQ3LightObject light, TQ3Boolean *castsShadows)
1166 {
1167 
1168 
1169 	// Release build checks
1170 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1171 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(castsShadows), kQ3Failure);
1172 
1173 
1174 
1175 	// Debug build checks
1176 #if Q3_DEBUG
1177 	if (0) // Further checks on light
1178 		return(kQ3Failure);
1179 
1180 	if (0) // Further checks on castsShadows
1181 		return(kQ3Failure);
1182 #endif
1183 
1184 
1185 
1186 	// Call the bottleneck
1187 	E3System_Bottleneck();
1188 
1189 
1190 
1191 	// Call our implementation
1192 	return(E3SpotLight_GetCastShadowsState(light, castsShadows));
1193 }
1194 
1195 
1196 
1197 
1198 
1199 //=============================================================================
1200 //      Q3SpotLight_GetAttenuation : Quesa API entry point.
1201 //-----------------------------------------------------------------------------
1202 TQ3Status
Q3SpotLight_GetAttenuation(TQ3LightObject light,TQ3AttenuationType * attenuation)1203 Q3SpotLight_GetAttenuation(TQ3LightObject light, TQ3AttenuationType *attenuation)
1204 {
1205 
1206 
1207 	// Release build checks
1208 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1209 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(attenuation), kQ3Failure);
1210 
1211 
1212 
1213 	// Debug build checks
1214 #if Q3_DEBUG
1215 	if (0) // Further checks on light
1216 		return(kQ3Failure);
1217 
1218 	if (0) // Further checks on attenuation
1219 		return(kQ3Failure);
1220 #endif
1221 
1222 
1223 
1224 	// Call the bottleneck
1225 	E3System_Bottleneck();
1226 
1227 
1228 
1229 	// Call our implementation
1230 	return(E3SpotLight_GetAttenuation(light, attenuation));
1231 }
1232 
1233 
1234 
1235 
1236 
1237 //=============================================================================
1238 //      Q3SpotLight_GetLocation : Quesa API entry point.
1239 //-----------------------------------------------------------------------------
1240 TQ3Status
Q3SpotLight_GetLocation(TQ3LightObject light,TQ3Point3D * location)1241 Q3SpotLight_GetLocation(TQ3LightObject light, TQ3Point3D *location)
1242 {
1243 
1244 
1245 	// Release build checks
1246 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1247 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(location), kQ3Failure);
1248 
1249 
1250 
1251 	// Debug build checks
1252 #if Q3_DEBUG
1253 	if (0) // Further checks on light
1254 		return(kQ3Failure);
1255 
1256 	if (0) // Further checks on location
1257 		return(kQ3Failure);
1258 #endif
1259 
1260 
1261 
1262 	// Call the bottleneck
1263 	E3System_Bottleneck();
1264 
1265 
1266 
1267 	// Call our implementation
1268 	return(E3SpotLight_GetLocation(light, location));
1269 }
1270 
1271 
1272 
1273 
1274 
1275 //=============================================================================
1276 //      Q3SpotLight_GetDirection : Quesa API entry point.
1277 //-----------------------------------------------------------------------------
1278 TQ3Status
Q3SpotLight_GetDirection(TQ3LightObject light,TQ3Vector3D * direction)1279 Q3SpotLight_GetDirection(TQ3LightObject light, TQ3Vector3D *direction)
1280 {
1281 
1282 
1283 	// Release build checks
1284 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1285 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(direction), kQ3Failure);
1286 
1287 
1288 
1289 	// Debug build checks
1290 #if Q3_DEBUG
1291 	if (0) // Further checks on light
1292 		return(kQ3Failure);
1293 
1294 	if (0) // Further checks on direction
1295 		return(kQ3Failure);
1296 #endif
1297 
1298 
1299 
1300 	// Call the bottleneck
1301 	E3System_Bottleneck();
1302 
1303 
1304 
1305 	// Call our implementation
1306 	return(E3SpotLight_GetDirection(light, direction));
1307 }
1308 
1309 
1310 
1311 
1312 
1313 //=============================================================================
1314 //      Q3SpotLight_GetHotAngle : Quesa API entry point.
1315 //-----------------------------------------------------------------------------
1316 TQ3Status
Q3SpotLight_GetHotAngle(TQ3LightObject light,float * hotAngle)1317 Q3SpotLight_GetHotAngle(TQ3LightObject light, float *hotAngle)
1318 {
1319 
1320 
1321 	// Release build checks
1322 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1323 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(hotAngle), kQ3Failure);
1324 
1325 
1326 
1327 	// Debug build checks
1328 #if Q3_DEBUG
1329 	if (0) // Further checks on light
1330 		return(kQ3Failure);
1331 
1332 	if (0) // Further checks on hotAngle
1333 		return(kQ3Failure);
1334 #endif
1335 
1336 
1337 
1338 	// Call the bottleneck
1339 	E3System_Bottleneck();
1340 
1341 
1342 
1343 	// Call our implementation
1344 	return(E3SpotLight_GetHotAngle(light, hotAngle));
1345 }
1346 
1347 
1348 
1349 
1350 
1351 //=============================================================================
1352 //      Q3SpotLight_GetOuterAngle : Quesa API entry point.
1353 //-----------------------------------------------------------------------------
1354 TQ3Status
Q3SpotLight_GetOuterAngle(TQ3LightObject light,float * outerAngle)1355 Q3SpotLight_GetOuterAngle(TQ3LightObject light, float *outerAngle)
1356 {
1357 
1358 
1359 	// Release build checks
1360 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1361 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(outerAngle), kQ3Failure);
1362 
1363 
1364 
1365 	// Debug build checks
1366 #if Q3_DEBUG
1367 	if (0) // Further checks on light
1368 		return(kQ3Failure);
1369 
1370 	if (0) // Further checks on outerAngle
1371 		return(kQ3Failure);
1372 #endif
1373 
1374 
1375 
1376 	// Call the bottleneck
1377 	E3System_Bottleneck();
1378 
1379 
1380 
1381 	// Call our implementation
1382 	return(E3SpotLight_GetOuterAngle(light, outerAngle));
1383 }
1384 
1385 
1386 
1387 
1388 
1389 //=============================================================================
1390 //      Q3SpotLight_GetFallOff : Quesa API entry point.
1391 //-----------------------------------------------------------------------------
1392 TQ3Status
Q3SpotLight_GetFallOff(TQ3LightObject light,TQ3FallOffType * fallOff)1393 Q3SpotLight_GetFallOff(TQ3LightObject light, TQ3FallOffType *fallOff)
1394 {
1395 
1396 
1397 	// Release build checks
1398 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1399 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(fallOff), kQ3Failure);
1400 
1401 
1402 
1403 	// Debug build checks
1404 #if Q3_DEBUG
1405 	if (0) // Further checks on light
1406 		return(kQ3Failure);
1407 
1408 	if (0) // Further checks on fallOff
1409 		return(kQ3Failure);
1410 #endif
1411 
1412 
1413 
1414 	// Call the bottleneck
1415 	E3System_Bottleneck();
1416 
1417 
1418 
1419 	// Call our implementation
1420 	return(E3SpotLight_GetFallOff(light, fallOff));
1421 }
1422 
1423 
1424 
1425 
1426 
1427 //=============================================================================
1428 //      Q3SpotLight_GetData : Quesa API entry point.
1429 //-----------------------------------------------------------------------------
1430 TQ3Status
Q3SpotLight_GetData(TQ3LightObject light,TQ3SpotLightData * spotLightData)1431 Q3SpotLight_GetData(TQ3LightObject light, TQ3SpotLightData *spotLightData)
1432 {
1433 
1434 
1435 	// Release build checks
1436 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1437 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(spotLightData), kQ3Failure);
1438 
1439 
1440 
1441 	// Debug build checks
1442 #if Q3_DEBUG
1443 	if (0) // Further checks on light
1444 		return(kQ3Failure);
1445 
1446 	if (0) // Further checks on spotLightData
1447 		return(kQ3Failure);
1448 #endif
1449 
1450 
1451 
1452 	// Call the bottleneck
1453 	E3System_Bottleneck();
1454 
1455 
1456 
1457 	// Call our implementation
1458 	return(E3SpotLight_GetData(light, spotLightData));
1459 }
1460 
1461 
1462 
1463 
1464 
1465 //=============================================================================
1466 //      Q3SpotLight_SetCastShadowsState : Quesa API entry point.
1467 //-----------------------------------------------------------------------------
1468 TQ3Status
Q3SpotLight_SetCastShadowsState(TQ3LightObject light,TQ3Boolean castsShadows)1469 Q3SpotLight_SetCastShadowsState(TQ3LightObject light, TQ3Boolean castsShadows)
1470 {
1471 
1472 
1473 	// Release build checks
1474 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1475 
1476 
1477 
1478 	// Debug build checks
1479 #if Q3_DEBUG
1480 	if (0) // Further checks on light
1481 		return(kQ3Failure);
1482 
1483 	if (0) // Further checks on castsShadows
1484 		return(kQ3Failure);
1485 #endif
1486 
1487 
1488 
1489 	// Call the bottleneck
1490 	E3System_Bottleneck();
1491 
1492 
1493 
1494 	// Call our implementation
1495 	return(E3SpotLight_SetCastShadowsState(light, castsShadows));
1496 }
1497 
1498 
1499 
1500 
1501 
1502 //=============================================================================
1503 //      Q3SpotLight_SetAttenuation : Quesa API entry point.
1504 //-----------------------------------------------------------------------------
1505 TQ3Status
Q3SpotLight_SetAttenuation(TQ3LightObject light,TQ3AttenuationType attenuation)1506 Q3SpotLight_SetAttenuation(TQ3LightObject light, TQ3AttenuationType attenuation)
1507 {
1508 
1509 
1510 	// Release build checks
1511 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1512 
1513 
1514 
1515 	// Debug build checks
1516 #if Q3_DEBUG
1517 	if (0) // Further checks on light
1518 		return(kQ3Failure);
1519 
1520 	if (0) // Further checks on attenuation
1521 		return(kQ3Failure);
1522 #endif
1523 
1524 
1525 
1526 	// Call the bottleneck
1527 	E3System_Bottleneck();
1528 
1529 
1530 
1531 	// Call our implementation
1532 	return(E3SpotLight_SetAttenuation(light, attenuation));
1533 }
1534 
1535 
1536 
1537 
1538 
1539 //=============================================================================
1540 //      Q3SpotLight_SetLocation : Quesa API entry point.
1541 //-----------------------------------------------------------------------------
1542 TQ3Status
Q3SpotLight_SetLocation(TQ3LightObject light,const TQ3Point3D * location)1543 Q3SpotLight_SetLocation(TQ3LightObject light, const TQ3Point3D *location)
1544 {
1545 
1546 
1547 	// Release build checks
1548 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1549 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(location), kQ3Failure);
1550 
1551 
1552 
1553 	// Debug build checks
1554 #if Q3_DEBUG
1555 	if (0) // Further checks on light
1556 		return(kQ3Failure);
1557 
1558 	if (0) // Further checks on location
1559 		return(kQ3Failure);
1560 #endif
1561 
1562 
1563 
1564 	// Call the bottleneck
1565 	E3System_Bottleneck();
1566 
1567 
1568 
1569 	// Call our implementation
1570 	return(E3SpotLight_SetLocation(light, location));
1571 }
1572 
1573 
1574 
1575 
1576 
1577 //=============================================================================
1578 //      Q3SpotLight_SetDirection : Quesa API entry point.
1579 //-----------------------------------------------------------------------------
1580 TQ3Status
Q3SpotLight_SetDirection(TQ3LightObject light,const TQ3Vector3D * direction)1581 Q3SpotLight_SetDirection(TQ3LightObject light, const TQ3Vector3D *direction)
1582 {
1583 
1584 
1585 	// Release build checks
1586 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1587 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(direction), kQ3Failure);
1588 
1589 
1590 
1591 	// Debug build checks
1592 #if Q3_DEBUG
1593 	if (0) // Further checks on light
1594 		return(kQ3Failure);
1595 
1596 	if (0) // Further checks on direction
1597 		return(kQ3Failure);
1598 #endif
1599 
1600 
1601 
1602 	// Call the bottleneck
1603 	E3System_Bottleneck();
1604 
1605 
1606 
1607 	// Call our implementation
1608 	return(E3SpotLight_SetDirection(light, direction));
1609 }
1610 
1611 
1612 
1613 
1614 
1615 //=============================================================================
1616 //      Q3SpotLight_SetHotAngle : Quesa API entry point.
1617 //-----------------------------------------------------------------------------
1618 TQ3Status
Q3SpotLight_SetHotAngle(TQ3LightObject light,float hotAngle)1619 Q3SpotLight_SetHotAngle(TQ3LightObject light, float hotAngle)
1620 {
1621 
1622 
1623 	// Release build checks
1624 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1625 
1626 
1627 
1628 	// Debug build checks
1629 #if Q3_DEBUG
1630 	if (0) // Further checks on light
1631 		return(kQ3Failure);
1632 
1633 	if (0) // Further checks on hotAngle
1634 		return(kQ3Failure);
1635 #endif
1636 
1637 
1638 
1639 	// Call the bottleneck
1640 	E3System_Bottleneck();
1641 
1642 
1643 
1644 	// Call our implementation
1645 	return(E3SpotLight_SetHotAngle(light, hotAngle));
1646 }
1647 
1648 
1649 
1650 
1651 
1652 //=============================================================================
1653 //      Q3SpotLight_SetOuterAngle : Quesa API entry point.
1654 //-----------------------------------------------------------------------------
1655 TQ3Status
Q3SpotLight_SetOuterAngle(TQ3LightObject light,float outerAngle)1656 Q3SpotLight_SetOuterAngle(TQ3LightObject light, float outerAngle)
1657 {
1658 
1659 
1660 	// Release build checks
1661 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1662 
1663 
1664 
1665 	// Debug build checks
1666 #if Q3_DEBUG
1667 	if (0) // Further checks on light
1668 		return(kQ3Failure);
1669 
1670 	if (0) // Further checks on outerAngle
1671 		return(kQ3Failure);
1672 #endif
1673 
1674 
1675 
1676 	// Call the bottleneck
1677 	E3System_Bottleneck();
1678 
1679 
1680 
1681 	// Call our implementation
1682 	return(E3SpotLight_SetOuterAngle(light, outerAngle));
1683 }
1684 
1685 
1686 
1687 
1688 
1689 //=============================================================================
1690 //      Q3SpotLight_SetFallOff : Quesa API entry point.
1691 //-----------------------------------------------------------------------------
1692 TQ3Status
Q3SpotLight_SetFallOff(TQ3LightObject light,TQ3FallOffType fallOff)1693 Q3SpotLight_SetFallOff(TQ3LightObject light, TQ3FallOffType fallOff)
1694 {
1695 
1696 
1697 	// Release build checks
1698 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1699 
1700 
1701 
1702 	// Debug build checks
1703 #if Q3_DEBUG
1704 	if (0) // Further checks on light
1705 		return(kQ3Failure);
1706 
1707 	if (0) // Further checks on fallOff
1708 		return(kQ3Failure);
1709 #endif
1710 
1711 
1712 
1713 	// Call the bottleneck
1714 	E3System_Bottleneck();
1715 
1716 
1717 
1718 	// Call our implementation
1719 	return(E3SpotLight_SetFallOff(light, fallOff));
1720 }
1721 
1722 
1723 
1724 
1725 
1726 //=============================================================================
1727 //      Q3SpotLight_SetData : Quesa API entry point.
1728 //-----------------------------------------------------------------------------
1729 TQ3Status
Q3SpotLight_SetData(TQ3LightObject light,const TQ3SpotLightData * spotLightData)1730 Q3SpotLight_SetData(TQ3LightObject light, const TQ3SpotLightData *spotLightData)
1731 {
1732 
1733 
1734 	// Release build checks
1735 	Q3_REQUIRE_OR_RESULT( E3Light_IsOfMyClass ( light ), kQ3Failure);
1736 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(spotLightData), kQ3Failure);
1737 
1738 
1739 
1740 	// Debug build checks
1741 #if Q3_DEBUG
1742 	if (0) // Further checks on light
1743 		return(kQ3Failure);
1744 
1745 	if (0) // Further checks on spotLightData
1746 		return(kQ3Failure);
1747 #endif
1748 
1749 
1750 
1751 	// Call the bottleneck
1752 	E3System_Bottleneck();
1753 
1754 
1755 
1756 	// Call our implementation
1757 	return(E3SpotLight_SetData(light, spotLightData));
1758 }
1759 
1760 
1761 
1762 
1763 
1764