TGC Codebase Backup



Librarie 1 by Serge Adjo

19th Jun 2009 7:34
Summary

various functions, algos, programmes, merged together in 'Librarie 1'. See the 'long description' to check the function listed in.



Description

1: convert .X files to .dbo



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    
// FUNCTION
	
	V_numero_E = 1
	V_TOTAL_E = 0
	V_FICHIER_$ = ""
	
	SYNC ON : SYNC RATE 60
	MAKE DIRECTORY "_1"
	PERFORM CHECKLIST FOR FILES
	
	FOR Z= 1 TO CHECKLIST QUANTITY()
// 		PRINT LEFT$( CHECKLIST STRING$(Z), LEN(CHECKLIST STRING$(Z))-2 )
		IF RIGHT$(CHECKLIST STRING$(Z),2) = ".x" OR RIGHT$(CHECKLIST STRING$(Z),2) = ".X"
			V_FICHIER_$ = LEFT$( CHECKLIST STRING$(Z), LEN(CHECKLIST STRING$(Z))-2 )
			IF FILE EXIST(V_FICHIER_$+".dbo") = 0 OR FILE EXIST(V_FICHIER_$+".DBO") = 0
				LOAD OBJECT CHECKLIST STRING$(Z),V_numero_E : SAVE OBJECT "_1\"+V_FICHIER_$+".dbo",V_numero_E : DELETE OBJECT V_numero_E
				INC V_TOTAL_E,1
			ENDIF
		ENDIF
	NEXT Z
	DO
		SET CURSOR 0,0
		PRINT "ECHAP POUR QUITTER"
		PRINT "CONVERSION TERMINEE:"
		PRINT V_TOTAL_E," FICHIER(S) SUR ",CHECKLIST QUANTITY()
		PRINT "DANS LE REPERTOIRE '_1'"
		SYNC
	LOOP
	WAIT KEY
	PRINT "CONVERSION TERMINEE"
// ENDFUNCTION