3D File Browser by Boxman3rd Jan 2004 17:36
|
---|
Summary This program is for viewing 3D Models in the .X format. Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Rem Project: 3dModelBrowser Rem Created: 1/2/2004 10:05:40 AM Rem By: Colin Edwards Rem if source is used for other things give me credit Rem ***** Main Source File ***** set dir "3DModels" loadfile: cls if 1=object exist(1) delete object 1 endif cls PERFORM CHECKLIST FOR FILES C=CHECKLIST QUANTITY() CLEAR ENTRY BUFFER dim real_number(C) arrow_pos=1 Up=0 Down=0 rem Display Selector Arrow And Files Do Cls w=1 For i=3 to C if Right$(CHECKLIST String$(i),1)="X" Text 25,(w)*10,STR$(w)+". "+CHECKLIST String$(i) real_number(w)=i w=w+1 endif if Right$(CHECKLIST String$(i),1)="x" Text 25,(w)*10,STR$(w)+". "+CHECKLIST String$(i) real_number(w)=i w=w+1 endif next i Text 0,Arrow_pos*10,"-->" A=arrow_pos if upkey()=1 Up=Up+1 if Up=10 arrow_pos=arrow_pos-1 Up=0 Endif endif if downkey()=1 Down=Down+1 if Down=10 arrow_pos=arrow_pos+1 Down=0 endif endif if Returnkey()=1 Goto load endif if arrow_pos<1 arrow_pos=1 endif if arrow_pos=w arrow_pos=w-1 endif Loop load: B=real_number(A) Rem Change this directory to what needed LOAD OBJECT "C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\3dModelBrowser\3DModels\"+CHECKLIST String$(B),1 set object smoothing 1,100 rem Display Models Do Text 0,10,"Press Shift to load another model" if rightkey()=1 Turn object left 1,1 endif if leftkey()=1 Turn object right 1,1 endif if downkey()=1 move object down 1,1 endif if upkey()=1 move object up 1,1 endif if Shiftkey()=1 goto loadfile endif loop |