00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00036
00037 #include "SO3SCOL.h"
00038
00039
00040 #include "../SO3SceneGraph/SO3Light.h"
00041 #include "../SO3SceneGraph/SO3Scene.h"
00042
00052 int SO3LightCreate(mmachine m)
00053 {
00054 #ifdef SO3_DEBUG
00055 MMechostr(MSKDEBUG, "SO3LightCreate\n");
00056 #endif
00057
00058 int name = MMpull(m);
00059 int s = MMget(m, 0);
00060 if (s==NIL)
00061 {
00062 MMset(m, 0, NIL);
00063 return 0;
00064 }
00065
00066 SScene* scene = (SScene*) MMfetch(m, MTOP(s), 0);
00067 if (scene==NULL)
00068 {
00069 MMset(m, 0, NIL);
00070 return 0;
00071 }
00072
00073
00074 std::string tmpLightName(MMstartstr(m,MTOP(name)));
00075 SLight* light = 0;
00076
00077 try
00078 {
00079 light = scene->CreateLight(tmpLightName);
00080 }
00081 catch(Ogre::Exception &e)
00082 {
00083 MMechostr(MSKDEBUG,"An exception has occurred : %s\n",e.what());
00084 MMset(m, 0, NIL);
00085 return 0;
00086 }
00087
00088
00089 MMpull(m);
00090 return createObject(m, light, scene);
00091 }
00092
00093
00108 int SO3LightSetType(mmachine m)
00109 {
00110 #ifdef SO3_DEBUG
00111 MMechostr(MSKDEBUG, "SO3LightSetType\n");
00112 #endif
00113
00114 int type = MMpull(m);
00115 int l = MMget(m, 0);
00116 if ((type==NIL)||(l==NIL))
00117 {
00118 MMechostr(MSKDEBUG, "l==NIL\n");
00119 MMset(m, 0, NIL);
00120 return 0;
00121 }
00122
00123 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00124 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00125 {
00126 MMset(m, 0, NIL);
00127 return 0;
00128 }
00129
00130 SLight* light = static_cast<SLight*>(node);
00131
00132 light->SetType(static_cast <SLight::LightType> (MTOI(type)));
00133
00134 MMset(m, 0, ITOM(1));
00135
00136 return 0;
00137 }
00138
00139
00153 int SO3LightGetType(mmachine m)
00154 {
00155 #ifdef SO3_DEBUG
00156 MMechostr(MSKDEBUG, "SO3LightGetType\n");
00157 #endif
00158
00159 int l = MMget(m, 0);
00160 if(l==NIL)
00161 {
00162 MMechostr(MSKDEBUG, "l==NIL\n");
00163 MMset(m, 0, NIL);
00164 return 0;
00165 }
00166
00167 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00168 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00169 {
00170 MMset(m, 0, NIL);
00171 return 0;
00172 }
00173
00174 SLight* light = static_cast<SLight*>(node);
00175
00176 int type = static_cast <int> (light->GetType());
00177 MMset(m, 0, ITOM(type));
00178 return 0;
00179 }
00180
00181
00191 int SO3LightSetDiffuseColor(mmachine m)
00192 {
00193 #ifdef SO3_DEBUG
00194 MMechostr(MSKDEBUG, "SO3LightSetDiffuseColor\n");
00195 #endif
00196
00197 int diffuse = MMpull(m);
00198 int l = MMget(m, 0);
00199 if ((l==NIL)||(diffuse==NIL))
00200 {
00201 MMset(m, 0, NIL);
00202 return 0;
00203 }
00204
00205 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00206 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00207 {
00208 MMset(m, 0, NIL);
00209 return 0;
00210 }
00211
00212 SLight* light = static_cast<SLight*>(node);
00213
00214 light->SetDiffuseColour(MTOI(diffuse));
00215 MMset(m, 0, ITOM(1));
00216
00217 return 0;
00218 }
00219
00228 int SO3LightGetDiffuseColor(mmachine m)
00229 {
00230 #ifdef SO3_DEBUG
00231 MMechostr(MSKDEBUG, "SO3LightGetDiffuseColor\n");
00232 #endif
00233
00234 int l = MMget(m, 0);
00235 if (l==NIL)
00236 {
00237 MMset(m, 0, NIL);
00238 return 0;
00239 }
00240
00241 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00242 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00243 {
00244 MMset(m, 0, NIL);
00245 return 0;
00246 }
00247
00248 SLight* light = static_cast<SLight*>(node);
00249 int val = light->GetDiffuseColour();
00250 MMset(m, 0, ITOM(val));
00251 return 0;
00252 }
00253
00254
00264 int SO3LightSetPowerScale(mmachine m)
00265 {
00266 #ifdef SO3_DEBUG
00267 MMechostr(MSKDEBUG, "SO3LightSetPowerScale\n");
00268 #endif
00269
00270 int pow = MMpull(m);
00271 int l = MMget(m, 0);
00272 if ((l==NIL)||(pow==NIL))
00273 {
00274 MMset(m, 0, NIL);
00275 return 0;
00276 }
00277
00278 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00279 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00280 {
00281 MMset(m, 0, NIL);
00282 return 0;
00283 }
00284
00285 SLight* light = static_cast<SLight*>(node);
00286
00287 light->SetPowerScale(MTOF(pow));
00288 MMset(m, 0, ITOM(1));
00289
00290 return 0;
00291 }
00292
00293
00303 int SO3LightSetShadowFarDistance(mmachine m)
00304 {
00305 #ifdef SO3_DEBUG
00306 MMechostr(MSKDEBUG, "SO3LightSetShadowFarDistance\n");
00307 #endif
00308
00309 int d = MMpull(m);
00310 int l = MMget(m, 0);
00311 if ((l==NIL)||(d==NIL))
00312 {
00313 MMset(m, 0, NIL);
00314 return 0;
00315 }
00316
00317 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00318 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00319 {
00320 MMset(m, 0, NIL);
00321 return 0;
00322 }
00323
00324 SLight* light = static_cast<SLight*>(node);
00325
00326 light->SetShadowFarDistance(MTOF(d));
00327 MMset(m, 0, ITOM(1));
00328
00329 return 0;
00330 }
00331
00332
00341 int SO3LightGetPowerScale(mmachine m)
00342 {
00343 #ifdef SO3_DEBUG
00344 MMechostr(MSKDEBUG, "SO3LightGetPowerScale\n");
00345 #endif
00346
00347 int l = MMget(m, 0);
00348 if (l==NIL)
00349 {
00350 MMset(m, 0, NIL);
00351 return 0;
00352 }
00353
00354 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00355 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00356 {
00357 MMset(m, 0, NIL);
00358 return 0;
00359 }
00360
00361 SLight* light = static_cast<SLight*>(node);
00362
00363 float pow = light->GetPowerScale();
00364 MMset(m, 0, FTOM(pow));
00365
00366 return 0;
00367 }
00368
00369
00378 int SO3LightGetShadowFarDistance(mmachine m)
00379 {
00380 #ifdef SO3_DEBUG
00381 MMechostr(MSKDEBUG, "SO3LightGetShadowFarDistance\n");
00382 #endif
00383
00384 int l = MMget(m, 0);
00385 if (l==NIL)
00386 {
00387 MMset(m, 0, NIL);
00388 return 0;
00389 }
00390
00391 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00392 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00393 {
00394 MMset(m, 0, NIL);
00395 return 0;
00396 }
00397
00398 SLight* light = static_cast<SLight*>(node);
00399
00400 float d = light->GetShadowFarDistance();
00401 MMset(m, 0, FTOM(d));
00402
00403 return 0;
00404 }
00405
00406
00416 int SO3LightSetVisible(mmachine m)
00417 {
00418 #ifdef SO3_DEBUG
00419 MMechostr(MSKDEBUG, "SO3LightSetVisible\n");
00420 #endif
00421
00422 int v = MTOI(MMpull(m));
00423 int l = MMget(m, 0);
00424 if (l==NIL)
00425 {
00426 MMset(m, 0, 0);
00427 return 0;
00428 }
00429
00430 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00431 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00432 {
00433 MMset(m, 0, NIL);
00434 return 0;
00435 }
00436
00437 SLight* light = static_cast<SLight*>(node);
00438
00439 if (v==0)
00440 light->SetVisible(false);
00441 else
00442 light->SetVisible(true);
00443
00444 MMset(m, 0, ITOM(1));
00445 return 0;
00446 }
00447
00448
00457 int SO3LightGetVisible(mmachine m)
00458 {
00459 #ifdef SO3_DEBUG
00460 MMechostr(MSKDEBUG, "SO3LightGetVisible\n");
00461 #endif
00462
00463 int l = MMget(m, 0);
00464 if (l==NIL)
00465 {
00466 MMset(m, 0, NIL);
00467 return 0;
00468 }
00469
00470 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00471 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00472 {
00473 MMset(m, 0, NIL);
00474 return 0;
00475 }
00476
00477 SLight* light = static_cast<SLight*>(node);
00478
00479 int val = 0;
00480
00481 if (light->GetVisible())
00482 val = 1;
00483
00484 MMset(m, 0, ITOM(val));
00485
00486 return 0;
00487 }
00488
00489
00499 int SO3LightSetAttenuation(mmachine m)
00500 {
00501 #ifdef SO3_DEBUG
00502 MMechostr(MSKDEBUG, "SO3LightSetAttenuation\n");
00503 #endif
00504
00505 int param = MMpull(m);
00506 int l = MMget(m, 0);
00507 if ((l==NIL)||(param==NIL))
00508 {
00509 MMset(m, 0, NIL);
00510 return 0;
00511 }
00512
00513 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00514 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00515 {
00516 MMset(m, 0, NIL);
00517 return 0;
00518 }
00519
00520 SLight* light = static_cast<SLight*>(node);
00521
00522 light->SetAttenuation(MTOF(MMfetch(m, MTOI(param), 0)),
00523 MTOF(MMfetch(m, MTOI(param), 1)),
00524 MTOF(MMfetch(m, MTOI(param), 2)),
00525 MTOF(MMfetch(m, MTOI(param), 3)));
00526
00527 MMset(m, 0, ITOM(1));
00528 return 0;
00529 }
00530
00531
00541 int SO3LightSetAttenuationAuto(mmachine m)
00542 {
00543 #ifdef SO3_DEBUG
00544 MMechostr(MSKDEBUG, "SO3LightSetAttenuationAuto\n");
00545 #endif
00546
00547 int scolRange = MMpull(m);
00548 int scolLight = MMget(m, 0);
00549 if((scolRange==NIL)||(scolLight==NIL))
00550 {
00551 MMset(m, 0, NIL);
00552 return 0;
00553 }
00554
00555 SNode* node = (SNode*) MMfetch(m, MTOP(scolLight), 0);
00556 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00557 {
00558 MMset(m, 0, NIL);
00559 return 0;
00560 }
00561
00562 SLight* light = static_cast<SLight*>(node);
00563 light->SetAttenuation(MTOF(scolRange));
00564 MMset(m, 0, ITOM(1));
00565 return 0;
00566 }
00567
00568
00569
00578 int SO3LightGetAttenuation(mmachine m)
00579 {
00580 #ifdef SO3_DEBUG
00581 MMechostr(MSKDEBUG, "SO3LightGetAttenuation\n");
00582 #endif
00583
00584 int l = MMget(m, 0);
00585 if (l==NIL)
00586 {
00587 MMset(m, 0, NIL);
00588 return 0;
00589 }
00590
00591 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00592 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00593 {
00594 MMset(m, 0, NIL);
00595 return 0;
00596 }
00597
00598 SLight* light = static_cast<SLight*>(node);
00599
00600 Ogre::Vector4 attenuation = light->GetAttenuation();
00601
00602 int tuple = MMmalloc(m, 4, TYPETAB);
00603 if (tuple==NIL)
00604 {
00605 MMset(m, 0, NIL);
00606 return MERRMEM;
00607 }
00608
00609 MMstore(m, tuple, 0, FTOM(attenuation.x));
00610 MMstore(m, tuple, 1, FTOM(attenuation.y));
00611 MMstore(m, tuple, 2, FTOM(attenuation.z));
00612 MMstore(m, tuple, 3, FTOM(attenuation.w));
00613 MMset(m, 0, PTOM(tuple));
00614
00615 return 0;
00616 }
00617
00618
00628 int SO3LightSetSpecularColor(mmachine m)
00629 {
00630 #ifdef SO3_DEBUG
00631 MMechostr(MSKDEBUG, "SO3LightSetSpecularColor\n");
00632 #endif
00633
00634 int specular = MMpull(m);
00635 int l = MMget(m, 0);
00636 if ((l==NIL)||(specular==NIL))
00637 {
00638 MMset(m, 0, NIL);
00639 return 0;
00640 }
00641
00642 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00643 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00644 {
00645 MMset(m, 0, NIL);
00646 return 0;
00647 }
00648
00649 SLight* light = static_cast<SLight*>(node);
00650
00651 light->SetSpecularColour(MTOI(specular));
00652
00653 MMset(m, 0, ITOM(1));
00654
00655 return 0;
00656 }
00657
00658
00667 int SO3LightGetSpecularColor(mmachine m)
00668 {
00669 #ifdef SO3_DEBUG
00670 MMechostr(MSKDEBUG, "SO3LightGetSpecularColor\n");
00671 #endif
00672
00673 int l = MMget(m, 0);
00674 if (l==NIL)
00675 {
00676 MMset(m, 0, NIL);
00677 return 0;
00678 }
00679
00680 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00681 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00682 {
00683 MMset(m, 0, NIL);
00684 return 0;
00685 }
00686
00687 SLight* light = static_cast<SLight*>(node);
00688
00689 int val = light->GetSpecularColour();
00690 MMset(m, 0, ITOM(val));
00691
00692 return 0;
00693 }
00694
00695
00705 int SO3LightSetSpotFallOff(mmachine m)
00706 {
00707 #ifdef SO3_DEBUG
00708 MMechostr(MSKDEBUG, "SO3LightSetSpotFallOff\n");
00709 #endif
00710
00711 int fal = MMpull(m);
00712 int l = MMget(m, 0);
00713 if ((l==NIL)||(fal==NIL))
00714 {
00715 MMset(m, 0, NIL);
00716 return 0;
00717 }
00718
00719 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00720 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00721 {
00722 MMset(m, 0, NIL);
00723 return 0;
00724 }
00725
00726 SLight* light = static_cast<SLight*>(node);
00727
00728 light->SetSpotlightFalloff(MTOF(fal));
00729 MMset(m, 0, ITOM(1));
00730
00731 return 0;
00732 }
00733
00734
00743 int SO3LightGetSpotFallOff(mmachine m)
00744 {
00745 #ifdef SO3_DEBUG
00746 MMechostr(MSKDEBUG, "SO3LightGetSpotFallOff\n");
00747 #endif
00748
00749 int l = MMget(m, 0);
00750 if (l==NIL)
00751 {
00752 MMset(m, 0, NIL);
00753 return 0;
00754 }
00755
00756 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00757 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00758 {
00759 MMset(m, 0, NIL);
00760 return 0;
00761 }
00762
00763 SLight* light = static_cast<SLight*>(node);
00764
00765 float f = light->GetSpotlightFalloff();
00766 MMset(m, 0, FTOM(f));
00767
00768 return 0;
00769 }
00770
00771
00781 int SO3LightSetSpotInnerAngle(mmachine m)
00782 {
00783 #ifdef SO3_DEBUG
00784 MMechostr(MSKDEBUG, "SO3LightSetSpotInnerAngle\n");
00785 #endif
00786
00787 int ang = MMpull(m);
00788 int l = MMget(m, 0);
00789 if ((l==NIL)||(ang==NIL))
00790 {
00791 MMset(m, 0, NIL);
00792 return 0;
00793 }
00794
00795 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00796 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00797 {
00798 MMset(m, 0, NIL);
00799 return 0;
00800 }
00801
00802 SLight* light = static_cast<SLight*>(node);
00803
00804 light->SetSpotlightInnerAngle(MTOF(ang));
00805
00806 MMset(m, 0, ITOM(1));
00807
00808 return 0;
00809 }
00810
00811
00821 int SO3LightSetSpotOuterAngle(mmachine m)
00822 {
00823 #ifdef SO3_DEBUG
00824 MMechostr(MSKDEBUG, "SO3LightSetSpotOuterAngle\n");
00825 #endif
00826
00827 int ang = MMpull(m);
00828 int l = MMget(m, 0);
00829 if ((l==NIL)||(ang==NIL))
00830 {
00831 MMset(m, 0, NIL);
00832 return 0;
00833 }
00834
00835 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00836 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00837 {
00838 MMset(m, 0, NIL);
00839 return 0;
00840 }
00841
00842 SLight* light = static_cast<SLight*>(node);
00843
00844 light->SetSpotlightOuterAngle(MTOF(ang));
00845
00846 MMset(m, 0, ITOM(1));
00847
00848 return 0;
00849 }
00850
00851
00861 int SO3LightSetSpotRange(mmachine m)
00862 {
00863 #ifdef SO3_DEBUG
00864 MMechostr(MSKDEBUG, "SO3LightSetSpotRange\n");
00865 #endif
00866
00867 int param = MMpull(m);
00868 int l = MMget(m, 0);
00869 if ((l==NIL)||(param==NIL))
00870 {
00871 MMset(m, 0, NIL);
00872 return 0;
00873 }
00874
00875 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00876 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00877 {
00878 MMset(m, 0, NIL);
00879 return 0;
00880 }
00881
00882 SLight* light = static_cast<SLight*>(node);
00883
00884 if((MMfetch(m,MTOP(param),0)==NIL) || (MMfetch(m,MTOP(param),1)==NIL) || (MMfetch(m,MTOP(param),2)==NIL))
00885 {
00886 MMset(m, 0, NIL);
00887 return 0;
00888 }
00889
00890 light->SetSpotlightInnerAngle(MTOF(MMfetch(m, MTOP(param), 0)));
00891 light->SetSpotlightOuterAngle(MTOF(MMfetch(m, MTOP(param), 1)));
00892 light->SetSpotlightFalloff(MTOF(MMfetch(m, MTOP(param), 2)));
00893
00894 MMset(m, 0, ITOM(1));
00895
00896 return 0;
00897 }
00898
00899
00908 int SO3LightGetSpotInnerAngle(mmachine m)
00909 {
00910 #ifdef SO3_DEBUG
00911 MMechostr(MSKDEBUG, "SO3LightGetSpotInnerAngle\n");
00912 #endif
00913
00914 int l = MMget(m, 0);
00915 if (l==NIL)
00916 {
00917 MMset(m, 0, NIL);
00918 return 0;
00919 }
00920
00921 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00922 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00923 {
00924 MMset(m, 0, NIL);
00925 return 0;
00926 }
00927
00928 SLight* light = static_cast<SLight*>(node);
00929
00930 float inner = light->GetSpotlightInnerAngle();
00931 MMset(m, 0, FTOM(inner));
00932
00933 return 0;
00934 }
00935
00936
00945 int SO3LightGetSpotOuterAngle(mmachine m)
00946 {
00947 #ifdef SO3_DEBUG
00948 MMechostr(MSKDEBUG, "SO3LightGetSpotOuterAngle\n");
00949 #endif
00950
00951 int l = MMget(m, 0);
00952 if (l==NIL)
00953 {
00954 MMset(m, 0, NIL);
00955 return 0;
00956 }
00957
00958 SNode* node = (SNode*) MMfetch(m, MTOP(l), 0);
00959 if (node->GetNodeType() != SNode::LIGHT_TYPE_ID)
00960 {
00961 MMset(m, 0, NIL);
00962 return 0;
00963 }
00964
00965 SLight* light = static_cast<SLight*>(node);
00966
00967 float f = light->GetSpotlightOuterAngle();
00968 MMset(m, 0, FTOM(f));
00969
00970 return 0;
00971 }
00972
00973
00977 #define NBLIGHTPKG 23
00978
00979
00983 char* LIGHTname[NBLIGHTPKG]=
00984 {
00985 "SO3LightCreate",
00986 "SO3LightSetType",
00987 "SO3LightGetType",
00988 "SO3LightSetDiffuseColor",
00989 "SO3LightGetDiffuseColor",
00990 "SO3LightSetPowerScale",
00991 "SO3LightSetShadowFarDistance",
00992 "SO3LightGetPowerScale",
00993 "SO3LightGetShadowFarDistance",
00994 "SO3LightSetVisible",
00995 "SO3LightGetVisible",
00996 "SO3LightSetAttenuation",
00997 "SO3LightSetAttenuationAuto",
00998 "SO3LightGetAttenuation",
00999 "SO3LightSetSpecularColor",
01000 "SO3LightGetSpecularColor",
01001 "SO3LightSetSpotFallOff",
01002 "SO3LightGetSpotFallOff",
01003 "SO3LightSetSpotInnerAngle",
01004 "SO3LightSetSpotOuterAngle",
01005 "SO3LightGetSpotInnerAngle",
01006 "SO3LightGetSpotOuterAngle",
01007 "SO3LightSetSpotRange"
01008 };
01009
01010
01014 int (*LIGHTFunc[NBLIGHTPKG])(mmachine m)=
01015 {
01016 SO3LightCreate,
01017 SO3LightSetType,
01018 SO3LightGetType,
01019 SO3LightSetDiffuseColor,
01020 SO3LightGetDiffuseColor,
01021 SO3LightSetPowerScale,
01022 SO3LightSetShadowFarDistance,
01023 SO3LightGetPowerScale,
01024 SO3LightGetShadowFarDistance,
01025 SO3LightSetVisible,
01026 SO3LightGetVisible,
01027 SO3LightSetAttenuation,
01028 SO3LightSetAttenuationAuto,
01029 SO3LightGetAttenuation,
01030 SO3LightSetSpecularColor,
01031 SO3LightGetSpecularColor,
01032 SO3LightSetSpotFallOff,
01033 SO3LightGetSpotFallOff,
01034 SO3LightSetSpotInnerAngle,
01035 SO3LightSetSpotOuterAngle,
01036 SO3LightGetSpotInnerAngle,
01037 SO3LightGetSpotOuterAngle,
01038 SO3LightSetSpotRange
01039 };
01040
01041
01045 int LIGHTnarg [NBLIGHTPKG]=
01046 {
01047 2,
01048 2,
01049 1,
01050 2,
01051 1,
01052 2,
01053 2,
01054 1,
01055 1,
01056 2,
01057 1,
01058 2,
01059 2,
01060 1,
01061 2,
01062 1,
01063 2,
01064 1,
01065 2,
01066 2,
01067 1,
01068 1,
01069 2
01070 };
01071
01072
01076 char* LIGHTType[NBLIGHTPKG]=
01077 {
01078 "fun [SO3_SCENE S] SO3_OBJECT",
01079 "fun [SO3_OBJECT I] I",
01080 "fun [SO3_OBJECT] I",
01081 "fun [SO3_OBJECT I] I",
01082 "fun [SO3_OBJECT] I",
01083 "fun [SO3_OBJECT F] I",
01084 "fun [SO3_OBJECT F] I",
01085 "fun [SO3_OBJECT] F",
01086 "fun [SO3_OBJECT] F",
01087 "fun [SO3_OBJECT I] I",
01088 "fun [SO3_OBJECT] I",
01089 "fun [SO3_OBJECT [F F F F]] I",
01090 "fun [SO3_OBJECT F] I",
01091 "fun [SO3_OBJECT] [F F F F]",
01092 "fun [SO3_OBJECT I] I",
01093 "fun [SO3_OBJECT] I",
01094 "fun [SO3_OBJECT F] I",
01095 "fun [SO3_OBJECT] F",
01096 "fun [SO3_OBJECT F] I",
01097 "fun [SO3_OBJECT F] I",
01098 "fun [SO3_OBJECT] F",
01099 "fun [SO3_OBJECT] F",
01100 "fun [SO3_OBJECT [F F F]] I"
01101 };
01102
01103
01109 int SCOLloadLight(mmachine m,cbmachine w)
01110 {
01111 return PKhardpak(m, "Light", NBLIGHTPKG, LIGHTname, LIGHTFunc, LIGHTnarg, LIGHTType);
01112 }
01113
01114
01119 int SCOLfreeLight()
01120 {
01121 return 0;
01122 }