# DigActivity_Model_DigItemData_939.luac
; fn @DigItemData.lua  line 0-0 np=0 va=1 ms=2 code=30 consts=11 upvals=1 protos=8
;   K[0]='DigItemData'
;   K[1]='__index'
;   K[2]='Create'
;   K[3]='DigItemData'
;   K[4]='_Init'
;   K[5]='UpdateRotate'
;   K[6]='UpdatePos'
;   K[7]='UpdateItemInfo'
;   K[8]='GetOccupancyGrids'
;   K[9]='IsPosInOccupancyGrids'
;   K[10]='GetGridCount'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('DigItemData')] = R0
0002  GETTABUP  R0 = _ENV[K0('DigItemData')]
0003  GETTABUP  R1 = _ENV[K0('DigItemData')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('DigItemData')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Create')] = R1
0008  GETTABUP  R0 = _ENV[K3('DigItemData')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K4('_Init')] = R1
0011  GETTABUP  R0 = _ENV[K3('DigItemData')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K5('UpdateRotate')] = R1
0014  GETTABUP  R0 = _ENV[K3('DigItemData')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K6('UpdatePos')] = R1
0017  GETTABUP  R0 = _ENV[K3('DigItemData')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K7('UpdateItemInfo')] = R1
0020  GETTABUP  R0 = _ENV[K3('DigItemData')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K8('GetOccupancyGrids')] = R1
0023  GETTABUP  R0 = _ENV[K3('DigItemData')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K9('IsPosInOccupancyGrids')] = R1
0026  GETTABUP  R0 = _ENV[K3('DigItemData')]
0027  CLOSURE   R1 = closure proto7
0028  SETTABLE  R0[K10('GetGridCount')] = R1
0029  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 13-17 np=3 va=0 ms=9 code=11 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='DigItemData'
  ;   K[2]='_Init'
  ;   upvals: _ENV
  ;   locals: config(0-11), pos(0-11), rotate(0-11), data(4-11)
  0000  GETTABUP  R3 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R4 = {} (0 items)
  0002  GETTABUP  R5 = _ENV[K1('DigItemData')]
  0003  CALL      R3 = call(R3, 1 args, 2 rets)
  0004  SELF      R5 = R3[K2('_Init')] (self)
  0005  MOVE      R6 = R0
  0006  MOVE      R7 = R0
  0007  MOVE      R8 = R0
  0008  CALL      R4 = call(R4, 0 args, 4 rets)
  0009  RETURN    return R3..R2
  0010  RETURN    return R0..R-1
; ---------- proto1 [_Init] ----------
  ; fn ?  line 22-39 np=4 va=0 ms=6 code=22 consts=12 upvals=0 protos=0
  ;   K[0]='m_config'
  ;   K[1]='id'
  ;   K[2]='width'
  ;   K[3]='height'
  ;   K[4]='pos'
  ;   K[5]='rotate'
  ;   K[6]='imgKey'
  ;   K[7]='lockedImgKey'
  ;   K[8]='unlockedScale'
  ;   K[9]='grooveRotate'
  ;   K[10]='modifyScale'
  ;   K[11]='UpdateItemInfo'
  ;   locals: self(0-22), config(0-22), pos(0-22), rotate(0-22)
  0000  SETTABLE  R0[K0('m_config')] = R1
  0001  GETTABLE  R4 = R1[K1('id')]
  0002  SETTABLE  R0[K1('id')] = R4
  0003  GETTABLE  R4 = R1[K2('width')]
  0004  SETTABLE  R0[K2('width')] = R4
  0005  GETTABLE  R4 = R1[K3('height')]
  0006  SETTABLE  R0[K3('height')] = R4
  0007  SETTABLE  R0[K4('pos')] = R2
  0008  SETTABLE  R0[K5('rotate')] = R3
  0009  GETTABLE  R4 = R1[K6('imgKey')]
  0010  SETTABLE  R0[K6('imgKey')] = R4
  0011  GETTABLE  R4 = R1[K7('lockedImgKey')]
  0012  SETTABLE  R0[K7('lockedImgKey')] = R4
  0013  GETTABLE  R4 = R1[K8('unlockedScale')]
  0014  SETTABLE  R0[K8('unlockedScale')] = R4
  0015  GETTABLE  R4 = R1[K9('grooveRotate')]
  0016  SETTABLE  R0[K9('grooveRotate')] = R4
  0017  GETTABLE  R4 = R1[K10('modifyScale')]
  0018  SETTABLE  R0[K10('modifyScale')] = R4
  0019  SELF      R5 = R0[K11('UpdateItemInfo')] (self)
  0020  CALL      R4 = call(R4, 0 args, 1 rets)
  0021  RETURN    return R0..R-1
; ---------- proto2 [UpdateRotate] ----------
  ; fn ?  line 41-49 np=2 va=0 ms=4 code=14 consts=5 upvals=0 protos=0
  ;   K[0]='rotate'
  ;   K[1]='width'
  ;   K[2]='m_config'
  ;   K[3]='height'
  ;   K[4]='UpdateItemInfo'
  ;   locals: self(0-14), rotate(0-14)
  0000  GETTABLE  R2 = R0[K0('rotate')]
  0001  EQ        if R0 eq R2   -> -130555
  0002  JMP       (jump)   -> 4
  0003  RETURN    return R0..R-1
  0004  GETTABLE  R2 = R0[K2('m_config')]
  0005  GETTABLE  R2 = R2[K1('width')]
  0006  SETTABLE  R0[K1('width')] = R2
  0007  GETTABLE  R2 = R0[K2('m_config')]
  0008  GETTABLE  R2 = R2[K3('height')]
  0009  SETTABLE  R0[K3('height')] = R2
  0010  SETTABLE  R0[K0('rotate')] = R1
  0011  SELF      R3 = R0[K4('UpdateItemInfo')] (self)
  0012  CALL      R2 = call(R2, 0 args, 1 rets)
  0013  RETURN    return R0..R-1
; ---------- proto3 [UpdatePos] ----------
  ; fn ?  line 51-53 np=2 va=0 ms=2 code=2 consts=1 upvals=0 protos=0
  ;   K[0]='pos'
  ;   locals: self(0-2), pos(0-2)
  0000  SETTABLE  R0[K0('pos')] = R1
  0001  RETURN    return R0..R-1
; ---------- proto4 [UpdateItemInfo] ----------
  ; fn ?  line 56-64 np=1 va=0 ms=4 code=23 consts=12 upvals=1 protos=0
  ;   K[0]='Log'
  ;   K[1]='Assert'
  ;   K[2]='rotate'
  ;   K[3]=90
  ;   K[4]=0
  ;   K[5]='旋转角度配置有误, 必须为90的倍数, 请检查!'
  ;   K[6]='math'
  ;   K[7]='abs'
  ;   K[8]=2
  ;   K[9]=1
  ;   K[10]='width'
  ;   K[11]='height'
  ;   upvals: _ENV
  ;   locals: self(0-23), width(19-22)
  0000  GETTABUP  R1 = _ENV[K0('Log')]
  0001  GETTABLE  R1 = R1[K1('Assert')]
  0002  GETTABLE  R2 = R0[K2('rotate')]
  0003  MOD       R2 = K3(90) mod R2
  0004  EQ        if R1 eq K4(0)   -> -129782
  0005  JMP       (jump)   -> 7
  0006  LOADBOOL  R2 = false
  0007  LOADBOOL  R2 = true
  0008  LOADK     R3 = K5 '旋转角度配置有误, 必须为90的倍数, 请检查!'
  0009  CALL      R1 = call(R1, 0 args, 2 rets)
  0010  GETTABUP  R1 = _ENV[K6('math')]
  0011  GETTABLE  R1 = R1[K7('abs')]
  0012  GETTABLE  R2 = R0[K2('rotate')]
  0013  IDIV      R2 = K3(90) idiv R2
  0014  MOD       R2 = K8(2) mod R2
  0015  CALL      R1 = call(R1, 1 args, 1 rets)
  0016  EQ        if R0 eq K9(1)   -> -130277
  0017  JMP       (jump)   -> 22
  0018  GETTABLE  R1 = R0[K10('width')]
  0019  GETTABLE  R2 = R0[K11('height')]
  0020  SETTABLE  R0[K10('width')] = R2
  0021  SETTABLE  R0[K11('height')] = R1
  0022  RETURN    return R0..R-1
; ---------- proto5 [GetOccupancyGrids] ----------
  ; fn ?  line 67-77 np=2 va=0 ms=14 code=38 consts=12 upvals=1 protos=0
  ;   K[0]='Table'
  ;   K[1]='IsEmpty'
  ;   K[2]='m_arrGridPos'
  ;   K[3]=0
  ;   K[4]='width'
  ;   K[5]=1
  ;   K[6]='height'
  ;   K[7]='table'
  ;   K[8]='insert'
  ;   K[9]='x'
  ;   K[10]='pos'
  ;   K[11]='y'
  ;   upvals: _ENV
  ;   locals: self(0-38), bForce(0-38), (for index)(14-35), (for limit)(14-35), (for step)(14-35), x(15-34), (for index)(19-34), (for limit)(19-34), (for step)(19-34), y(20-33)
  0000  GETTABUP  R2 = _ENV[K0('Table')]
  0001  GETTABLE  R2 = R2[K1('IsEmpty')]
  0002  GETTABLE  R3 = R0[K2('m_arrGridPos')]
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  TEST      if not R2 then   -> -131065
  0005  JMP       (jump)   -> 8
  0006  TEST      if not R1 then   -> -131064
  0007  JMP       (jump)   -> 35
  0008  NEWTABLE  R2 = {} (0 items)
  0009  SETTABLE  R0[K2('m_arrGridPos')] = R2
  0010  LOADK     R2 = K3 0
  0011  GETTABLE  R3 = R0[K4('width')]
  0012  SUB       R3 = K5(1) sub R3
  0013  LOADK     R4 = K5 1
  0014  FORPREP   forprep R2(sBx=19)   -> 34
  0015  LOADK     R6 = K3 0
  0016  GETTABLE  R7 = R0[K6('height')]
  0017  SUB       R7 = K5(1) sub R7
  0018  LOADK     R8 = K5 1
  0019  FORPREP   forprep R6(sBx=13)   -> 33
  0020  GETTABUP  R10 = _ENV[K7('table')]
  0021  GETTABLE  R10 = R10[K8('insert')]
  0022  GETTABLE  R11 = R0[K2('m_arrGridPos')]
  0023  NEWTABLE  R12 = {} (0 items)
  0024  GETTABLE  R13 = R0[K10('pos')]
  0025  GETTABLE  R13 = R13[K9('x')]
  0026  ADD       R13 = R5 add R13
  0027  SETTABLE  R12[K9('x')] = R13
  0028  GETTABLE  R13 = R0[K10('pos')]
  0029  GETTABLE  R13 = R13[K11('y')]
  0030  ADD       R13 = R9 add R13
  0031  SETTABLE  R12[K11('y')] = R13
  0032  CALL      R10 = call(R10, 0 args, 2 rets)
  0033  FORLOOP   forloop R6(sBx=-14)   -> 20
  0034  FORLOOP   forloop R2(sBx=-20)   -> 15
  0035  GETTABLE  R2 = R0[K2('m_arrGridPos')]
  0036  RETURN    return R2..R1
  0037  RETURN    return R0..R-1
; ---------- proto6 [IsPosInOccupancyGrids] ----------
  ; fn ?  line 80-85 np=2 va=0 ms=5 code=30 consts=6 upvals=0 protos=0
  ;   K[0]='x'
  ;   K[1]='pos'
  ;   K[2]='width'
  ;   K[3]=1
  ;   K[4]='y'
  ;   K[5]='height'
  ;   locals: self(0-30), pos(0-30)
  0000  GETTABLE  R2 = R1[K0('x')]
  0001  GETTABLE  R3 = R0[K1('pos')]
  0002  GETTABLE  R3 = R3[K0('x')]
  0003  LE        if R0 le R2   -> -129529
  0004  JMP       (jump)   -> 26
  0005  GETTABLE  R2 = R1[K0('x')]
  0006  GETTABLE  R3 = R0[K1('pos')]
  0007  GETTABLE  R3 = R3[K0('x')]
  0008  GETTABLE  R4 = R0[K2('width')]
  0009  ADD       R3 = R4 add R3
  0010  SUB       R3 = K3(1) sub R3
  0011  LE        if R0 le R3   -> -130032
  0012  JMP       (jump)   -> 26
  0013  GETTABLE  R2 = R1[K4('y')]
  0014  GETTABLE  R3 = R0[K1('pos')]
  0015  GETTABLE  R3 = R3[K4('y')]
  0016  LE        if R0 le R2   -> -129516
  0017  JMP       (jump)   -> 26
  0018  GETTABLE  R2 = R1[K4('y')]
  0019  GETTABLE  R3 = R0[K1('pos')]
  0020  GETTABLE  R3 = R3[K4('y')]
  0021  GETTABLE  R4 = R0[K5('height')]
  0022  ADD       R3 = R4 add R3
  0023  SUB       R3 = K3(1) sub R3
  0024  LE        if R1 le R3   -> -130019
  0025  JMP       (jump)   -> 27
  0026  LOADBOOL  R2 = false
  0027  LOADBOOL  R2 = true
  0028  RETURN    return R2..R1
  0029  RETURN    return R0..R-1
; ---------- proto7 [GetGridCount] ----------
  ; fn ?  line 88-90 np=1 va=0 ms=3 code=5 consts=2 upvals=0 protos=0
  ;   K[0]='width'
  ;   K[1]='height'
  ;   locals: self(0-5)
  0000  GETTABLE  R1 = R0[K0('width')]
  0001  GETTABLE  R2 = R0[K1('height')]
  0002  MUL       R1 = R2 mul R1
  0003  RETURN    return R1..R0
  0004  RETURN    return R0..R-1
