RealmFiles/Script/Script60100.txt

1224 lines
17 KiB
Plaintext

export60100_0 = IsInPoly
export60100_1 = FindClosestPoint
export60100_2 = FindClippedPoint
export60100_3 = FindInsideClippedPoint
Line::new:
link $1
pushi $8d ; 141, new
push0
super Obj, $4
bnot
sat temp[$0]
lap param[$0]
bnt code_0099
pushi $94 ; 148, init
push0
&rest $1
lat temp[$0]
send $4
bnot
code_0099: lat temp[$0]
ret
Line::init:
lap param[$1]
aTop pX1
lap param[$3]
aTop pX2
lap param[$2]
aTop pY1
lap param[$4]
aTop pY2
pushi $94 ; 148, init
push0
&rest $5 ; scaleY
super Obj, $4
bnot
ret
Line::basicClip:
pTos pX1
pushi $88 ; 136, right
push0
lap param[$1]
send $4
bnot
gt?
bnt code_00d0
pushi $88 ; 136, right
push0
lap param[$1]
send $4
bnot
aTop pX1
code_00d0: pTos pX2
pushi $88 ; 136, right
push0
lap param[$1]
send $4
bnot
gt?
bnt code_00e9
pushi $88 ; 136, right
push0
lap param[$1]
send $4
bnot
aTop pX2
code_00e9: pTos pY1
pushi $8a ; 138, bottom
push0
lap param[$1]
send $4
bnot
gt?
bnt code_0102
pushi $8a ; 138, bottom
push0
lap param[$1]
send $4
bnot
aTop pY1
code_0102: pTos pY2
pushi $8a ; 138, bottom
push0
lap param[$1]
send $4
bnot
gt?
bnt code_011b
pushi $8a ; 138, bottom
push0
lap param[$1]
send $4
bnot
aTop pY2
code_011b: pTos pX1
pushi $87 ; 135, left
push0
lap param[$1]
send $4
bnot
lt?
bnt code_0134
pushi $87 ; 135, left
push0
lap param[$1]
send $4
bnot
aTop pX1
code_0134: pTos pX2
pushi $87 ; 135, left
push0
lap param[$1]
send $4
bnot
lt?
bnt code_014d
pushi $87 ; 135, left
push0
lap param[$1]
send $4
bnot
aTop pX2
code_014d: pTos pY1
pushi $89 ; 137, top
push0
lap param[$1]
send $4
bnot
lt?
bnt code_0166
pushi $89 ; 137, top
push0
lap param[$1]
send $4
bnot
aTop pY1
code_0166: pTos pY2
pushi $89 ; 137, top
push0
lap param[$1]
send $4
bnot
lt?
bnt code_017f
pushi $89 ; 137, top
push0
lap param[$1]
send $4
bnot
aTop pY2
code_017f: ret
Line::clip:
link $d
pushi $8d ; 141, new
push0
class LongInt
send $4
bnot
sat temp[$9]
pushi $8d ; 141, new
push0
class LongInt
send $4
bnot
sat temp[$a]
ldi $0
sat temp[$0]
ldi $0
sat temp[$1]
ldi $0
sat temp[$c]
pushi $87 ; 135, left
push0
lap param[$1]
send $4
bnot
sat temp[$2]
pushi $88 ; 136, right
push0
lap param[$1]
send $4
bnot
sat temp[$3]
pushi $89 ; 137, top
push0
lap param[$1]
send $4
bnot
sat temp[$4]
pushi $8a ; 138, bottom
push0
lap param[$1]
send $4
bnot
sat temp[$5]
pushi $45 ; 69, 'E', doit
pushi $6 ; maxScale
pTos pX1
pTos pY1
lst temp[$4]
lst temp[$2]
push
lst temp[$3]
lofsa SetOutCode
send $10
bnot
sat temp[$0]
pushi $45 ; 69, 'E', doit
pushi $6 ; maxScale
pTos pX2
pTos pY2
lst temp[$4]
lst temp[$2]
lst temp[$5]
lst temp[$3]
lofsa SetOutCode
send $10
bnot
sat temp[$1]
lst temp[$0]
or
push
ldi $0
eq?
sat temp[$6]
lst temp[$0]
lat temp[$1]
and
push
ldi $0
ne?
sat temp[$7]
code_0215: lat temp[$7]
not
bnt code_0406
lat temp[$6]
not
bnt code_0406
lat temp[$0]
not
bnt code_0251
lst temp[$c]
ldi $1
xor
sat temp[$c]
pToa pX1
sat temp[$8]
pToa pX2
aTop pX1
lat temp[$8]
aTop pX2
pToa pY1
sat temp[$8]
pToa pY2
aTop pY1
lat temp[$8]
aTop pY2
lat temp[$0]
sat temp[$8]
lat temp[$1]
sat temp[$0]
lat temp[$8]
sat temp[$1]
code_0251: lst temp[$0]
ldi $1
and
bnt code_02b3
pushi $b5 ; 181, set
push1
pTos pY2
lat temp[$9]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pY1
lat temp[$9]
send $6
bnot
pushi $b5 ; 181, set
push1
lst temp[$2]
lat temp[$a]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pX1
lat temp[$a]
send $6
bnot
pushi $114 ; 276, mulLong
push1
lst temp[$a]
lat temp[$9]
send $6
bnot
pushi $115 ; 277, div
push1
pTos pX2
pToa pX1
sub
push
lat temp[$9]
send $6
bnot
pTos pY1
pushi $10d ; 269, lowWord
push0
lat temp[$9]
send $4
bnot
add
aTop pY1
lat temp[$2]
aTop pX1
jmp code_03d5
code_02b3: lst temp[$0]
ldi $2
and
bnt code_0315
pushi $b5 ; 181, set
push1
pTos pX2
lat temp[$9]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pX1
lat temp[$9]
send $6
bnot
pushi $b5 ; 181, set
push1
lst temp[$4]
lat temp[$a]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pY1
lat temp[$a]
send $6
bnot
pushi $114 ; 276, mulLong
push1
lst temp[$a]
lat temp[$9]
send $6
bnot
pushi $115 ; 277, div
push1
pTos pY2
pToa pY1
sub
push
lat temp[$9]
send $6
bnot
pTos pX1
pushi $10d ; 269, lowWord
push0
lat temp[$9]
send $4
bnot
add
aTop pX1
lat temp[$4]
aTop pY1
jmp code_03d5
code_0315: lst temp[$0]
ldi $4 ; scaleX
and
bnt code_0376
pushi $b5 ; 181, set
push1
pTos pY2
lat temp[$9]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pY1
lat temp[$9]
send $6
bnot
pushi $b5 ; 181, set
push1
lst temp[$3]
lat temp[$a]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pX1
lat temp[$a]
send $6
bnot
pushi $114 ; 276, mulLong
push1
lst temp[$a]
lat temp[$9]
send $6
bnot
pushi $115 ; 277, div
push1
pTos pX2
pToa pX1
sub
push
lat temp[$9]
send $6
bnot
pTos pY1
pushi $10d ; 269, lowWord
push0
lat temp[$9]
send $4
bnot
add
aTop pY1
lat temp[$3]
aTop pX1
jmp code_03d5
code_0376: lst temp[$0]
ldi $8 ; fixPriority
and
bnt code_03d5
pushi $b5 ; 181, set
push1
pTos pX2
lat temp[$9]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pX1
lat temp[$9]
send $6
bnot
pushi $b5 ; 181, set
push1
lst temp[$5]
lat temp[$a]
send $6
bnot
pushi $111 ; 273, sub
push1
pTos pY1
lat temp[$a]
send $6
bnot
pushi $114 ; 276, mulLong
push1
lst temp[$a]
lat temp[$9]
send $6
bnot
pushi $115 ; 277, div
push1
pTos pY2
pToa pY1
sub
push
lat temp[$9]
send $6
bnot
pTos pX1
pushi $10d ; 269, lowWord
push0
lat temp[$9]
send $4
bnot
add
aTop pX1
lat temp[$5]
aTop pY1
code_03d5: pushi $45 ; 69, 'E', doit
pushi $6 ; maxScale
pTos pX1
pTos pY1
lst temp[$4]
lst temp[$2]
lst temp[$5]
lst temp[$3]
lofsa SetOutCode
send $10
bnot
sat temp[$0]
push
lat temp[$1]
or
push
ldi $0
eq?
sat temp[$6]
lst temp[$0]
lat temp[$1]
and
push
ldi $0
ne?
sat temp[$7]
jmp code_0215
code_0406: lat temp[$c]
bnt code_042e
pToa pX1
sat temp[$8]
pToa pX2
aTop pX1
lat temp[$8]
aTop pX2
pToa pY1
sat temp[$8]
pToa pY2
aTop pY1
lat temp[$8]
aTop pY2
lat temp[$0]
sat temp[$8]
lat temp[$1]
sat temp[$0]
lat temp[$8]
sat temp[$1]
code_042e: pushi $95 ; 149, dispose
push0
lat temp[$9]
send $4
bnot
pushi $95 ; 149, dispose
push0
lat temp[$a]
send $4
bnot
lat temp[$6]
ret
SetOutCode::doit:
link $1
ldi $0
sat temp[$0]
lsp param[$1]
lap param[$4]
lt?
bnt code_0457
lst temp[$0]
ldi $1
or
sat temp[$0]
code_0457: lsp param[$2]
lap param[$3]
lt?
bnt code_0465
lst temp[$0]
ldi $2
or
sat temp[$0]
code_0465: lsp param[$1]
lap param[$6]
gt?
bnt code_0473
lst temp[$0]
ldi $4 ; scaleX
or
sat temp[$0]
code_0473: lsp param[$2]
lap param[$5]
gt?
bnt code_0481
lst temp[$0]
ldi $8 ; fixPriority
or
sat temp[$0]
code_0481: lat temp[$0]
ret
IsInPoly::doit:
link $3
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
bnt code_0503
pushi $16d ; 365, obstacles
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
bnt code_0503
pushi $5a ; 90, 'Z', size
push0
pushi $16d ; 365, obstacles
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
sat temp[$0]
ldi $0
sat temp[$2]
code_04c0: lst temp[$2]
lat temp[$0]
lt?
bnt code_0503
pushi $4b ; 75, 'K', at
push1
lst temp[$2]
pushi $16d ; 365, obstacles
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $6
bnot
sat temp[$1]
pushi $2b ; 43, '+', type
push0
send $4
bnot
push
ldi $4 ; scaleX
lt?
bnt code_04ff
pushi $eb ; 235, onMe
push2
lsp param[$1]
lsp param[$2]
lat temp[$1]
send $8
bnot
bnt code_04ff
lat temp[$1]
ret
code_04ff: +at temp[$2]
jmp code_04c0
code_0503: ldi $0
ret
FindClosestPoint::doit:
link $8
lsp param[$0]
ldi $5 ; scaleY
gt?
bnt code_0515
lap param[$6]
sat temp[$0]
jmp code_0520
code_0515: pushi $8d ; 141, new
push0
class Point
send $4
bnot
sat temp[$0]
code_0520: lsp param[$0]
ldi $4 ; scaleX
gt?
bnt code_052d
lap param[$5]
sat temp[$7]
jmp code_0531
code_052d: ldi $3 ; z
sat temp[$7]
code_0531: pushi $9 ; inLeft
lsp param[$1]
lsp param[$2]
lsp param[$3]
lsp param[$4]
pushi $16d ; 365, obstacles
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
push
pushi $4e ; 78, 'N', width
push0
push0
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
push
pushi $e1 ; 225, height
push0
push0
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
push
push1
lst temp[$7]
callk kernel_100, $12
bnot
sat temp[$1]
push2
push1
push
callk kernel_91, $4
bnot
sat temp[$2]
ldi $0
sat temp[$4]
code_058d: ldi $1
bnt code_05bf
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
callk kernel_91, $6
bnot
sat temp[$3]
push
ldi $7777 ; 30583
ne?
bnt code_05bf
lat temp[$3]
sat temp[$5]
pushi $3 ; z
push2
lst temp[$1]
+at temp[$4]
push
callk kernel_91, $6
bnot
sat temp[$6]
+at temp[$4]
jmp code_058d
jmp code_05bf
jmp code_058d
code_05bf: push1
push1
lst temp[$5]
lat temp[$0]
send $6
bnot
push2
push1
lst temp[$6]
lat temp[$0]
send $6
bnot
push2
pushi $4 ; scaleX
lst temp[$1]
callk kernel_91, $4
bnot
lat temp[$0]
ret
FindClippedPoint::doit:
link $b
lsp param[$0]
ldi $5 ; scaleY
gt?
bnt code_05ec
lap param[$6]
sat temp[$a]
jmp code_05f0
code_05ec: ldi $3 ; z
sat temp[$a]
code_05f0: lsp param[$0]
ldi $6 ; maxScale
gt?
bnt code_05fd
lap param[$7]
sat temp[$0]
jmp code_0608
code_05fd: pushi $8d ; 141, new
push0
class Point
send $4
bnot
sat temp[$0]
code_0608: push1
push1
lsp param[$1]
push2
push1
lsp param[$2]
lat temp[$0]
send $c
bnot
pushi $9 ; inLeft
lsp param[$1]
lsp param[$2]
lsp param[$3]
lsp param[$4]
pushi $16d ; 365, obstacles
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
push
pushi $4e ; 78, 'N', width
push0
push0
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
push
pushi $e1 ; 225, height
push0
push0
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
push
push1
lst temp[$a]
callk kernel_100, $12
bnot
sat temp[$1]
push2
push1
push
callk kernel_91, $4
bnot
sat temp[$2]
ldi $0
sat temp[$4]
pushi $3 ; z
push2
lst temp[$1]
push
callk kernel_91, $6
bnot
sat temp[$5]
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
ldi $1
add
push
callk kernel_91, $6
bnot
sat temp[$6]
lst temp[$4]
ldi $2
add
sat temp[$4]
code_0695: ldi $1
bnt code_0758
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
callk kernel_91, $6
bnot
sat temp[$3]
push
ldi $7777 ; 30583
ne?
bnt code_0758
lat temp[$3]
sat temp[$7]
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
ldi $1
add
push
callk kernel_91, $6
bnot
sat temp[$8]
lst temp[$4]
ldi $2
add
sat temp[$4]
lst temp[$7]
pushi $87 ; 135, left
push0
lap param[$5]
send $4
bnot
lt?
bt code_0701
lst temp[$7]
pushi $88 ; 136, right
push0
lap param[$5]
send $4
bnot
gt?
bt code_0701
lst temp[$8]
pushi $89 ; 137, top
push0
lap param[$5]
send $4
bnot
lt?
bt code_0701
lst temp[$8]
pushi $8a ; 138, bottom
push0
lap param[$5]
send $4
bnot
gt?
code_0701: bnt code_074d
pushi $16b ; 363, clip
push1
lsp param[$5]
pushi $8d ; 141, new
pushi $4 ; scaleX
lst temp[$5]
lst temp[$6]
lst temp[$7]
lst temp[$8]
class Line
send $c
bnot
sat temp[$9]
send $6
bnot
push1
push1
pushi $169 ; 361, pX2
push0
lat temp[$9]
send $4
bnot
push
push2
push1
pushi $16a ; 362, pY2
push0
lat temp[$9]
send $4
bnot
push
lat temp[$0]
send $c
bnot
pushi $95 ; 149, dispose
push0
lat temp[$9]
send $4
bnot
jmp code_0758
jmp code_074d
jmp code_0758
code_074d: lat temp[$7]
sat temp[$5]
lat temp[$8]
sat temp[$6]
jmp code_0695
code_0758: push2
pushi $4 ; scaleX
lst temp[$1]
callk kernel_91, $4
bnot
lat temp[$0]
ret
FindInsideClippedPoint::doit:
link $b
lsp param[$0]
ldi $5 ; scaleY
gt?
bnt code_0773
lap param[$6]
sat temp[$a]
jmp code_0777
code_0773: ldi $3 ; z
sat temp[$a]
code_0777: lsp param[$0]
ldi $6 ; maxScale
gt?
bnt code_0784
lap param[$7]
sat temp[$0]
jmp code_078f
code_0784: pushi $8d ; 141, new
push0
class Point
send $4
bnot
sat temp[$0]
code_078f: push1
push1
lsp param[$1]
push2
push1
lsp param[$2]
lat temp[$0]
send $c
bnot
pushi $9 ; inLeft
lsp param[$1]
lsp param[$2]
lsp param[$3]
lsp param[$4]
pushi $16d ; 365, obstacles
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
push
pushi $4e ; 78, 'N', width
push0
push0
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
push
pushi $e1 ; 225, height
push0
push0
push0
pushi $c5 ; 197, pRoom
push0
lag global[$1]
send $4
bnot
send $4
bnot
send $4
bnot
push
push0
lst temp[$a]
callk kernel_100, $12
bnot
sat temp[$1]
push2
push1
push
callk kernel_91, $4
bnot
sat temp[$2]
ldi $0
sat temp[$4]
pushi $3 ; z
push2
lst temp[$1]
push
callk kernel_91, $6
bnot
sat temp[$5]
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
ldi $1
add
push
callk kernel_91, $6
bnot
sat temp[$6]
lst temp[$4]
ldi $2
add
sat temp[$4]
code_081c: ldi $1
bnt code_08a5
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
callk kernel_91, $6
bnot
sat temp[$3]
push
ldi $7777 ; 30583
ne?
bnt code_089a
lat temp[$3]
sat temp[$7]
pushi $3 ; z
push2
lst temp[$1]
lst temp[$4]
ldi $1
add
push
callk kernel_91, $6
bnot
sat temp[$8]
lst temp[$4]
ldi $2
add
sat temp[$4]
pushi $8d ; 141, new
pushi $4 ; scaleX
lst temp[$5]
lst temp[$6]
lst temp[$7]
lst temp[$8]
class Line
send $c
bnot
sat temp[$9]
pushi $16b ; 363, clip
push1
lsp param[$5]
send $6
bnot
bnt code_089a
push1
push1
pushi $167 ; 359, pX1
push0
lat temp[$9]
send $4
bnot
push
push2
push1
pushi $168 ; 360, pY1
push0
lat temp[$9]
send $4
bnot
push
lat temp[$0]
send $c
bnot
pushi $95 ; 149, dispose
push0
lat temp[$9]
send $4
bnot
jmp code_08a5
code_089a: lat temp[$7]
sat temp[$5]
lat temp[$8]
sat temp[$6]
jmp code_081c
code_08a5: push2
pushi $4 ; scaleX
lst temp[$1]
callk kernel_91, $4
bnot
lat temp[$0]
ret