(script 995)

(string
    string_035a ""
    string_035b "Inv"
    string_035f "InvI"
    string_0364 "OK"
    string_0367 "You are carrying nothing!"
    string_0381 "invD"
)

(said
)

(local
    local0 = $0000
)

// 028a
(class InvI of Obj
    (properties
        said $0
        description $0
        owner $0
        view $0
        loop $0
        cel $0
        script $0
    )
    (method (saidMe) // method_0004
  0004:78               push1 
  0005:67 08             pTos said 
  0007:43 25 02         callk Said 2 

  000a:48                 ret 
    )

    (method (ownedBy) // method_000b
  000b:67 0c             pTos owner 
  000d:87 01              lap param1 
  000f:1a                 eq? 
  0010:48                 ret 
    )

    (method (moveTo) // method_0011
  0011:87 01              lap param1 
  0013:65 0c             aTop owner 
  0015:5c              selfID 
  0016:48                 ret 
    )

    (method (showSelf) // method_0017
  0017:39 04            pushi 4 // $4 x
  0019:63 0a             pToa description 
  001b:31 04              bnt code_0021 
  001d:63 0a             pToa description 
  001f:33 02              jmp code_0023 

        code_0021
  0021:63 06             pToa name 

        code_0023
  0023:36                push 
  0024:67 0e             pTos view 
  0026:67 10             pTos loop 
  0028:67 12             pTos cel 
  002a:46 00ff 0001 08  calle ff procedure_0001 8 // ShowView 

  0030:48                 ret 
    )

    (method (changeState) // method_0031
  0031:63 14             pToa script 
  0033:31 09              bnt code_003e 
  0035:39 78            pushi 78 // $78 changeState
  0037:78               push1 
  0038:8f 01              lsp param1 
  003a:63 14             pToa script 
  003c:4a 06             send 6 


        code_003e
  003e:48                 ret 
    )

)

// 02da
(class Inv of Set
    (properties
        elements $0
        size $0
        carrying""
        empty"You are carrying nothing!"
    )
    (method (init) // method_003f
  003f:5c              selfID 
  0040:a1 09              sag gInventory 
  0042:48                 ret 
    )

    (method (saidMe) // method_0043
  0043:39 63            pushi 63 // $63 firstTrue
  0045:78               push1 
  0046:38 00f5          pushi f5 // $f5 saidMe
  0049:54 06             self 6 

  004b:48                 ret 
    )

    (method (ownedBy) // method_004c
  004c:39 63            pushi 63 // $63 firstTrue
  004e:7a               push2 
  004f:38 00ef          pushi ef // $ef ownedBy
  0052:8f 01              lsp param1 
  0054:54 08             self 8 

  0056:48                 ret 
    )

    (method (showSelf) // method_0057
  0057:39 1a            pushi 1a // $1a text
  0059:78               push1 
  005a:67 0c             pTos carrying 
  005c:39 3c            pushi 3c // $3c doit
  005e:78               push1 
  005f:8f 01              lsp param1 
  0061:72 02bc          lofsa $0320 // invD
  0064:4a 0c             send c 

  0066:48                 ret 
    )

)

