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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
-
|
|
!
-
|
|
|
|
-
|
|
!
-
|
-
|
!
|
#ifndef __WINMM__
#uselib "winmm"
#func global timeGetTime "timeGetTime"
#endif
#ifndef _Mod_Fake_Transition_
#define global _Mod_Fake_Transition_
#module "_Fake_Transition_"
#enum cTRANS_BUF = 256 #enum cTRANS_MSK
#enum cTRANS_TMP
Dim fTRANS_VAL = -1
#defcfunc GetCount
timeGetTime
Return stat
#deffunc _FakeFade int pID, int pTime, int pAccel, int pX, int pY, int pW, int pH
If (pID<0)|(pTime<1){Return 0}
Dim tmp, 6 : mRef buf, 67 tmp = buf.18, buf.27, buf.28, buf.33, buf.34, buf.35, buf.65
i = 0, 0, buf.1, buf.2, 0, 0, (pX>0)*pX, (pY>0)*pY
If (pW<i.2)&(pW>0){i.2 = pW} : If i.2+i.6>buf.1{i.2 = buf.1 - i.6}
If (pH<i.3)&(pH>0){i.3 = pH} : If i.3+i.7>buf.2{i.3 = buf.2 - i.7}
gSel pID : i.0 = gInfo_WinX, gInfo_WinY
If i.0<i.2{i.2 = i.0} else {i.0 = i.2}
If i.1<i.3{i.3 = i.1} else {i.1 = i.3}
Buffer cTRANS_BUF, i.2<<1, i.3<<1
gMode 0, i.2, i.3 : Pos i.2, 0 : gCopy tmp.0, i.6, i.7
Pos 0, i.3 : gCopy pID : Pos 0, 0
i.0 = Limit(pAccel, -256, 256)
i.8 = (256-i.0)<<9, i.0<<9
gSel tmp.0 : gMode 0, i.2, i.3 : Pos i.6, i.7 : Redraw 1
i = 0, 0 : i.4 = GetCount(), 0
Repeat i.0 = (GetCount()-i.4) i.0 = (((i.0*i.9/pTime)+i.8)*i.0>>9)/pTime
If i>254{Break} If i.0=i.1{aWait 5 : Continue}
i.1 = i.0 : i.5++ : gSel cTRANS_BUF
gMode 1, i.2, i.3 : gCopy cTRANS_BUF, i.2 gMode 3, i.2, i.3, i.0 gCopy cTRANS_BUF,, i.3
gSel tmp.0 : gCopy cTRANS_BUF : aWait 5
Loop
gSel tmp.0 : gCopy pID
mRef buf,67 : buf.27 = tmp.1, tmp.2 buf.33 = tmp.3, tmp.4, tmp.5 : buf.65 = tmp.6
Dim buf : buf = i.5 : Dim i : i = gInfo_Sel : Dim tmp
Buffer cTRANS_BUF, 1, 1 : gSel i
Return buf
#deffunc _FakeScroll int pID, int pRule, int pTime, int pAccel, int pX, int pY, int pW, int pH
If (pID<0)|(pTime<1){Return 0}
If pRule<1{_FakeFade pID, pTime, pAccel, pX, pY, pW, pH : Return stat}
Dim tmp, 7 :mRef buf, 67 tmp = buf.18, buf.27, buf.28, buf.33, buf.34, buf.35, buf.65
i = 0, 0, buf.1, buf.2, 0, 0, (pX>0)*pX, (pY>0)*pY, 0, 0, 0
If (pW<i.2)&(pW>0){i.2 = pW} : If i.2+i.6>buf.1{i.2 = buf.1 - i.6}
If (pH<i.3)&(pH>0){i.3 = pH} : If i.3+i.7>buf.2{i.3 = buf.2 - i.7}
gSel pID : i.0 = gInfo_WinX, gInfo_WinY
If i.0<i.2{i.2 = i.0} : If i.1<i.3{i.3 = i.1}
gSel tmp.0 : gMode 0, i.2, i.3 : Pos i.6, i.7 : Redraw 1
Buffer cTRANS_BUF, i.2<<1, i.3<<1 : gMode 0, i.2, i.3
Pos 0, 0 :gCopy tmp.0, i.6, i.7
Pos i.2, 0 : gCopy cTRANS_BUF
Pos 0, i.3 : gCopy cTRANS_BUF
Switch pRule Case 2 : i.4 = 0, 0, 0, 1, i.3 : swBreak
Case 3 : i.4 = i.2, 0, -1, 0, i.2 : swBreak
Case 4 : i.4 = 0, i.3, 0, -1, i.3 : swBreak
Default : i.4 = 0, 0, 1, 0, i.2
swEnd
Pos (pRule&1)*i.2-i.4, (pRule&1^1)*i.3-i.5 : gCopy pID,,, i.2, i.3
i.0 = Limit(pAccel, -256, 256)
i.11 = (256-i.0)*i.8<<1, i.0*i.8<<1
gSel tmp.0 : i.1 = 0 : i.9 = GetCount()
Repeat i.0 = (GetCount()-i.9) i.0 = (((i.0*i.12/pTime)+i.11)*i.0>>9)/pTime
If i.0>=i.8{Break}
If i.0=i.1{aWait 5 : Continue}
i.1 = i.0 : i.10++
gCopy cTRANS_BUF, i.0*i.6+i.4, i.0*i.7+i.5
aWait 5
Loop
gCopy pID
mRef buf,67 : buf.27 = tmp.1, tmp.2 buf.33 = tmp.3, tmp.4, tmp.5 : buf.65 = tmp.6
Dim buf : buf = i.10 : Dim i : i = gInfo_Sel : Dim tmp
Buffer cTRANS_BUF, 1, 1 : gSel i
Return buf
#deffunc _FakeTrans int pID, var pRule, int pTime, int pVague, int pAccel, int pX, int pY, int pW, int pH
If (pID<0)|(pTime<1){Return 0}
If vartype(pRule)=4{ If pRule<(-4){_FakeFade pID, pTime, pAccel, pX, pY, pW, pH : Return stat}
If pRule<0{_FakeScroll pID, pRule*(-1), pTime, pAccel, pX, pY, pW, pH : Return stat}
}
Dim tmp, 8+192 : mRef buf, 67 tmp = buf.18, buf.27, buf.28, buf.33, buf.34, buf.35, buf.65
i = 0, 0, buf.1, buf.2, 0, 0, (pX>0)*pX, (pY>0)*pY, 0
If (pW<i.2)&(pW>0){i.2 = pW} : If i.2+i.6>buf.1{i.2 = buf.1 - i.6}
If (pH<i.3)&(pH>0){i.3 = pH} : If i.3+i.7>buf.2{i.3 = buf.2 - i.7}
gSel pID : i.0 = gInfo_WinX, gInfo_WinY
If i.0<i.2{i.2 = i.0} : If i.1<i.3{i.3 = i.1}
gSel tmp.0 : gMode 0, i.2, i.3 : Pos i.6, i.7 : Redraw 1
Buffer cTRANS_MSK, i.2, i.3, 1
mRef buf, 69 : MemCpy tmp, buf, 768, 32 Repeat 256 : MemSet buf, cnt, 3, cnt*3 : Loop
Palette -1,,,, 1 : gMode 0 : Pos 0, 0
If vartype(pRule)=2{ Buffer cTRANS_TMP : PicLoad pRule
i = gInfo_WinX, gInfo_WinY
gSel cTRANS_MSK : gCopy cTRANS_TMP,,, i.0, i.1
Buffer cTRANS_TMP, 1, 1 : gSel cTRANS_MSK
} else { gSel pRule : i = gInfo_WinX, gInfo_WinY
gSel cTRANS_MSK : gCopy pRule,,, i.0, i.1
}
gMode 1 While i.0<i.2 : Pos i.0, 0 : gCopy cTRANS_MSK,,, i.0, i.1 : i.0<<=1 : wEnd
While i.1<i.3 : Pos 0, i.1 : gCopy cTRANS_MSK,,, i.2, i.1 : i.1<<=1 : wEnd
Buffer cTRANS_BUF, i.2<<1, i.3<<1
gMode 0, i.2, i.3 : Pos i.2, 0 : gCopy tmp.0, i.6, i.7
Pos 0, i.3 : gSel cTRANS_BUF : gCopy pID : gSel cTRANS_MSK
mRef buf, 69 : MemSet buf,, 768 : Palette -1,,,, 1
i.4 = (pVague>0)*(pVague<<1), GetCount(), 0, $100, 0, 0, 0, 0
i.7 += i.4 : i.0 = Limit(pAccel, -256, 256)
i.10 = (256-i.0)*i.7<<1, i.0*i.7<<1 : i.1 = 0
Repeat i.0 = (GetCount()-i.5) i.0 = ((((i.0*i.11/pTime)+i.10)*i.0/pTime)+$100)>>9
If i.0>=i.7{Break} : If i.0=i.1{aWait 5 : Continue}
i.6++ : gSel cTRANS_MSK : If i.0<256{i.1 = i.0}else{i.1 = 256}
Repeat i.1-i.8, i.8 If cnt<=(i.0-i.4){
i.9 = 255 }else{
i.9 = ((i.0-cnt)<<8)/i.4 }
Palette cnt, i.9, i.9, i.9
Loop : Palette -1,,,, 1
i.1 = i.0 : If i.0>i.4{i.8 = i.0-i.4} gSel cTRANS_BUF : gMode 0, i.2, i.3
Pos i.2, i.3 : gCopy cTRANS_MSK
Pos 0, 0 : gCopy cTRANS_BUF, i.2
gMode 7, i.2, i.3, 128 gCopy cTRANS_BUF,, i.3
gSel tmp.0 : gCopy cTRANS_BUF
aWait 5
Loop
gSel tmp.0 : gCopy pID
mRef buf, 67 : buf.27 = tmp.1, tmp.2 buf.33 = tmp.3, tmp.4, tmp.5 : buf.65 = tmp.6
mRef buf, 69 : MemCpy buf, tmp, 768, 0, 32
Dim buf : Dim tmp : buf = i.6 : Dim i : i = gInfo_Sel
Buffer cTRANS_MSK, 1, 1, 1 : Buffer cTRANS_BUF, 1, 1 : gSel i
Return buf
#define global FakeFade(%1=1, %2=2000, %3=0, %4=0, %5=0, %6=0, %7=0) \
_FakeFade %1, %2, %3, %4, %5, %6, %7
#define global FakeScroll(%1=1, %2, %3=2000, %4=0, %5=0, %6=0, %7=0, %8=0) \
_FakeScroll %1, %2, %3, %4, %5, %6, %7, %8
#define global FakeTrans(%1=1,%2,%3=2000,%4=0,%5=0,%6=0,%7=0,%8=0, %9=0) \
fTRANS_VAL@_Fake_Transition_ = %2 : _FakeTrans %1, fTRANS_VAL@_Fake_Transition_, %3, %4, %5, %6, %7, %8, %9
#global
#endif
|