(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "Game")
(use "InvI")
(use "TheMenuBar")
(use "Obj")
(script 801)



(instance public DebugMenu of Script
    (properties)

    (method (init)
        AddMenu(" Debug " "Ego info...`@e:Show Room`@R:Free Mem`@F:Show ATPs`@P:-! :Set Debug`^D:Clicks:Set Inv`@S:Set Var`@V:Get All`@G:Log`@L:-! :Visual`#0:Priority`#6:Control`#4")
        (if (not (SL:state()))
            (TheMenuBar:draw())
        )
    )


    (method (doit param1)
        (var temp0, temp1[6], temp7[33])
        (switch (param1)
            (case 1537
                (Print(Format(@global300 801 0 (send gEgo:x()) (send gEgo:y()) (send gEgo:priority())) 164 (send gEgo:view()) (send gEgo:loop()) (send gEgo:cel()))  )
            )
            (case 1538
                (Print(Format(@temp7 801 1 gGNewPropX))  )
            )
            (case 1539
                ((send gGame:showMem())  )
            )
            (case 1540
                ((send gAddToPics:showSelf())  )
            )
            (case 1542
                (= global14 1  )
            )
            (case 1543
                (
                (if (= global215 (^ global215 $0001))
                    Print(801 2)
                )
 )
            )
            (case 1544
                (= global300 0 proc255_2(@global300 8 "Inv. Object") = global111 ReadNumber(@global300) = global300 0 proc255_2(@global300 12 "Owner") 
                (if (not StrCmp("ego" @global300))
                    (send ((send gInv:at(global111))):moveTo(gEgo))
                )(else
                    (send ((send gInv:at(global111))):moveTo(ReadNumber(@global300)))
                )
 = global300 0  )
            )
            (case 1545
                (= global300 0 proc255_2(@global300 8 "Variable No.") = global111 ReadNumber(@global300) = global300 0 proc255_2(@global300 8 "Value") = global100[(- global111 100)] ReadNumber(@global300) = global300 0  )
            )
            (case 1546
                ((send gInv:eachElementDo(262 gEgo)) (send ((Inv:at(14))):
                    loop(0)
                    cel(0)
                )
  )
            )
            (case 1547
                (
                (if (not global196)
                    (if (< (= global195 FOpen("KQ4QA.LOG" 0)) 0)
                        Print(801 3)
                    )(else
                        = global196 1
                        Print(801 4)
                        FPuts(global195 "New entries start here.
\n")
                    )
                )(else
                    Print(801 5)
                )
 )
            )
            (case 1549
                (Show(1)  )
            )
            (case 1550
                (Show(2)  )
            )
            (case 1551
                (Show(4) Animate((send gCast:elements())) (while (== 0 (send ((= temp0 (Event:new(32765)))):type()))(send temp0:dispose())  ) (send temp0:dispose()) Show(1) )
            )
        )
    )

)
