Commit MetaInfo

Révision6364245a8055074d6205e55f6ca2fbf6dccd362c (tree)
l'heure2013-03-08 00:09:59
AuteurFace
CommiterFace

Message de Log

Merged with Artlav

Change Summary

Modification

diff -r 009d159fcd0c -r 6364245a8055 Orbitersdk/samples/genericvessel/GenericVessel.cpp
--- a/Orbitersdk/samples/genericvessel/GenericVessel.cpp Thu Mar 07 12:31:06 2013 +0100
+++ b/Orbitersdk/samples/genericvessel/GenericVessel.cpp Thu Mar 07 16:09:59 2013 +0100
@@ -7,19 +7,19 @@
77 #define ORBITER_MODULE
88 #define _CRT_SECURE_NO_WARNINGS
99 #define _CRT_NONSTDC_NO_DEPRECATE
10-#define SPACECRAFTCLASS "spacecraft\\spacecraft"
10+#define SPACECRAFTCLASS "spacecraft\\spacecraft"
1111 #define SPACECRAFTINIPATH ".\\Config\\Spacecraft\\%s.ini"
12-#define CONFIGDIRTAG "ConfigDir"
13-#define MESHDIRTAG "MeshDir"
12+#define CONFIGDIRTAG "ConfigDir"
13+#define MESHDIRTAG "MeshDir"
1414 #define TEXTUREDIRTAG "TextureDir"
1515 #define HIGHTEXDIRTAG "HightexDir"
1616 #define SCENARIODIRTAG "ScenarioDir"
17-#define CONFIGDIRDEFAULT ".\\Config\\"
18-#define MESHDIRDEFAULT ".\\Meshes\\"
19-#define TEXTUREDIRDEFAULT ".\\Textures\\"
20-#define HIGHTEXDIRDEFAULT ".\\Textures2\\"
17+#define CONFIGDIRDEFAULT ".\\Config\\"
18+#define MESHDIRDEFAULT ".\\Meshes\\"
19+#define TEXTUREDIRDEFAULT ".\\Textures\\"
20+#define HIGHTEXDIRDEFAULT ".\\Textures2\\"
2121 #define SCENARIODIRDEFAULT ".\\Scenarios\\"
22-#define CONFIGPATH "%s%s.cfg"
22+#define CONFIGPATH "%s%s.cfg"
2323 #define CONFIG2PATH "%sVessels\\%s.cfg"
2424 #define ORBITERCONFIG "Orbiter.cfg"
2525 #define CONFIGEXCEPTION "abort: neither vessel configuration \"%s%s.cfg\" nor \"%sVessels\\%s.cfg\" was found!"
@@ -93,7 +93,8 @@
9393 msh_idh=NULL;
9494 ani=NULL;
9595 att_h=NULL;
96-}
96+}
97+//############################################################################//
9798 GenericVessel::~GenericVessel()
9899 {
99100 delete [] ph_h;
@@ -112,7 +113,7 @@
112113 }
113114 //############################################################################//
114115 //############################################################################//
115-void GenericVessel::clbkSetClassCaps (FILEHANDLE cfg)
116+void GenericVessel::clbkSetClassCaps(FILEHANDLE cfg)
116117 {
117118 int i,j,g,k,n,a,b,arm_grap;
118119 THRUSTER_HANDLE **grps;
@@ -166,7 +167,7 @@
166167 delete [] cn;
167168 delete [] iniFile;
168169
169- //Attachments
170+ //Attachments
170171 att_h=new ATTACHMENTHANDLE[sc3.Config.attcnt];
171172 for(i=0;i<sc3.Config.attcnt;i++)att_h[i]=CreateAttachment(sc3.Data.att[i].ischild!=0,sc3.Data.att[i].pos,sc3.Data.att[i].dir,sc3.Data.att[i].rot,sc3.Data.att[i].id,sc3.Data.att[i].loose!=0);
172173
@@ -222,7 +223,7 @@
222223 for(i=0;i<sc3.Config.thgcnt;i++){grps[i]=new THRUSTER_HANDLE[sc3.Config.thcnt];grpc[i]=0;}
223224 th_h=new THRUSTER_HANDLE[sc3.Config.thcnt];
224225 thg_h=new THGROUP_HANDLE[sc3.Config.thgcnt];
225-
226+
226227 for(i=0;i<sc3.Config.thcnt;i++){
227228 th_h[i]=CreateThruster(sc3.Data.th[i].pos,sc3.Data.th[i].dir,sc3.Data.th[i].maxthr,ph_h[sc3.Data.th[i].phid],sc3.Data.th[i].isp,sc3.Data.th[i].ispref,sc3.Data.th[i].pref);
228229 for(j=0;j<8;j++){
@@ -254,6 +255,7 @@
254255 for(i=0;i<sc3.Config.mshcnt;i++){
255256 if(sc3.Data.msh[i].typ==0)SetMeshVisibilityMode(msh_idh[i]=AddMesh(msh_h[i]=oapiLoadMeshGlobal(sc3.Data.msh[i].nam),&sc3.Data.msh[i].off),sc3.Data.msh[i].vis);
256257 }
258+ for(i=0;i<sc3.Data.pay[i].mesh_cnt;i++)DelMesh(sc3.Data.pay[i].mesh+i); //Delete payload meshes again, native parser does it, anyway
257259
258260 //Animations
259261 ani=new genericvessel_animinfo[sc3.Config.anicnt];
@@ -325,7 +327,7 @@
325327 if(sc3.Data.air[i].tp==1)CreateControlSurface2((AIRCTRL_TYPE)sc3.Data.air[i].align,sc3.Data.air[i].s,sc3.Data.air[i].c,sc3.Data.air[i].v,sc3.Data.air[i].axis,sc3.Data.air[i].anim!=-1?ani[sc3.Data.air[i].anim].id:(UINT)-1);
326328 if(sc3.Data.air[i].tp==2)CreateVariableDragElement(sc3.Data.air[i].anim!=-1?&ani[sc3.Data.air[i].anim].proc:NULL,sc3.Data.air[i].c,sc3.Data.air[i].v);
327329 }
328-
330+
329331 //Do the new native API callback now
330332 sc3.clbkSetClassCaps(cfg);
331333 }
@@ -368,8 +370,8 @@
368370 #endif
369371
370372 //Animation states (not SC3 compatible)
371- if(!strnicmp(line,"ANIM_",5)){
372- sscanf(line+5,"%d",&i);
373+ if(!strnicmp(line,"SEQ",3)){
374+ sscanf(line+4,"%d",&i);
373375 if((i>=0)&&(i<sc3.Config.anicnt)){
374376 n=0;
375377 if(i>=10)n=1;
@@ -399,7 +401,7 @@
399401 //Animation states (not SC3 compatible)
400402 for(i=0;i<sc3.Config.anicnt;i++){
401403 sprintf(cbuf,"%d %0.4f",ani[i].status,ani[i].proc);
402- sprintf(nbuf,"ANIM_%d",i);
404+ sprintf(nbuf,"SEQ %d",i);
403405 oapiWriteScenario_string(scn,nbuf,cbuf);
404406 }
405407
@@ -411,7 +413,7 @@
411413 }
412414 //############################################################################//
413415 //############################################################################//
414-bool GenericVessel::clbkDrawHUD(int mode, const HUDPAINTSPEC *hps, oapi::Sketchpad *skp)
416+bool GenericVessel::clbkDrawHUD(int mode, const HUDPAINTSPEC *hps,oapi::Sketchpad *skp)
415417 {
416418 VESSEL3::clbkDrawHUD(mode,hps,skp);
417419 sc3.RenderHUD(skp);
@@ -477,21 +479,14 @@
477479
478480 if(!down)return 0;
479481
480-
481482 if(KEYMOD_ALT(kstate)){
482- switch(key){
483- case OAPI_KEY_0:
484- case OAPI_KEY_1:
485- case OAPI_KEY_2:
486- case OAPI_KEY_3:
487- case OAPI_KEY_4:
488- case OAPI_KEY_5:
489- case OAPI_KEY_6:
490- case OAPI_KEY_7:
491- case OAPI_KEY_8:
492- case OAPI_KEY_9:sc3.EVA((key-OAPI_KEY_1+1)%10);break; //Takes advantage of OAPI_KEY_1 to OAPI_KEY_0 being linear enumerated
493- }
483+ //UMMU EVA handling
484+ if((key>=OAPI_KEY_1)&&(key<=OAPI_KEY_0)){
485+ i=(key-OAPI_KEY_1+1)%10;
486+ sc3.EVA(i); //Takes advantage of OAPI_KEY_1 to OAPI_KEY_0 being linear enumerated
487+ }
494488 }else{
489+ //Robotic arm handling
495490 if(sc3.Config.armcnt){
496491 if(KEYMOD_SHIFT(kstate)){
497492 if(arm_on)switch(key){
@@ -503,6 +498,7 @@
503498 case OAPI_KEY_SPACE:arm_on=!arm_on;arm_blank=1;break;
504499 }
505500 }
501+ //Attachment handling
506502 if(sc3.Config.attcnt){
507503 if(KEYMOD_SHIFT(kstate)){
508504 if(att_on)switch(key){
@@ -515,6 +511,7 @@
515511 }
516512 }
517513 if(key==OAPI_KEY_J)sc3.Jettison();
514+ //Animation handling
518515 for(i=0;i<sc3.Config.anicnt;i++)if(ani[i].tp==0){
519516 DWORD mod=ani[i].trigkey >> 8;
520517 if(!mod | KEYDOWN(kstate, mod))if(key==(ani[i].trigkey & 0xFF)){
@@ -574,8 +571,15 @@
574571 //Animations
575572 for(i=0;i<sc3.Config.anicnt;i++)if(abs(ani[i].status)==1){
576573 double da=simdt*ani[i].spd;
577- if(ani[i].repeat){
574+ if(ani[i].repeat==1){
578575 ani[i].proc=fmod(ani[i].proc+da,1);
576+ }else if(ani[i].repeat==2){
577+ if(ani[i].status==1){
578+ if(ani[i].proc+da>1.0){ani[i].status=-1;ani[i].proc=(ani[i].proc+da)-1.0;}else ani[i].proc+=da;
579+ }
580+ if(ani[i].status==-1){
581+ if(ani[i].proc-da<0.0){ani[i].status=1;ani[i].proc=-(ani[i].proc-da);}else ani[i].proc-=da;
582+ }
579583 }else{
580584 if(ani[i].status==-1){
581585 if(ani[i].proc>0.0)ani[i].proc=max(0.0,ani[i].proc-da);
diff -r 009d159fcd0c -r 6364245a8055 Orbitersdk/samples/genericvessel/GenericVessel.h
--- a/Orbitersdk/samples/genericvessel/GenericVessel.h Thu Mar 07 12:31:06 2013 +0100
+++ b/Orbitersdk/samples/genericvessel/GenericVessel.h Thu Mar 07 16:09:59 2013 +0100
@@ -3,12 +3,10 @@
33 //Modified 2013-02-10 by Friedrich Kastner-Masilko
44 //Dynamic vessel DLL h
55 //############################################################################//
6-
76 #pragma once
87 #include "Orbitersdk.h"
98 #include "SC3Data.h"
109 #define CUSTOMDIRSLENGTH 1024
11-
1210 //############################################################################//
1311 //Vessel class
1412 class GenericVessel:public VESSEL3{
diff -r 009d159fcd0c -r 6364245a8055 Orbitersdk/samples/genericvessel/xves.h
--- a/Orbitersdk/samples/genericvessel/xves.h Thu Mar 07 12:31:06 2013 +0100
+++ b/Orbitersdk/samples/genericvessel/xves.h Thu Mar 07 16:09:59 2013 +0100
@@ -1,7 +1,7 @@
11 //############################################################################//
22 //Made in 2005-2013 by Artyom Litvinovich
33 //Modified 2013-02-10 by Friedrich Kastner-Masilko
4-//Dynamic vessel DLL h
4+//Dynamic vessel parser DLL h
55 //############################################################################//
66
77 struct crgba{
@@ -38,9 +38,11 @@
3838 int tdcnt;
3939 int beaccnt;
4040 int dockcnt;
41+ int crewcnt;
4142 int aircnt;
4243 int attcnt;
4344 int armcnt;
45+ int paycnt;
4446 };
4547 //############################################################################//
4648 //Fuel tank
@@ -144,6 +146,20 @@
144146 char name[255];
145147 };
146148 //############################################################################//
149+//Payload description
150+struct genericvessel_payinfo{
151+ int mesh,mesh_cnt;
152+ double mass;
153+ VECTOR3 speed,rot_speed;
154+ char module[255],name[255];
155+};
156+//############################################################################//
157+//Crew info
158+struct genericvessel_crewinfo{
159+ VECTOR3 air_pos,eva_rot,air_siz; //Airlock position, rotation, ...
160+ int maxcrew;
161+};
162+//############################################################################//
147163 //Airfoil description
148164 struct genericvessel_airinfo{
149165 int tp,anim,align,axis;
@@ -162,13 +178,11 @@
162178 genericvessel_tdinfo *td;
163179 genericvessel_beacinfo *beac;
164180 genericvessel_dockinfo *dock;
181+ genericvessel_crewinfo *crew;
165182 genericvessel_airinfo *air;
166183 genericvessel_attachinfo *att;
167184 genericvessel_arminfo *arm;
168-
169- //Buffer for dynamic mesh - Station Shipyard legacy
170- void *dynbuf;
171- int dbs;
185+ genericvessel_payinfo *pay;
172186 };
173187 //############################################################################//
174188 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
diff -r 009d159fcd0c -r 6364245a8055 Orbitersdk/samples/xves/os_gen.pas
--- a/Orbitersdk/samples/xves/os_gen.pas Thu Mar 07 12:31:06 2013 +0100
+++ b/Orbitersdk/samples/xves/os_gen.pas Thu Mar 07 16:09:59 2013 +0100
@@ -16,7 +16,7 @@
1616
1717 function os_addfuel(mass:double):integer;
1818
19-function os_addmsh(nam:string;vis:dword;off:vec):integer;
19+function os_addmsh(nam:string;vis:dword;off:vec):integer;
2020
2121 function os_addanim(key:dword;tp:integer;spd,init:double):integer;
2222 function os_addanimgrp(n:integer;grs:array of integer):integer;
@@ -29,7 +29,8 @@
2929 function os_addtd(pta,ptb,ptc:vec):integer;
3030 function os_addair(tp,anim,align,axis:integer;cc,s,a:double;v:vec):integer;
3131 function os_addatt(child,loose:integer;range:double;pos,dir,rot:vec;name,id:string):integer;
32-function os_addarm(range_low,range_high:double;seq,grap_seq,grap_attach:integer):integer;
32+function os_addarm(range_low,range_high:double;seq,grap_seq,grap_attach:integer):integer;
33+function os_addpay(msh,msh_cnt:integer;mass:double;nam,md:string;spd,rot:vec):integer;
3334
3435 function os_setdefatt(thr:double;phid:integer;isp:double):integer;
3536 //############################################################################//
@@ -52,7 +53,11 @@
5253 getmem(d_od.arm,s_oc.armcnt*sizeof(oshdll_arminfo));
5354 getmem(d_od.beac,s_oc.beaccnt*sizeof(oshdll_beacinfo));
5455 getmem(d_od.dock,s_oc.dockcnt*sizeof(oshdll_dockinfo));
56+ getmem(d_od.crew,s_oc.crewcnt*sizeof(oshdll_crewinfo));
57+ getmem(d_od.pay,s_oc.paycnt*sizeof(oshdll_payinfo));
5558
59+ for i:=0 to s_oc.paycnt-1 do d_od.pay[i] :=s_od.pay[i];
60+ for i:=0 to s_oc.crewcnt-1 do d_od.crew[i]:=s_od.crew[i];
5661 for i:=0 to s_oc.dockcnt-1 do d_od.dock[i]:=s_od.dock[i];
5762 for i:=0 to s_oc.beaccnt-1 do d_od.beac[i]:=s_od.beac[i];
5863 for i:=0 to s_oc.tdcnt-1 do d_od.td[i] :=s_od.td[i];
@@ -88,11 +93,21 @@
8893 begin
8994 main_cfg.exhcnt:=0;main_cfg.propcnt:=0;main_cfg.thcnt:=0;main_cfg.thgcnt:=0;
9095 main_cfg.mshcnt:=0;main_cfg.anicnt:=0;main_cfg.vccnt:=0;main_cfg.beaccnt:=0;
91- main_cfg.dockcnt:=0;main_cfg.tdcnt:=0;main_cfg.aircnt:=0;main_cfg.attcnt:=0; main_cfg.armcnt:=0;
96+ main_cfg.dockcnt:=0;main_cfg.crewcnt:=0;main_cfg.tdcnt:=0;main_cfg.aircnt:=0;
97+ main_cfg.attcnt:=0;main_cfg.armcnt:=0;main_cfg.paycnt:=0;
9298 setlength(main_dat.prop,0);setlength(main_dat.th,0);setlength(main_dat.msh,0);
9399 setlength(main_dat.anim,0);setlength(main_dat.exh,0);setlength(main_dat.vc,0);
94- setlength(main_dat.beac,0);setlength(main_dat.dock,0);setlength(main_dat.td,0);
95- setlength(main_dat.air,0);setlength(main_dat.att,0);setlength(main_dat.arm,0);
100+ setlength(main_dat.beac,0);setlength(main_dat.dock,0);setlength(main_dat.crew,0);
101+ setlength(main_dat.td,0);setlength(main_dat.air,0);setlength(main_dat.att,0);setlength(main_dat.arm,0);
102+ setlength(main_dat.pay,0);
103+
104+ main_cfg.crewcnt:=1;
105+ setlength(main_dat.crew,1);
106+ main_dat.crew[0].maxcrew:=0;
107+ maxcrew:=main_dat.crew[0].maxcrew;
108+ main_dat.crew[0].air_pos:=zvec;
109+ main_dat.crew[0].air_siz:=evec;
110+ main_dat.crew[0].eva_rot:=tvec(1,0,0);
96111 end;
97112 //############################################################################//
98113 procedure os_makecleanvess;
@@ -337,6 +352,25 @@
337352
338353 main_cfg.dockcnt:=c+1;
339354 result:=c;
355+end;
356+//############################################################################//
357+function os_addpay(msh,msh_cnt:integer;mass:double;nam,md:string;spd,rot:vec):integer;
358+var c,i:integer;
359+begin
360+ c:=length(main_dat.pay);
361+ setlength(main_dat.pay,c+1);
362+ main_dat.pay[c].mesh:=msh;
363+ main_dat.pay[c].mesh_cnt:=msh_cnt;
364+ main_dat.pay[c].mass:=mass;
365+ for i:=0 to length(nam)-1 do main_dat.pay[c].name[i]:=nam[i+1];
366+ main_dat.pay[c].name[length(nam)]:=#0;
367+ for i:=0 to length(md)-1 do main_dat.pay[c].module[i]:=md[i+1];
368+ main_dat.pay[c].module[length(md)]:=#0;
369+ main_dat.pay[c].speed:=spd;
370+ main_dat.pay[c].rot_speed:=rot;
371+
372+ main_cfg.paycnt:=c+1;
373+ result:=c;
340374 end;
341375 //############################################################################//
342376 function os_addair(tp,anim,align,axis:integer;cc,s,a:double;v:vec):integer;
diff -r 009d159fcd0c -r 6364245a8055 Orbitersdk/samples/xves/os_sc3_reader.pas
--- a/Orbitersdk/samples/xves/os_sc3_reader.pas Thu Mar 07 12:31:06 2013 +0100
+++ b/Orbitersdk/samples/xves/os_sc3_reader.pas Thu Mar 07 16:09:59 2013 +0100
@@ -43,7 +43,7 @@
4343
4444 airfoils:array[0..7]of integer;
4545
46- cur_dock,cur_att,last_arm:integer;
46+ cur_dock,cur_pay,cur_att,last_arm:integer;
4747 rot_axis,rot_cw,lin_axis,lin_cw:integer;
4848 end;
4949 pparse_info_rec=^parse_info_rec;
@@ -160,6 +160,12 @@
160160 end;
161161 end;
162162
163+ if copy(sec,1,8)='payload_' then begin
164+ if p.etc_meshname<>'' then begin
165+ p.etc_meshname:=trim(AnsiReplaceStr(AnsiReplaceStr(p.etc_meshname,'''',' '),'"',' '));
166+ os_addmsh(p.etc_meshname,MESHVIS_ALWAYS,p.off);
167+ end;
168+ end;
163169 end;
164170 //############################################################################//
165171 procedure ck_airf(p:pparse_info_rec;c:integer);
@@ -222,6 +228,35 @@
222228 if par='land_pt3' then begin p.w1:=true;main_dat.td[1].ptc:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));end;
223229 end;
224230 //############################################################################//
231+procedure parse_ummu(p:pparse_info_rec;par:string);
232+begin
233+ if par='maxseats' then main_dat.crew[0].maxcrew:=vali(p.spc[1]);
234+ if par='airlock_position' then main_dat.crew[0].air_pos:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));
235+ if par='airlock_size' then main_dat.crew[0].air_siz:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));
236+ if par='eva_rot' then main_dat.crew[0].eva_rot:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));
237+end;
238+//############################################################################//
239+procedure parse_payload(p:pparse_info_rec;par:string);
240+var ss:string;
241+j:integer;
242+begin
243+ if par='meshname' then p.etc_meshname:=p.spc[1];
244+ if par='off' then p.off:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));
245+ if par='name' then begin
246+ ss:=trim(AnsiReplaceStr(AnsiReplaceStr(p.spc[1],'''',' '),'"',' '));
247+ for j:=0 to length(ss)-1 do main_dat.pay[p.cur_pay].name[j]:=ss[j+1];
248+ main_dat.pay[p.cur_pay].name[length(ss)]:=#0;
249+ end;
250+ if par='module' then begin
251+ ss:=trim(AnsiReplaceStr(AnsiReplaceStr(p.spc[1],'''',' '),'"',' '));
252+ for j:=0 to length(ss)-1 do main_dat.pay[p.cur_pay].module[j]:=ss[j+1];
253+ main_dat.pay[p.cur_pay].module[length(ss)]:=#0;
254+ end;
255+ if par='mass' then main_dat.pay[p.cur_pay].mass:=vale(p.spc[1]);
256+ if par='speed' then main_dat.pay[p.cur_pay].speed:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));
257+ if par='rot_speed' then main_dat.pay[p.cur_pay].rot_speed:=tvec(vale(p.spc[1]),vale(p.spc[2]),vale(p.spc[3]));
258+end;
259+//############################################################################//
225260 procedure parse_vc(p:pparse_info_rec;par:string);
226261 begin
227262 if par='meshname' then p.vc_meshname:=p.spc[1];
@@ -397,11 +432,17 @@
397432 applysec(sec,p);
398433 sec:=lowercase(s);
399434
400- p.cur_dock:=-1;
435+ p.cur_dock:=-1;
436+ p.cur_pay:=-1;
401437 if copy(sec,1,5)='dock_' then p.cur_dock:=os_adddock(zvec,zvec,zvec);
438+ if copy(sec,1,8)='payload_' then p.cur_pay:=os_addpay(0,0,1,'','',zvec,zvec);
402439 p.cur_att:=-1;
403440 if(copy(sec,1,13)='child_attach_') then p.cur_att:=os_addatt(1,0,0,zvec,zvec,zvec,'','');
404441 if(copy(sec,1,14)='parent_attach_')then p.cur_att:=os_addatt(0,0,0,zvec,zvec,zvec,'','');
442+ if sec='ummu' then begin
443+ main_cfg.crewcnt:=1;
444+ setlength(main_dat.crew,1);
445+ end;
405446
406447 p.visible:=0;p.mfd_l:=-1;p.mfd_r:=-1;p.hud:=-1;
407448 p.hud_siz:=0;
@@ -489,6 +530,7 @@
489530 p.men:=-1;p.hen:=-1;p.ren:=-1;p.aen:=-1;
490531
491532 p.cur_dock:=0;
533+ p.cur_pay:=0;
492534 p.cur_att:=0;
493535 p.last_arm:=-1;
494536 end;
@@ -529,7 +571,8 @@
529571 par:=trim(lowercase(p.spc[0]));
530572
531573 if sec='config' then begin parse_config(@p,par);continue;end;
532- if sec='vc' then begin parse_vc(@p,par);continue;end;
574+ if sec='vc' then begin parse_vc(@p,par);continue;end;
575+ if sec='ummu' then begin parse_ummu(@p,par);continue;end;
533576 if sec='aerodynamics' then begin parse_aerodynamics(@p,par);continue;end;
534577 if(copy(sec,1,8)='ex_main_')or(copy(sec,1,9)='ex_retro_')or(copy(sec,1,9)='ex_hover_')or(copy(sec,1,7)='ex_att_') then begin parse_exhaust(@p,par);continue;end;
535578 if copy(sec,1,5)='dock_' then begin parse_dock(@p,par);continue;end;
@@ -537,6 +580,7 @@
537580 if copy(sec,1,9)='anim_seq_' then begin parse_anim_seq(@p,par);continue;end;
538581 if(copy(sec,1,13)='child_attach_')or(copy(sec,1,14)='parent_attach_')then begin parse_attach(@p,par);continue;end;
539582 if copy(sec,1,10)='anim_comp_' then begin parse_anim_comp(@p,par);continue;end;
583+ if copy(sec,1,8)='payload_' then begin parse_payload(@p,par);continue;end;
540584 end;
541585 end;
542586 until bp>=bs;
diff -r 009d159fcd0c -r 6364245a8055 Orbitersdk/samples/xves/os_var.pas
--- a/Orbitersdk/samples/xves/os_var.pas Thu Mar 07 12:31:06 2013 +0100
+++ b/Orbitersdk/samples/xves/os_var.pas Thu Mar 07 16:09:59 2013 +0100
@@ -79,9 +79,11 @@
7979 tdcnt:integer;
8080 beaccnt:integer;
8181 dockcnt:integer;
82+ crewcnt:integer;
8283 aircnt:integer;
8384 attcnt:integer;
84- armcnt:integer;
85+ armcnt:integer;
86+ paycnt:integer;
8587 end;
8688 poshdll_config=^oshdll_config;
8789 oshdll_propinfo=record
@@ -184,6 +186,7 @@
184186 end;
185187 aoshdll_attachinfo=array[0..10000]of oshdll_attachinfo;
186188 paoshdll_attachinfo=^aoshdll_attachinfo;
189+
187190 oshdll_arminfo=packed record
188191 range_low,range_high:double;
189192 seq,grap_seq,grap_attach:integer;
@@ -192,6 +195,22 @@
192195 end;
193196 aoshdll_arminfo=array[0..10000]of oshdll_arminfo;
194197 paoshdll_arminfo=^aoshdll_arminfo;
198+
199+oshdll_payinfo=packed record
200+ mesh,mesh_cnt:integer;
201+ mass:double;
202+ speed,rot_speed:vec;
203+ module,name:array[0..254]of char;
204+end;
205+aoshdll_payinfo=array[0..10000]of oshdll_payinfo;
206+paoshdll_payinfo=^aoshdll_payinfo;
207+
208+oshdll_crewinfo=packed record
209+ air_pos,eva_rot,air_siz:vec;
210+ maxcrew:integer;
211+end;
212+aoshdll_crewinfo=array[0..10000]of oshdll_crewinfo;
213+paoshdll_crewinfo=^aoshdll_crewinfo;
195214 oshdll_airinfo=packed record
196215 tp,anim,align,axis:integer;
197216 c,s,a:double;
@@ -211,11 +230,11 @@
211230 td:array of oshdll_tdinfo;
212231 beac:array of oshdll_beacinfo;
213232 dock:array of oshdll_dockinfo;
233+ crew:array of oshdll_crewinfo;
214234 air:array of oshdll_airinfo;
215235 att:array of oshdll_attachinfo;
216236 arm:array of oshdll_arminfo;
217- dynbuf:pointer;
218- dbs:integer;
237+ pay:array of oshdll_payinfo;
219238 end;
220239 poshdll_data=^oshdll_data;
221240
@@ -229,9 +248,11 @@
229248 td:paoshdll_tdinfo;
230249 beac:paoshdll_beacinfo;
231250 dock:paoshdll_dockinfo;
251+ crew:paoshdll_crewinfo;
232252 air:paoshdll_airinfo;
233253 att:paoshdll_attachinfo;
234254 arm:paoshdll_arminfo;
255+ pay:paoshdll_payinfo;
235256 dynbuf:pointer;
236257 dbs:integer;
237258 end;
@@ -242,6 +263,9 @@
242263 main_cfg:oshdll_config;
243264 main_dat:oshdll_data;
244265 anim_st:array of integer;
266+
267+maxcrew:integer;
268+
245269 //############################################################################//
246270 function tdcrgba(r,g,b,a:single):crgba;
247271 function max2(a,b:double):double;
Afficher sur ancien navigateur de dépôt.