-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaodaruma_extraFunction.lua
More file actions
220 lines (199 loc) · 5.21 KB
/
aodaruma_extraFunction.lua
File metadata and controls
220 lines (199 loc) · 5.21 KB
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
--------------------------------------------------------------------------------------------------------------------------------
local easingAffect = function(af,type,backCoefficient) --Affect: 0~100(%)
--===================================--
local E = require("easing")
local div = {
E.linear ,-- 1
E.inQuad ,-- 2
E.outQuad ,-- 3
E.inOutQuad ,-- 4
E.outInQuad ,-- 5
E.inCubic ,-- 6
E.outCubic ,-- 7
E.inOutCubic ,-- 8
E.outInCubic ,-- 9
E.inQuart ,-- 10
E.outQuart ,-- 11
E.inOutQuart ,-- 12
E.outInQuart ,-- 13
E.inQuint ,-- 14
E.outQuint ,-- 15
E.inOutQuint ,-- 16
E.outInQuint ,-- 17
E.inSine ,-- 18
E.outSine ,-- 19
E.inOutSine ,-- 20
E.outInSine ,-- 21
E.inExpo ,-- 22
E.outExpo ,-- 23
E.inOutExpo ,-- 24
E.outInExpo ,-- 25
E.inCirc ,-- 26
E.outCirc ,-- 27
E.inOutCirc ,-- 28
E.outInCirc ,-- 29
E.inElastic ,-- 30 ====
E.outElastic ,-- 31
E.inOutElastic ,-- 32
E.outInElastic ,-- 33 ====
E.inBack ,-- 34
E.outBack ,-- 35
E.inOutBack ,-- 36
E.outInBack ,-- 37
E.inBounce ,-- 38
E.outBounce ,-- 39
E.inOutBounce ,-- 40
E.outInBounce ,-- 41
}
--==================================--
-- Undofishさんのeasing_aviutlより引用。 --
--==================================--
local s = backCoefficient or 1.70158
local b = 0
local c = 1
local d = 1
local t = af/100
local p,a=
local result
if(type>=30) and (type<=33) then
result = div[type](t,b,c,d,a,p)
else
result = div[type](t,b,c,d)
end
result = (result~=result and 0) or result
return result
end
--------------------------------------------------------------------------------------------------------------------------------
local calLength = function(a,b,c,a2,b2,c2)
if(b2 and c2) then
return math.sqrt((a2-a)^2+ (b2-b)^2+ (c2-c)^2)
else
return math.sqrt((c-a)^2+ (a2-b))
end
end
--------------------------------------------------------------------------------------------------------------------------------
local makeImageDiv = function()
--[[
seachDll(isString[true/false/nil]) : rikky_moduleを探します。
isStringで文字列でエラーを出力するか決定します。
load() : rikky_moudleを読み込みます。
読み込む前に自動的にseachDllを実行します。
check() : rikky_moduleが読み込まれているかチェックします。
読み込まれていなければ自動でloadで読み込みます。
read(id[number/string],
tp[true/false/nil]) : imageを読み込みます。
自動でcheck関数を実行します。
tpでrikky_module.imageの指定文字を拡張します。
write(id[number/string],
tp[true/false/nil]) : imageを書き込みます。
自動でcheck関数を実行します。
tpでrikky_module.imageの指定文字を拡張します。
clear(id[number/string],
tp[true/false/nil]) : imageを消去します。
自動でcheck関数を実行します。
tpでrikky_module.imageの指定文字を拡張します。
mash(id[number/string],
tp[true/false/nil]) : imageをロードします。
自動でcheck関数を実行します。
tpでrikky_module.imageの指定文字を拡張します。
]]--
if(type(image)~="table")then
image={
seachDll = function(isString)
local path=obj.getinfo("script_path")
while(string.sub(path,#path,#path)=="\\") do
path=string.sub(path,1,#path-1)
end
path=path.."\\rikky_module.dll"
local t=io.open(path,"r")
if t then
t:close()
return true
end
if(isString) then
return string.format(
"error/layer:%s\rikky_moduleが見つかりませんでした。\n正常に導入されているか確認してください",
obj.layer
)
else
return false
end
end
load = function()
if(seachDll()) then
require("rikky_module")
return true
else
return false
end
end,
check = function()
if(type(rikky_module)~="table")then
return load()
end
return true
end,
read = function(id,tp)
if(tp) and check() then
rikky_module.image("r+",id)
else
rikky_module.image("r",id)
end
end,
write = function(id,tp)
if(tp) and check() then
rikky_module.image("w+",id)
else
rikky_module.image("w",id)
end
end,
clear = function(id,tp)
if(tp) and check() then
rikky_module.image("c+",id)
else
rikky_module.image("c",id)
end
end,
mash = function(from,to,tp,x,y)
x,y=
x or 0,
y or 0
if(tp) and check() then
rikky_module.image("m+",to,from,x,y)
else
rikky_module.image("m",to,from,x,y)
end
end,
info = function(id,tp)
if(tp) and check() then
return rikky_module.image("i+",id)
else
return rikky_module.image("i",id)
end
end,
seach = function()
check() and rikky_module.image("g")
end,
seachdiv = function()
check() and rikky_module.image("g+")
end
}
end
return true
end
--------------------------------------------------------------------------------------------------------------------------------
local seeArray = function(div)
seeArray = seeArray or {}
seeArray{
d = function(dv)
local i,r
if(type(dv)=="table") then
r="{"
for i=1,#dv do
r = seeArray.d(dv[i])
end
else
end
end
}
end