// 031a
(instance invD of Dialog
    (properties
        elements $0
        size $0
        text $0
        window $0
        theItem $0
        nsTop $0
        nsLeft $0
        nsBottom $0
        nsRight $0
        time $0
        timer $0
        busy $0
    )
    (method (init) // method_0067
  0067:3f 07             link 7 // (var $7)
  0069:35 04              ldi 4 
  006b:a5 01              sat temp1 
  006d:a5 00              sat temp0 
  006f:a5 02              sat temp2 
  0071:35 00              ldi 0 
  0073:a5 03              sat temp3 
  0075:39 67            pushi 67 // $67 first
  0077:76               push0 
  0078:81 09              lag gInventory 
  007a:4a 04             send 4 

  007c:a5 05              sat temp5 

        code_007e
  007e:85 05              lat temp5 
  0080:30 00ba            bnt code_013d 
  0083:78               push1 
  0084:8d 05              lst temp5 
  0086:43 3a 02         callk NodeValue 2 

  0089:a5 06              sat temp6 
  008b:38 00ef          pushi ef // $ef ownedBy
  008e:78               push1 
  008f:8f 01              lsp param1 
  0091:85 06              lat temp6 
  0093:4a 06             send 6 

  0095:30 0097            bnt code_012f 
  0098:c5 03              +at temp3 
  009a:39 61            pushi 61 // $61 add
  009c:78               push1 
  009d:39 4d            pushi 4d // $4d value
  009f:78               push1 
  00a0:8d 06              lst temp6 
  00a2:39 1a            pushi 1a // $1a text
  00a4:78               push1 
  00a5:39 17            pushi 17 // $17 name
  00a7:76               push0 
  00a8:85 06              lat temp6 
  00aa:4a 04             send 4 

  00ac:36                push 
  00ad:39 0a            pushi a // $a nsLeft
  00af:78               push1 
  00b0:8d 00              lst temp0 
  00b2:39 09            pushi 9 // $9 nsTop
  00b4:78               push1 
  00b5:8d 01              lst temp1 
  00b7:39 20            pushi 20 // $20 state
  00b9:78               push1 
  00ba:39 03            pushi 3 // $3 y
  00bc:39 21            pushi 21 // $21 font
  00be:78               push1 
  00bf:89 17              lsg gSmallFont 
  00c1:38 008d          pushi 8d // $8d setSize
  00c4:76               push0 
  00c5:39 5f            pushi 5f // $5f yourself
  00c7:76               push0 
  00c8:39 56            pushi 56 // $56 new
  00ca:76               push0 
  00cb:51 0d            class DText 
  00cd:4a 04             send 4 

  00cf:a5 04              sat temp4 
  00d1:4a 2c             send 2c 

  00d3:36                push 
  00d4:54 06             self 6 

  00d6:8d 02              lst temp2 
  00d8:39 0c            pushi c // $c nsRight
  00da:76               push0 
  00db:85 04              lat temp4 
  00dd:4a 04             send 4 

  00df:36                push 
  00e0:39 0a            pushi a // $a nsLeft
  00e2:76               push0 
  00e3:85 04              lat temp4 
  00e5:4a 04             send 4 

  00e7:04                 sub 
  00e8:22                 lt? 
  00e9:31 12              bnt code_00fd 
  00eb:39 0c            pushi c // $c nsRight
  00ed:76               push0 
  00ee:85 04              lat temp4 
  00f0:4a 04             send 4 

  00f2:36                push 
  00f3:39 0a            pushi a // $a nsLeft
  00f5:76               push0 
  00f6:85 04              lat temp4 
  00f8:4a 04             send 4 

  00fa:04                 sub 
  00fb:a5 02              sat temp2 

        code_00fd
  00fd:8d 01              lst temp1 
  00ff:39 0b            pushi b // $b nsBottom
  0101:76               push0 
  0102:85 04              lat temp4 
  0104:4a 04             send 4 

  0106:36                push 
  0107:39 09            pushi 9 // $9 nsTop
  0109:76               push0 
  010a:85 04              lat temp4 
  010c:4a 04             send 4 

  010e:04                 sub 
  010f:36                push 
  0110:35 01              ldi 1 
  0112:02                 add 
  0113:02                 add 
  0114:a5 01              sat temp1 
  0116:36                push 
  0117:34 008c            ldi 8c 
  011a:1e                 gt? 
  011b:31 12              bnt code_012f 
  011d:35 04              ldi 4 
  011f:a5 01              sat temp1 
  0121:8d 00              lst temp0 
  0123:8d 02              lst temp2 
  0125:35 0a              ldi a 
  0127:02                 add 
  0128:02                 add 
  0129:a5 00              sat temp0 
  012b:35 00              ldi 0 
  012d:a5 02              sat temp2 

        code_012f
  012f:39 44            pushi 44 // $44 next
  0131:78               push1 
  0132:8d 05              lst temp5 
  0134:81 09              lag gInventory 
  0136:4a 06             send 6 

  0138:a5 05              sat temp5 
  013a:32 ff41            jmp code_007e 

        code_013d
  013d:85 03              lat temp3 
  013f:18                 not 
  0140:31 08              bnt code_014a 
  0142:39 58            pushi 58 // $58 dispose
  0144:76               push0 
  0145:54 04             self 4 

  0147:35 00              ldi 0 
  0149:48                 ret 

        code_014a
  014a:81 3b              lag gMyWindow 
  014c:65 0e             aTop window 
  014e:38 008d          pushi 8d // $8d setSize
  0151:76               push0 
  0152:54 04             self 4 

  0154:39 56            pushi 56 // $56 new
  0156:76               push0 
  0157:51 0f            class DButton 
  0159:4a 04             send 4 

  015b:a3 00              sal local0 
  015d:39 1a            pushi 1a // $1a text
  015f:78               push1 
  0160:74 0201          lofss $0364 // OK
  0163:38 008d          pushi 8d // $8d setSize
  0166:76               push0 
  0167:38 008f          pushi 8f // $8f moveTo
  016a:7a               push2 
  016b:67 18             pTos nsRight 
  016d:39 04            pushi 4 // $4 x
  016f:39 0c            pushi c // $c nsRight
  0171:76               push0 
  0172:83 00              lal local0 
  0174:4a 04             send 4 

  0176:02                 add 
  0177:04                 sub 
  0178:36                push 
  0179:67 16             pTos nsBottom 
  017b:83 00              lal local0 
  017d:4a 12             send 12 

  017f:38 008e          pushi 8e // $8e move
  0182:7a               push2 
  0183:39 0a            pushi a // $a nsLeft
  0185:76               push0 
  0186:83 00              lal local0 
  0188:4a 04             send 4 

  018a:36                push 
  018b:39 0c            pushi c // $c nsRight
  018d:76               push0 
  018e:83 00              lal local0 
  0190:4a 04             send 4 

  0192:04                 sub 
  0193:36                push 
  0194:76               push0 
  0195:83 00              lal local0 
  0197:4a 08             send 8 

  0199:39 61            pushi 61 // $61 add
  019b:78               push1 
  019c:8b 00              lsl local0 
  019e:38 008d          pushi 8d // $8d setSize
  01a1:76               push0 
  01a2:38 0098          pushi 98 // $98 center
  01a5:76               push0 
  01a6:54 0e             self e 

  01a8:85 03              lat temp3 
  01aa:48                 ret 
    )

    (method (doit) // method_01ab
  01ab:3f 01             link 1 // (var $1)
  01ad:39 57            pushi 57 // $57 init
  01af:78               push1 
  01b0:8f 01              lsp param1 
  01b2:54 06             self 6 

  01b4:18                 not 
  01b5:31 11              bnt code_01c8 
  01b7:78               push1 
  01b8:38 00f7          pushi f7 // $f7 empty
  01bb:76               push0 
  01bc:81 09              lag gInventory 
  01be:4a 04             send 4 

  01c0:36                push 
  01c1:46 00ff 0000 02  calle ff procedure_0000 2 // Print 

  01c7:48                 ret 

        code_01c8
  01c8:38 0097          pushi 97 // $97 open
  01cb:7a               push2 
  01cc:39 04            pushi 4 // $4 x
  01ce:39 0f            pushi f // $f lsBottom
  01d0:54 08             self 8 

  01d2:83 00              lal local0 
  01d4:a5 00              sat temp0 

        code_01d6
  01d6:35 01              ldi 1 
  01d8:31 2b              bnt code_0205 
  01da:39 3c            pushi 3c // $3c doit
  01dc:78               push1 
  01dd:8d 00              lst temp0 
  01df:57 12 06         super Dialog 6 

  01e2:a5 00              sat temp0 
  01e4:18                 not 
  01e5:2f 0e               bt code_01f5 
  01e7:8d 00              lst temp0 
  01e9:35 ff              ldi ff 
  01eb:1a                 eq? 
  01ec:2f 07               bt code_01f5 
  01ee:8d 00              lst temp0 
  01f0:83 00              lal local0 
  01f2:1a                 eq? 
  01f3:31 02              bnt code_01f7 

        code_01f5
  01f5:33 0e              jmp code_0205 

        code_01f7
  01f7:39 5a            pushi 5a // $5a showSelf
  01f9:76               push0 
  01fa:39 4d            pushi 4d // $4d value
  01fc:76               push0 
  01fd:85 00              lat temp0 
  01ff:4a 04             send 4 

  0201:4a 04             send 4 

  0203:33 d1              jmp code_01d6 

        code_0205
  0205:39 58            pushi 58 // $58 dispose
  0207:76               push0 
  0208:54 04             self 4 

  020a:48                 ret 
    )

    (method (handleEvent) // method_020b
  020b:3f 02             link 2 // (var $2)
  020d:39 28            pushi 28 // $28 message
  020f:76               push0 
  0210:87 01              lap param1 
  0212:4a 04             send 4 

  0214:a5 00              sat temp0 
  0216:39 22            pushi 22 // $22 type
  0218:76               push0 
  0219:87 01              lap param1 
  021b:4a 04             send 4 

  021d:a5 01              sat temp1 
  021f:36                push 
  0220:3c                 dup 
  0221:35 04              ldi 4 
  0223:1a                 eq? 
  0224:31 1e              bnt code_0244 
  0226:8d 00              lst temp0 
  0228:3c                 dup 
  0229:34 4800            ldi 4800 
  022c:1a                 eq? 
  022d:31 07              bnt code_0236 
  022f:34 0f00            ldi f00 
  0232:a5 00              sat temp0 
  0234:33 0b              jmp code_0241 

        code_0236
  0236:3c                 dup 
  0237:34 5000            ldi 5000 
  023a:1a                 eq? 
  023b:31 04              bnt code_0241 
  023d:35 09              ldi 9 
  023f:a5 00              sat temp0 

        code_0241
  0241:3a                toss 
  0242:33 28              jmp code_026c 

        code_0244
  0244:3c                 dup 
  0245:35 40              ldi 40 
  0247:1a                 eq? 
  0248:31 22              bnt code_026c 
  024a:8d 00              lst temp0 
  024c:3c                 dup 
  024d:35 01              ldi 1 
  024f:1a                 eq? 
  0250:31 0b              bnt code_025d 
  0252:34 0f00            ldi f00 
  0255:a5 00              sat temp0 
  0257:35 04              ldi 4 
  0259:a5 01              sat temp1 
  025b:33 0e              jmp code_026b 

        code_025d
  025d:3c                 dup 
  025e:35 05              ldi 5 
  0260:1a                 eq? 
  0261:31 08              bnt code_026b 
  0263:35 09              ldi 9 
  0265:a5 00              sat temp0 
  0267:35 04              ldi 4 
  0269:a5 01              sat temp1 

        code_026b
  026b:3a                toss 

        code_026c
  026c:3a                toss 
  026d:39 22            pushi 22 // $22 type
  026f:78               push1 
  0270:8d 01              lst temp1 
  0272:39 28            pushi 28 // $28 message
  0274:78               push1 
  0275:8d 00              lst temp0 
  0277:87 01              lap param1 
  0279:4a 0c             send c 

  027b:39 6f            pushi 6f // $6f handleEvent
  027d:78               push1 
  027e:8f 01              lsp param1 
  0280:57 12 06         super Dialog 6 

  0283:48                 ret 
    )

)



