-
Notifications
You must be signed in to change notification settings - Fork 2
/
CFGTO3DS.SOF
99 lines (92 loc) · 1.85 KB
/
CFGTO3DS.SOF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
DECLARE SUB initialize ()
DECLARE FUNCTION nospc$ (a$)
'|||||||||||||||||||||||CFG|||||||||||||||||||||||||||||||
CLS
INPUT "3DS slide file name(for characters)"; fl$
INPUT "Start"; starts%
INPUT "Ends"; ends%
n% = ends% - starts% + 1
fl1$ = fl$ + ".3ds"
INPUT "Character group name"; ch$
OPEN "B", #1, fl1$
fl2$ = nospc$(ch$ + STR$(starts%))
fl2$ = fl2$ + ".cfg"
OPEN "B", #2, fl2$
SEEK #2, 1
read$ = INPUT$(4, #2)
PUT #1, 1, read$
read$ = CHR$(n% MOD 256) + CHR$(INT(n% / 256))
PUT #1, 5, read$
pos1& = 7
CLOSE #2
PRINT "Now combining starts."
FOR i% = starts% TO ends%
PRINT "File"; i%; ":"
cfg$ = nospc$(ch$ + STR$(i%) + ".cfg")
PRINT "CFG file name : "; cfg$
k$ = INPUT$(1)
PRINT "Adding . . ."
OPEN "B", #2, cfg$
FOR i& = 5 TO LOF(2)
SEEK #2, i&
read$ = INPUT$(1, #2)
PUT #1, pos1&, read$
pos1& = pos1& + 1
NEXT
PRINT "Added."
CLOSE #2
k$ = INPUT$(1)
NEXT
PRINT "All done."
CLOSE #1
k$ = INPUT$(1)
PRINT "Check."
k$ = INPUT$(1)
SCREEN 13
initialize
INPUT "Time gap"; t!
OPEN "B", #1, fl1$
SEEK #1, 1
read$ = INPUT$(2, #1)
xres& = ASC(LEFT$(read$, 1)) + ASC(RIGHT$(read$, 1)) * 256
read$ = INPUT$(2, #1)
yres& = ASC(LEFT$(read$, 1)) + ASC(RIGHT$(read$, 1)) * 256
read$ = INPUT$(2, #1)
slds% = ASC(LEFT$(read$, 1)) + ASC(RIGHT$(read$, 1)) * 256
pos1& = 7
FOR k% = 1 TO slds%
FOR j% = yres& TO 0 STEP -1
FOR i% = 0 TO xres&
SEEK #1, pos1&
LINE (i%, j%)-(i%, j%), ASC(INPUT$(1, #1) + CHR$(0))
pos1& = pos1& + 1
NEXT
NEXT
FOR dummy% = 1 TO t!
SOUND 21000, .5
NEXT
NEXT
CLOSE #1
k$ = INPUT$(1)
SYSTEM
SUB initialize
FOR i% = 0 TO 251
c% = i%
r% = INT(c% / 36)
c% = c% - (36 * r%)
g% = INT(c% / 6)
c% = c% - (6 * g%)
b% = c%
r% = r% * 9
g% = g% * 9
b% = b% * 9
PALETTE i%, 65536 * b% + 256 * g% + r%
NEXT
END SUB
FUNCTION nospc$ (a$)
FOR i% = 1 TO LEN(a$)
b$ = MID$(a$, i%, 1)
IF (b$ <> " ") THEN c$ = c$ + b$
NEXT
nospc$ = c$
END FUNCTION