Author Topic: SCI Companion V3 - alpha build notes/bugs/feature requests  (Read 398655 times)

0 Members and 5 Guests are viewing this topic.

Offline Cloudee1

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #15 on: June 03, 2015, 08:14:40 PM »
Sir, I can not "add after" a cel to a view, add before seems to do the job though. Both add loop before and after appear to work too.

Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #16 on: June 03, 2015, 08:55:12 PM »
Hmm, I'm not able to repro. Which cel do you have selected when you "add after"? How many cels are already in the loop?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Cloudee1

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #17 on: June 03, 2015, 09:13:09 PM »
Just went back in and double checked it just to make sure that I am not losing it.... 4 cels currently in loop. Current loop is loop 0. No matter which cel I have selected, the add after button has no effect.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline lskovlun

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #18 on: June 03, 2015, 09:20:01 PM »
Just went back in and double checked it just to make sure that I am not losing it.... 4 cels currently in loop. Current loop is loop 0. No matter which cel I have selected, the add after button has no effect.
It crashes in Wine - I thought this might be a Wine problem, but I guess not if you're having problems with it too.

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #19 on: June 03, 2015, 09:23:46 PM »
From your two different reports and my different experience, sounds like I have some uninitialized data somewhere...
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #20 on: June 03, 2015, 09:37:29 PM »
Speaking of views, I get an error in ScummVM when loading views made with Companion:
Code: [Select]
WARNING: unsupported flags byte (144) inside sci1.1 view!Actually, it is an error in stock ScummVM (which breaks into the debugger), but it is easy to change it to a warning. Doesn't work out of the box, though.

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #21 on: June 03, 2015, 10:59:32 PM »
Thanks Lars, I'm able to repro the invalid view issue (looks like it only happens with new views, rather than modified views?). I'll look into it.

I'm not able to repro the Add After problem though, no matter what I do. I've tried both debug and release builds. Cloudee, what OS are you running?

Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Cloudee1

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #22 on: June 04, 2015, 07:11:57 AM »
Thanks Lars, I'm able to repro the invalid view issue (looks like it only happens with new views, rather than modified views?). I'll look into it.

I'm not able to repro the Add After problem though, no matter what I do. I've tried both debug and release builds. Cloudee, what OS are you running?

Windows 7 Pro
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline lskovlun

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #23 on: June 05, 2015, 01:47:29 AM »
Companion seems to crash when opening LB2. Stack trace follows:
Code: [Select]
=>0 0x0040a75b in scicompanion (+0xa75b) (0x0032eda4)
  1 0x0040a2a8 in scicompanion (+0xa2a7) (0x0032eddc)
  2 0x00481dc4 in scicompanion (+0x81dc3) (0x0032eea8)
  3 0x004b7450 in scicompanion (+0xb744f) (0x0032eee4)
  4 0x004b735b in scicompanion (+0xb735a) (0x0032ef50)
  5 0x004b6e3b in scicompanion (+0xb6e3a) (0x0032f034)
  6 0x004b6be3 in scicompanion (+0xb6be2) (0x0032f060)
  7 0x00416802 in scicompanion (+0x16801) (0x0032f07c)
  8 0x006f28ac in scicompanion (+0x2f28ab) (0x0032f098)
  9 0x004193db in scicompanion (+0x193da) (0x0032f0f4)
  10 0x006f17d2 in scicompanion (+0x2f17d1) (0x0032f184)
  11 0x00418f8c in scicompanion (+0x18f8b) (0x0032f194)
  12 0x006d2858 in scicompanion (+0x2d2857) (0x0032f1c0)
  13 0x00708b54 in scicompanion (+0x308b53) (0x0032f500)
  14 0x00708981 in scicompanion (+0x308980) (0x0032f510)
  15 0x004052ed in scicompanion (+0x52ec) (0x0032f78c)
  16 0x007087e2 in scicompanion (+0x3087e1) (0x0032f7b8)
  17 0x006ce165 in scicompanion (+0x2ce164) (0x0032f7c8)
  18 0x006cdfb1 in scicompanion (+0x2cdfb0) (0x0032f7f8)
  19 0x006df198 in scicompanion (+0x2df197) (0x0032f838)
  20 0x006e385e in scicompanion (+0x2e385d) (0x0032f878)
  21 0x006c9079 in scicompanion (+0x2c9078) (0x0032f8c8)
  22 0x006df22c in scicompanion (+0x2df22b) (0x0032f8e4)
  23 0x004600ea in scicompanion (+0x600e9) (0x0032f904)
  24 0x006c9c91 in scicompanion (+0x2c9c90) (0x0032f9bc)
  25 0x006cb4f5 in scicompanion (+0x2cb4f4) (0x0032f9dc)
  26 0x00460234 in scicompanion (+0x60233) (0x0032fa08)
  27 0x006c6b1b in scicompanion (+0x2c6b1a) (0x0032fa78)
  28 0x006c729f in scicompanion (+0x2c729e) (0x0032fa98)
  29 0x7eb86d1a WINPROC_wrapper+0x19() in user32 (0x0032fac8)
  30 0x7eb87456 in user32 (+0xa7455) (0x0032fb18)
  31 0x7eb89d8b CallWindowProcA+0x5a() in user32 (0x0032fb60)
  32 0x005fb973 in scicompanion (+0x1fb972) (0x0032fba8)
  33 0x005fcb34 in scicompanion (+0x1fcb33) (0x0032fbe8)
  34 0x7eb86d1a WINPROC_wrapper+0x19() in user32 (0x0032fc18)
  35 0x7eb87456 in user32 (+0xa7455) (0x0032fc68)
  36 0x7eb89c23 in user32 (+0xa9c22) (0x0032fcb8)
  37 0x7eb4a616 DispatchMessageA+0xb5() in user32 (0x0032fdc8)
  38 0x006d4437 in scicompanion (+0x2d4436) (0x0032fe00)
  39 0x0082d02a in scicompanion (+0x42d029) (0x0032fe14)
  40 0x007fd99d in scicompanion (+0x3fd99c) (0x0032fe60)
...(the remaining frames are Wine code)
This appears to happen consistently. Has anybody else seen this?
EDIT: SCI32 games, too. But that's different.
« Last Edit: June 05, 2015, 02:10:12 AM by lskovlun »

Offline OmerMor

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #24 on: June 05, 2015, 02:28:01 AM »
I can open fine LB2 - both the floppy and cd versions.

Offline lskovlun

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #25 on: June 05, 2015, 02:30:45 AM »
I can open fine LB2 - both the floppy and cd versions.
Hmm, seems to be caused by a patch file in my LB2 dir. If I place the resource volumes in a separate directory, I can open them just fine.
I'll have to look into which file is causing this.

Offline OmerMor

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #26 on: June 05, 2015, 02:48:51 AM »
Decompiler bug:
there are some scripts that the decompiler fails on, and doesn't even manage to fallback to disassembly. I do manage to manually disassemble them by checking the "Disassemble only" check-box.

Example:
The Castle of Dr. Brain (all versions), 325.SCR.
Decompilation log:
Quote
Decompiling script 325
Decompiled 2 of 2 functions successfully (100%).
Overall bytecount success rate: 100%.

It seems like it was succesfull, but it actually wasn't. During decompilation it seemed to spend lots of time doing this:
Quote
word::dispatchEvent: Analyzing control flow Switch:0189

Disassembled script:
Code: [Select]
(version 2)
(include "sci.sh")
(exports
    0 word
)
(use "Main")
(use "dummyClient")
(use "PuzzleIcon")
(use "Class_255_0")
(use "n958")
(use "SysWindow")
(use "Sound")
(use "Obj")
(script 325)

(local
    local0[10] = (49 10 43 30 40 50 60 52 21 43 )
    local10[10] = (1 4 11 14 3 1 5 0 7 11 )
    local20[30] = (325 0 325 1 325 2 325 3 325 4 325 5 325 6 325 7 325 8 325 9 325 10 325 11 325 12 325 13 325 14 )
    local50[225]
    local275
    local276
    local277
    local278[100] = (9 3 0 12 12 14 5 14 3 3 12 12 5 0 13 0 6 10 6 2 3 12 9 12 9 9 14 4 13 14 13 7 7 5 7 9 9 6 9 13 2 12 2 6 1 13 1 6 1 2 1 5 4 6 4 1 13 13 8 13 14 12 14 3 2 2 2 6 10 7 5 12 4 13 4 9 7 3 7 0 9 4 14 4 8 1 3 6 8 5 13 0 13 1 8 1 0 3 0 11 )
    local378[44] = (0 14 4 14 6 5 6 2 10 3 13 3 11 2 8 2 12 6 12 11 4 0 0 0 5 11 5 8 11 8 9 10 10 5 13 5 8 3 8 5 1 7 4 7 )
    local422
    local423[16]
    local439[16] = (-1 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 )
    local455
    local456 =     -1
    local457
    local458
    local459 =     -1
    local460 =     -100
    local461 =     -100
    local462

)
(procedure (localproc_0a0a param1 param2 param3 param4 param5)
    (var temp0, temp1, temp2, temp3)
    (asm
        pushi   9
        pushi   11
        pushi   22
        lsp     param3
        ldi     9
        mul     
        add     
        sat     temp0
        push   
        pushi   4
        lsp     param2
        ldi     11
        mul     
        add     
        sat     temp2
        push   
        lst     temp0
        ldi     8
        add     
        sat     temp1
        push   
        lst     temp2
        ldi     10
        add     
        sat     temp3
        push   
        pushi   1
        lsp     param4
        pushi   65535
        dup     
        callk   Graph, 18
        pushi   6
        pushi   12
        lst     temp0
        lst     temp2
        lst     temp1
        lst     temp3
        pushi   1
        callk   Graph, 12
        pushi   8
        lap     param1
        lea     @local50
        push   
        pushi   100
        pushi   5
        lsp     param2
        ldi     11
        mul     
        add     
        push   
        pushi   23
        lsp     param3
        ldi     9
        mul     
        add     
        push   
        pushi   105
        pushi   999
        pushi   102
        lsp     param5
        callk   Display, 16
        ret     
    )
)


(procedure (localproc_0a78 param1 param2 param3 param4)
    (asm
        pushi   2
        lsp     param1
        lsp     param2
        call    localproc_0a9e, 4
        bnt     code_0a9d
        pushi   1
        lsp     param1
        call    localproc_0c8a, 2
        push   
        lap     param3
        eq?     
        bnt     code_0a9d
        pushi   1
        lsp     param2
        call    localproc_0c8a, 2
        push   
        lap     param4
        eq?     
code_0a9d:ret     
    )
)


(procedure (localproc_0a9e param1 param2)
    (asm
        lsp     param1
        ldi     0
        eq?     
        push   
        lsp     param2
        ldi     0
        eq?     
        xor     
        bt      code_0abb
        pushi   1
        lsp     param1
        callk   Abs, 2
        push   
        pushi   1
        lsp     param2
        callk   Abs, 2
        eq?     
code_0abb:ret     
    )
)


(procedure (localproc_0abc)
    (var temp0, temp1)
    (asm
        ldi     0
        sat     temp0
code_0ac2:lst     temp0
        ldi     15
        lt?     
        bnt     code_0b0e
        ldi     0
        sat     temp1
code_0ace:lst     temp1
        ldi     15
        lt?     
        bnt     code_0b09
        lat     temp0
        lsli    local423
        lst     temp1
        ldi     1
        add     
        lali    local439
        and     
        not     
        bnt     code_0b04
        pushi   5
        lst     temp0
        ldi     15
        mul     
        push   
        lat     temp1
        add     
        push   
        lst     temp1
        lst     temp0
        ldi     2
        lsli    local0
        ldi     1
        lsli    local0
        call    localproc_0a0a, 10
code_0b04:+at     temp1
        jmp     code_0ace
code_0b09:+at     temp0
        jmp     code_0ac2
code_0b0e:ret     
    )
)


(procedure (localproc_0bc4)
    (var temp0[200])
    (asm
        lsl     local422
        ldi     1
        eq?     
        bnt     code_0be7
        pushi   7
        pushi   325
        pushi   19
        pushi   67
        pushi   65
        pushi   6
        pushi   25
        pushi   3
        calle   proc255_0, 14
        jmp     code_0c26
code_0be7:lsl     local422
        lal     local455
        ge?     
        bnt     code_0bfd
        pushi   1
        lofsa   sPlaySounds
        push   
        calle   proc5_15, 2
        jmp     code_0c26
code_0bfd:pushi   5
        lea     @temp0
        push   
        pushi   325
        pushi   20
        lsl     local422
        lsl     local455
        lal     local422
        sub     
        push   
        callk   Format, 10
        pushi   4
        lea     @temp0
        push   
        pushi   67
        pushi   65
        pushi   6
        calle   proc255_0, 8
code_0c26:ret     
    )
)


(procedure (localproc_0c27)
    (asm
        pushi   2
        pushi   325
        pushi   21
        calle   proc5_9, 4
        pushi   2
        pushi   325
        pushi   22
        calle   proc5_9, 4
        pushi   2
        pushi   325
        pushi   23
        calle   proc5_9, 4
        lsg     global114
        dup     
        ldi     0
        eq?     
        bnt     code_0c60
        pushi   2
        pushi   325
        pushi   24
        calle   proc5_9, 4
        ldi     18
        sal     local455
        jmp     code_0c88
code_0c60:dup     
        ldi     1
        eq?     
        bnt     code_0c79
        ldi     22
        sal     local455
        pushi   2
        pushi   325
        pushi   25
        calle   proc5_9, 4
        jmp     code_0c88
code_0c79:ldi     25
        sal     local455
        pushi   2
        pushi   325
        pushi   26
        calle   proc5_9, 4
code_0c88:toss   
        ret     
    )
)


(procedure (localproc_0c8a param1)
    (asm
        lsp     param1
        ldi     0
        eq?     
        bnt     code_0c97
        ldi     0
        jmp     code_0ca1
code_0c97:pushi   1
        lsp     param1
        callk   Abs, 2
        push   
        lap     param1
        div     
code_0ca1:ret     
    )
)


(procedure (localproc_0ca2 param1 param2 param3 param4 param5)
    (var temp0, temp1, temp2, temp3, temp4[4], temp8, temp9, temp10, temp11[100])
    (asm
        pushi   0
        lap     param1
        le?     
        bnt     code_0cd9
        pprev   
        ldi     14
        le?     
        bnt     code_0cd9
        pushi   0
        lap     param3
        le?     
        bnt     code_0cd9
        pprev   
        ldi     14
        le?     
        bnt     code_0cd9
        pushi   0
        lap     param2
        le?     
        bnt     code_0cd9
        pprev   
        ldi     14
        le?     
        bnt     code_0cd9
        pushi   0
        lap     param4
        le?     
        bnt     code_0cd9
        pprev   
        ldi     14
        le?     
code_0cd9:not     
        bnt     code_0ce3
        pushi   0
        call    localproc_0abc, 0
        ret     
code_0ce3:pushi   1
        lsp     param3
        lap     param1
        sub     
        push   
        call    localproc_0c8a, 2
        sat     temp0
        pushi   1
        lsp     param4
        lap     param2
        sub     
        push   
        call    localproc_0c8a, 2
        sat     temp1
        lat     temp0
        bnt     code_0d46
        lat     temp1
        bnt     code_0d46
        pushi   2
        pushi   1
        lsp     param3
        lap     param1
        sub     
        push   
        callk   Abs, 2
        push   
        pushi   1
        lsp     param4
        lap     param2
        sub     
        push   
        callk   Abs, 2
        push   
        calle   proc999_3, 4
        sat     temp10
        lsp     param3
        lsp     param1
        push   
        lat     temp0
        mul     
        add     
        ne?     
        bt      code_0d3e
        lsp     param4
        lsp     param2
        lst     temp10
        lat     temp1
        mul     
        add     
        ne?     
code_0d3e:bnt     code_0d46
        pushi   0
        call    localproc_0abc, 0
code_0d46:lap     param1
        sat     temp2
        lap     param2
        sat     temp3
        lsp     param5
        dup     
        ldi     1
        eq?     
        bnt     code_0d5e
        ldi     6
        lali    local0
        jmp     code_0d77
code_0d5e:dup     
        ldi     0
        eq?     
        bnt     code_0d6c
        ldi     2
        lali    local0
        jmp     code_0d77
code_0d6c:dup     
        ldi     2
        eq?     
        bnt     code_0d77
        ldi     8
        lali    local0
code_0d77:toss   
        sat     temp8
        lsp     param5
        dup     
        ldi     1
        eq?     
        bnt     code_0d8a
        ldi     5
        lali    local0
        jmp     code_0da3
code_0d8a:dup     
        ldi     0
        eq?     
        bnt     code_0d98
        ldi     1
        lali    local0
        jmp     code_0da3
code_0d98:dup     
        ldi     2
        eq?     
        bnt     code_0da3
        ldi     7
        lali    local0
code_0da3:toss   
        sat     temp9
code_0da6:lsp     param5
        ldi     2
        eq?     
        bnt     code_0ddd
        lat     temp3
        lsli    local423
        lst     temp2
        ldi     1
        add     
        lali    local439
        or     
        push   
        lat     temp3
        sali    local423
        pushi   5
        lst     temp3
        ldi     15
        mul     
        push   
        lat     temp2
        add     
        push   
        lst     temp2
        lst     temp3
        lst     temp8
        lst     temp9
        call    localproc_0a0a, 10
        jmp     code_0e48
code_0ddd:lsp     param5
        ldi     0
        eq?     
        bnt     code_0e30
        lat     temp3
        lsli    local423
        lst     temp2
        ldi     1
        add     
        lali    local439
        and     
        bnt     code_0e15
        pushi   5
        lst     temp3
        ldi     15
        mul     
        push   
        lat     temp2
        add     
        push   
        lst     temp2
        lst     temp3
        ldi     8
        lsli    local0
        ldi     7
        lsli    local0
        call    localproc_0a0a, 10
        jmp     code_0e48
code_0e15:pushi   5
        lst     temp3
        ldi     15
        mul     
        push   
        lat     temp2
        add     
        push   
        lst     temp2
        lst     temp3
        lst     temp8
        lst     temp9
        call    localproc_0a0a, 10
        jmp     code_0e48
code_0e30:pushi   5
        lst     temp3
        ldi     15
        mul     
        push   
        lat     temp2
        add     
        push   
        lst     temp2
        lst     temp3
        lst     temp8
        lst     temp9
        call    localproc_0a0a, 10
code_0e48:lst     temp2
        lap     param3
        eq?     
        bnt     code_0e55
        lst     temp3
        lap     param4
        eq?     
code_0e55:bt      code_0e69
        lst     temp2
        lat     temp0
        add     
        sat     temp2
        lst     temp3
        lat     temp1
        add     
        sat     temp3
        jmp     code_0da6
code_0e69:ret     
    )
)


(procedure (localproc_0e6a param1 param2 param3 param4)
    (var temp0, temp1)
    (asm
        ldi     0
        sat     temp0
code_0e70:lst     temp0
        ldi     25
        lt?     
        bnt     code_0f9a
        pushi   4
        lat     temp0
        mul     
        sat     temp1
        lsp     param1
        lap     param3
        eq?     
        bnt     code_0e95
        lsp     param2
        lap     param4
        eq?     
        bnt     code_0e95
        ldi     65535
        ret     
        jmp     code_0f95
code_0e95:lsp     param2
        lat     temp1
        lali    local278
        eq?     
        bnt     code_0f16
        lsp     param1
        lst     temp1
        ldi     1
        add     
        lali    local278
        eq?     
        bnt     code_0f16
        lsp     param4
        lst     temp1
        ldi     2
        add     
        lali    local278
        eq?     
        bnt     code_0f16
        lsp     param3
        lst     temp1
        ldi     3
        add     
        lali    local278
        eq?     
        bnt     code_0f16
        pushi   0
        lat     temp1
        lali    local278
        sub     
        push   
        lat     temp1
        sali    local278
        pushi   0
        lst     temp1
        ldi     1
        add     
        lali    local278
        sub     
        push   
        lst     temp1
        ldi     1
        add     
        sali    local278
        pushi   0
        lst     temp1
        ldi     2
        add     
        lali    local278
        sub     
        push   
        lst     temp1
        ldi     2
        add     
        sali    local278
        pushi   0
        lst     temp1
        ldi     3
        add     
        lali    local278
        sub     
        push   
        lst     temp1
        ldi     3
        add     
        sali    local278
        ldi     1
        ret     
        jmp     code_0f95
code_0f16:pushi   0
        lap     param2
        sub     
        push   
        lat     temp1
        lali    local278
        eq?     
        bnt     code_0f5d
        pushi   0
        lap     param1
        sub     
        push   
        lst     temp1
        ldi     1
        add     
        lali    local278
        eq?     
        bnt     code_0f5d
        pushi   0
        lap     param4
        sub     
        push   
        lst     temp1
        ldi     2
        add     
        lali    local278
        eq?     
        bnt     code_0f5d
        pushi   0
        lap     param3
        sub     
        push   
        lst     temp1
        ldi     3
        add     
        lali    local278
        eq?     
        bnt     code_0f5d
        ldi     2
        ret     
        jmp     code_0f95
code_0f5d:lsp     param2
        lat     temp1
        lali    local378
        eq?     
        bnt     code_0f95
        lsp     param1
        lst     temp1
        ldi     1
        add     
        lali    local378
        eq?     
        bnt     code_0f95
        lsp     param4
        lst     temp1
        ldi     2
        add     
        lali    local378
        eq?     
        bnt     code_0f95
        lsp     param3
        lst     temp1
        ldi     3
        add     
        lali    local378
        eq?     
        bnt     code_0f95
        ldi     3
        ret     
code_0f95:+at     temp0
        jmp     code_0e70
code_0f9a:ldi     0
        ret     
    )
)


(procedure (localproc_0f9d param1)
    (var temp0, temp1)
    (asm
        pushi   #x
        pushi   0
        lap     param1
        send    4
        sat     temp0
        pushi   #y
        pushi   0
        lap     param1
        send    4
        sat     temp1
        lal     local457
        not     
        bnt     code_0fb9
        ret     
code_0fb9:pushi   #message
        pushi   0
        lap     param1
        send    4
        push   
        dup     
        ldi     1
        eq?     
        bnt     code_0fdf
        pushi   187
        pushi   #x
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        lst     temp1
        ldi     9
        sub     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_0fdf:dup     
        ldi     8
        eq?     
        bnt     code_1012
        lst     temp0
        ldi     9
        eq?     
        bt      code_0ff3
        lst     temp1
        ldi     26
        eq?     
code_0ff3:not     
        bnt     code_1171
        pushi   187
        pushi   4
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        ldi     11
        sub     
        push   
        lst     temp1
        ldi     9
        sub     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_1012:dup     
        ldi     2
        eq?     
        bnt     code_1046
        lst     temp0
        ldi     163
        eq?     
        bt      code_1027
        lst     temp1
        ldi     26
        eq?     
code_1027:not     
        bnt     code_1171
        pushi   187
        pushi   4
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        ldi     11
        add     
        push   
        lst     temp1
        ldi     9
        sub     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_1046:dup     
        ldi     5
        eq?     
        bnt     code_106d
        lst     temp1
        ldi     152
        ne?     
        bnt     code_1171
        pushi   187
        pushi   #x
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        lst     temp1
        ldi     9
        add     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_106d:dup     
        ldi     4
        eq?     
        bnt     code_10a2
        lst     temp0
        ldi     163
        eq?     
        bt      code_1083
        lst     temp1
        ldi     152
        eq?     
code_1083:not     
        bnt     code_1171
        pushi   187
        pushi   4
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        ldi     11
        add     
        push   
        lst     temp1
        ldi     9
        add     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_10a2:dup     
        ldi     6
        eq?     
        bnt     code_10d6
        lst     temp0
        ldi     9
        eq?     
        bt      code_10b7
        lst     temp1
        ldi     152
        eq?     
code_10b7:not     
        bnt     code_1171
        pushi   187
        pushi   4
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        ldi     11
        sub     
        push   
        lst     temp1
        ldi     9
        add     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_10d6:dup     
        ldi     7
        eq?     
        bnt     code_1124
        lst     temp0
        ldi     9
        eq?     
        bnt     code_1105
        lst     temp1
        ldi     26
        ne?     
        bnt     code_1105
        pushi   187
        pushi   #x
        lsg     gCursorNumber
        pushi   1
        pushi   163
        lst     temp1
        ldi     9
        sub     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_1105:lst     temp0
        ldi     9
        ne?     
        bnt     code_1171
        pushi   187
        pushi   #x
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        ldi     11
        sub     
        push   
        lst     temp1
        lag     gGame
        send    12
        jmp     code_1171
code_1124:dup     
        ldi     3
        eq?     
        bnt     code_1171
        lst     temp1
        ldi     152
        ne?     
        bnt     code_1154
        lst     temp0
        ldi     163
        eq?     
        bnt     code_1154
        pushi   187
        pushi   #x
        lsg     gCursorNumber
        pushi   1
        pushi   9
        lst     temp1
        ldi     9
        add     
        push   
        lag     gGame
        send    12
        jmp     code_1171
code_1154:lst     temp0
        ldi     163
        ne?     
        bnt     code_1171
        pushi   187
        pushi   #x
        lsg     gCursorNumber
        pushi   1
        lst     temp0
        ldi     11
        add     
        push   
        lst     temp1
        lag     gGame
        send    12
code_1171:toss   
        ret     
    )
)


(procedure (localproc_1173 param1)
    (var temp0, temp1)
    (asm
        pushi   #x
        pushi   0
        lap     param1
        send    4
        sat     temp0
        pushi   #y
        pushi   0
        lap     param1
        send    4
        sat     temp1
        lst     temp0
        ldi     0
        gt?     
        bnt     code_11a6
        lst     temp1
        ldi     20
        gt?     
        bnt     code_11a6
        lst     temp0
        ldi     168
        lt?     
        bnt     code_11a6
        lst     temp1
        ldi     161
        lt?     
code_11a6:ret     
    )
)

(instance public word of PuzzleBar
    (properties
        puzzleHeight 169
        bottomHeight 0
        solvedFlag 10
    )

    (method (init param1)
        (var temp0)
        (asm
            pushi   1
            pushi   0
            calle   proc5_5, 2
            not     
            bnt     code_0031
            ldi     0
            sat     temp0
code_001e:  lst     temp0
            ldi     10
            lt?     
            bnt     code_0031
            lat     temp0
            lsli    local10
            sali    local0
            +at     temp0
            jmp     code_001e
code_0031:  lofsa   wordWindow
            aTop    window
            pushi   #back
            pushi   1
            ldi     9
            lsli    local0
            lofsa   wordWindow
            send    6
            pushi   7
            pushi   132
            pushi   50
            pushi   51
            pushi   54
            pushi   56
            pushi   104
            pushi   967
            calle   proc958_0, 14
            pushi   #init
            pushi   0
            &rest   param1
            super   PuzzleBar, 4
            pushi   #show
            pushi   0
            self    4
            lag     global114
            sal     local459
            ret     
        )
    )


    (method (show param1)
        (asm
            pushi   #show
            pushi   0
            &rest   param1
            super   PuzzleBar, 4
            pushi   1
            pushi   10
            calle   proc5_5, 2
            bnt     code_008e
            pushi   #init
            pushi   0
            pushi   2
            pushi   377
            pushi   1
            callk   ScriptID, 4
            send    4
code_008e:  ret     
        )
    )


    (method (dispatchEvent pEvent)
        (var temp0, temp1[2], temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19, temp20, temp21, temp22, temp23, temp24, temp25[24], temp49, temp50)
        (asm
            pushi   #type
            pushi   0
            lap     pEvent
            send    4
            sat     temp0
            pushi   #x
            pushi   0
            lap     pEvent
            send    4
            sat     temp4
            pushi   #y
            pushi   0
            lap     pEvent
            send    4
            sat     temp5
            pushi   1
            lsp     pEvent
            call    localproc_1173, 2
            not     
            bnt     code_0181
            ldi     0
            sal     local457
code_0181:  lst     temp0
            ldi     64
            and     
            bnt     code_01cc
            pushi   #message
            pushi   0
            lap     pEvent
            send    4
            push   
            dup     
            ldi     5
            eq?     
            bnt     code_01b7
            lal     local457
            not     
            bnt     code_01cb
            ldi     1
            sal     local457
            pushi   #setCursor
            pushi   4
            lsg     gCursorNumber
            pushi   1
            pushi   9
            pushi   26
            lag     gGame
            send    12
            jmp     code_01cb
code_01b7:  dup     
            ldi     1
            eq?     
            bnt     code_01cb
            lst     temp5
            ldi     26
            lt?     
            bnt     code_01cb
            ldi     0
            sal     local457
code_01cb:  toss   
code_01cc:  lal     local457
            not     
            bnt     code_01df
            pushi   #firstTrue
            pushi   2
            pushi   196
            lsp     pEvent
            self    8
            sat     temp3
code_01df:  ldi     1
            sat     temp20
            lst     temp4
            ldi     5
            sub     
            push   
            ldi     11
            div     
            sat     temp6
            lst     temp5
            ldi     23
            sub     
            push   
            ldi     9
            div     
            sat     temp7
            pushi   0
            lat     temp6
            le?     
            bnt     code_065a
            pprev   
            ldi     14
            le?     
            bnt     code_065a
            pushi   0
            lat     temp7
            le?     
            bnt     code_065a
            pprev   
            ldi     14
            le?     
            bnt     code_065a
            lst     temp7
            ldi     15
            mul     
            push   
            lat     temp6
            add     
            sat     temp8
            lst     temp0
            ldi     4
            and     
            bt      code_022d
            lst     temp0
            ldi     64
            and     
code_022d:  bnt     code_02a6
            lal     local457
            not     
            bnt     code_0244
            lst     temp5
            ldi     26
            ge?     
            bnt     code_0244
            ldi     1
            sal     local457
code_0244:  lst     temp4
            ldi     9
            sub     
            push   
            ldi     11
            mod     
            not     
            bnt     code_025b
            lst     temp5
            ldi     26
            sub     
            push   
            ldi     9
            mod     
            not     
code_025b:  not     
            bnt     code_0264
            ldi     1
            sal     local462
code_0264:  lal     local462
            bnt     code_029f
            pushi   187
            pushi   4
            lsg     gCursorNumber
            pushi   1
            pushi   #nsTop
            lst     temp6
            ldi     11
            mul     
            add     
            sat     temp49
            push   
            pushi   26
            lst     temp7
            ldi     9
            mul     
            add     
            sat     temp50
            push   
            lag     gGame
            send    12
            ldi     0
            sal     local462
            pushi   #x
            pushi   1
            lst     temp49
            pushi   3
            pushi   1
            lst     temp50
            lap     pEvent
            send    12
code_029f:  pushi   1
            lsp     pEvent
            call    localproc_0f9d, 2
code_02a6:  pushi   #message
            pushi   0
            lap     pEvent
            send    4
            push   
            ldi     13
            eq?     
            bnt     code_02b8
            ldi     1
            sat     temp0
code_02b8:  lst     temp0
            dup     
            ldi     0
            eq?     
            bnt     code_0334
            lst     temp8
            lal     local275
            ne?     
            bnt     code_0322
            pushi   5
            lst     temp8
            lst     temp6
            lst     temp7
            ldi     4
            lsli    local0
            ldi     3
            lsli    local0
            call    localproc_0a0a, 10
            lal     local277
            lsli    local423
            lsl     local276
            ldi     1
            add     
            lali    local439
            and     
            bnt     code_030b
            pushi   5
            lsl     local275
            lsl     local276
            lsl     local277
            ldi     8
            lsli    local0
            ldi     7
            lsli    local0
            call    localproc_0a0a, 10
            jmp     code_0322
code_030b:  pushi   5
            lsl     local275
            lsl     local276
            lsl     local277
            ldi     2
            lsli    local0
            ldi     1
            lsli    local0
            call    localproc_0a0a, 10
code_0322:  lat     temp8
            sal     local275
            lat     temp6
            sal     local276
            lat     temp7
            sal     local277
            jmp     code_0656
code_0334:  dup     
            ldi     1
            eq?     
            bnt     code_0656
            lst     temp4
            ldi     5
            sub     
            push   
            ldi     11
            div     
            sat     temp12
            lst     temp5
            ldi     23
            sub     
            push   
            ldi     9
            div     
            sat     temp13
            lat     temp12
            sat     temp16
            lat     temp13
            sat     temp17
            pushi   5
            lst     temp13
            ldi     15
            mul     
            push   
            lat     temp12
            add     
            push   
            lst     temp12
            lst     temp13
            ldi     6
            lsli    local0
            ldi     5
            lsli    local0
            call    localproc_0a0a, 10
            ldi     0
            sat     temp19
            sat     temp18
code_037b:  pushi   #type
            pushi   0
            pushi   #new
            pushi   0
            class   Event
            send    4
            sat     temp9
            send    4
            push   
            ldi     2
            ne?     
            bnt     code_0586
            pushi   #type
            pushi   0
            lat     temp9
            send    4
            push   
            ldi     256
            ne?     
            bnt     code_0586
            pushi   #message
            pushi   0
            lat     temp9
            send    4
            push   
            ldi     13
            ne?     
            bnt     code_0586
            pushi   #localize
            pushi   0
            lat     temp9
            send    4
            pushi   1
            lst     temp9
            callk   MapKeyToDir, 2
            lal     local457
            bnt     code_03ce
            pushi   1
            lst     temp9
            callk   MapKeyToDir, 2
            pushi   1
            lst     temp9
            call    localproc_0f9d, 2
code_03ce:  pushi   #x
            pushi   0
            lat     temp9
            send    4
            sat     temp10
            pushi   #y
            pushi   0
            lat     temp9
            send    4
            sat     temp11
            lst     temp10
            ldi     5
            sub     
            push   
            ldi     11
            div     
            sat     temp14
            lst     temp11
            ldi     23
            sub     
            push   
            ldi     9
            div     
            sat     temp15
            lst     temp20
            ldi     1
            eq?     
            bnt     code_043f
            lst     temp14
            lat     temp12
            ne?     
            bt      code_040b
            lst     temp15
            lat     temp13
            ne?     
code_040b:  bnt     code_043f
            pushi   2
            lst     temp14
            lat     temp12
            sub     
            push   
            lst     temp15
            lat     temp13
            sub     
            push   
            call    localproc_0a9e, 4
            bnt     code_043f
            ldi     0
            sat     temp20
            lst     temp14
            lat     temp12
            sub     
            sat     temp18
            lst     temp15
            lat     temp13
            sub     
            sat     temp19
            lat     temp14
            sat     temp16
            lat     temp15
            sat     temp17
            jmp     code_057c
code_043f:  pushi   0
            lat     temp14
            le?     
            bnt     code_0458
            pprev   
            ldi     14
            le?     
            bnt     code_0458
            pushi   0
            lat     temp15
            le?     
            bnt     code_0458
            pprev   
            ldi     14
            le?     
code_0458:  not     
            bnt     code_0461
            ldi     0
            jmp     code_057c
code_0461:  pushi   4
            lst     temp14
            lat     temp16
            sub     
            push   
            lst     temp15
            lat     temp17
            sub     
            push   
            lst     temp18
            lst     temp19
            call    localproc_0a78, 8
            bnt     code_04a6
            lst     temp14
            lat     temp16
            eq?     
            bnt     code_0487
            lst     temp15
            lat     temp17
            eq?     
code_0487:  not     
            bnt     code_04a6
            pushi   6
            lst     temp16
            lst     temp17
            lst     temp14
            lst     temp15
            pushi   1
            pushi   1
            call    localproc_0ca2, 12
            lat     temp14
            sat     temp16
            lat     temp15
            sat     temp17
            jmp     code_057c
code_04a6:  pushi   4
            lst     temp16
            lat     temp14
            sub     
            push   
            lst     temp17
            lat     temp15
            sub     
            push   
            lst     temp18
            lst     temp19
            call    localproc_0a78, 8
            bnt     code_0507
            lst     temp14
            lat     temp16
            eq?     
            bnt     code_04cc
            lst     temp15
            lat     temp17
            eq?     
code_04cc:  not     
            bnt     code_0507
            lst     temp14
            lat     temp12
            eq?     
            bnt     code_04e4
            lst     temp15
            lat     temp13
            eq?     
            bnt     code_04e4
            ldi     1
            sat     temp20
code_04e4:  pushi   6
            lst     temp14
            lat     temp18
            add     
            push   
            lst     temp15
            lat     temp19
            add     
            push   
            lst     temp16
            lst     temp17
            pushi   0
            pushi   2
            call    localproc_0ca2, 12
            lat     temp14
            sat     temp16
            lat     temp15
            sat     temp17
            jmp     code_057c
code_0507:  lst     temp20
            ldi     0
            eq?     
            bnt     code_057c
            lst     temp14
            lat     temp16
            eq?     
            bnt     code_051c
            lst     temp15
            lat     temp17
            eq?     
code_051c:  not     
            bnt     code_057c
            pushi   2
            lst     temp14
            lat     temp12
            sub     
            sat     temp21
            push   
            lst     temp15
            lat     temp13
            sub     
            sat     temp22
            push   
            call    localproc_0a9e, 4
            bnt     code_057c
            pushi   1
            lst     temp21
            call    localproc_0c8a, 2
            sat     temp23
            pushi   1
            lst     temp22
            call    localproc_0c8a, 2
            sat     temp24
            pushi   6
            lst     temp12
            lst     temp13
            lst     temp16
            lst     temp17
            pushi   0
            pushi   3
            call    localproc_0ca2, 12
            pushi   6
            lst     temp12
            lst     temp13
            lst     temp14
            lst     temp15
            pushi   1
            pushi   4
            call    localproc_0ca2, 12
            lat     temp23
            sat     temp18
            lat     temp24
            sat     temp19
            lat     temp14
            sat     temp16
            lat     temp15
            sat     temp17
code_057c:  pushi   #dispose
            pushi   0
            lat     temp9
            send    4
            jmp     code_037b
code_0586:  pushi   #dispose
            pushi   0
            lat     temp9
            send    4
            pushi   4
            lst     temp12
            lst     temp13
            lst     temp14
            lst     temp15
            call    localproc_0e6a, 8
            push   
            dup     
            ldi     1
            eq?     
            bnt     code_05c7
            pushi   #play
            pushi   0
            lofsa   rightSound
            send    4
            +al     local422
            pushi   0
            call    localproc_0bc4, 0
            pushi   6
            lst     temp12
            lst     temp13
            lst     temp16
            lst     temp17
            pushi   2
            pushi   5
            call    localproc_0ca2, 12
            jmp     code_0655
code_05c7:  dup     
            ldi     2
            eq?     
            bnt     code_05f4
            pushi   #play
            pushi   0
            lofsa   oldSound
            send    4
            pushi   2
            pushi   325
            pushi   15
            calle   proc5_9, 4
            pushi   6
            lst     temp12
            lst     temp13
            lst     temp16
            lst     temp17
            pushi   2
            pushi   5
            call    localproc_0ca2, 12
            jmp     code_0655
code_05f4:  dup     
            ldi     3
            eq?     
            bnt     code_0626
            pushi   #play
            pushi   0
            lofsa   squawkSound
            send    4
            pushi   6
            lst     temp12
            lst     temp13
            lst     temp16
            lst     temp17
            pushi   0
            pushi   6
            call    localproc_0ca2, 12
            pushi   2
            pushi   325
            pushi   16
            calle   proc5_9, 4
            pushi   0
            call    localproc_0abc, 0
            jmp     code_0655
code_0626:  dup     
            ldi     0
            eq?     
            bnt     code_0655
            pushi   #play
            pushi   0
            lofsa   wrongSound
            send    4
            pushi   6
            lst     temp12
            lst     temp13
            lst     temp16
            lst     temp17
            pushi   0
            pushi   6
            call    localproc_0ca2, 12
            pushi   2
            pushi   325
            pushi   17
            calle   proc5_9, 4
            pushi   0
            call    localproc_0abc, 0
code_0655:  toss   
code_0656:  toss   
            jmp     code_068f
code_065a:  lsl     local276
            lal     local460
            ne?     
            bt      code_066b
            lsl     local277
            lal     local461
            ne?     
code_066b:  bnt     code_068f
            pushi   6
            lsl     local276
            lsl     local277
            lsl     local276
            lsl     local277
            pushi   0
            pushi   7
            call    localproc_0ca2, 12
            lal     local276
            sal     local460
            lal     local277
            sal     local461
code_068f:  pushi   #claimed
            pushi   1
            pushi   0
            lap     pEvent
            send    6
            lal     local457
            not     
            bnt     code_06b6
            pushi   #dispatchEvent
            pushi   1
            lsp     pEvent
            super   PuzzleBar, 6
            bnt     code_06b0
            ldi     1
            ret     
            jmp     code_06c0
code_06b0:  ldi     0
            ret     
            jmp     code_06c0
code_06b6:  pushi   #dispose
            pushi   0
            lap     pEvent
            send    4
            ldi     0
            ret     
code_06c0:  ret     
        )
    )


    (method (buyClue)
        (var temp0, temp1)
        (asm
            pushi   #buyClue
            pushi   0
            super   PuzzleBar, 4
            bnt     code_012d
            ldi     0
            sat     temp0
code_009f:  lst     temp0
            ldi     25
            lt?     
            bnt     code_012d
            pushi   4
            lat     temp0
            mul     
            sat     temp1
            lsli    local278
            ldi     0
            ge?     
            bnt     code_0128
            pushi   6
            lst     temp1
            ldi     1
            add     
            lsli    local278
            lat     temp1
            lsli    local278
            push   
            ldi     3
            add     
            lsli    local278
            lst     temp1
            ldi     2
            add     
            lsli    local278
            pushi   1
            pushi   8
            call    localproc_0ca2, 12
            pushi   1
            pushi   0
            callk   Wait, 2
            pushi   1
            pushi   60
            callk   Wait, 2
            pushi   6
            lst     temp1
            ldi     1
            add     
            lsli    local278
            lat     temp1
            lsli    local278
            push   
            ldi     3
            add     
            lsli    local278
            lst     temp1
            ldi     2
            add     
            lsli    local278
            pushi   2
            pushi   8
            call    localproc_0ca2, 12
            pushi   1
            pushi   60
            callk   Wait, 2
            +al     local422
            pushi   0
            call    localproc_0bc4, 0
            pushi   0
            lat     temp1
            lali    local278
            sub     
            push   
            lat     temp1
            sali    local278
            ret     
code_0128:  +at     temp0
            jmp     code_009f
code_012d:  ret     
        )
    )


    (method (showHelp)
        (asm
            pushi   0
            call    localproc_0c27, 0
            pushi   0
            call    localproc_0bc4, 0
            ret     
        )
    )


    (method (animateOnce)
        (asm
            pushi   2
            pushi   #elements
            pushi   0
            lag     gCast
            send    4
            push   
            pushi   1
            callk   Animate, 4
            lag     gTheNewDialog
            bnt     code_0151
            pushi   #check
            pushi   0
            send    4
code_0151:  ldi     1
            ret     
        )
    )

)
(instance rightSound of Sound
    (properties
        flags $0001
        number 50
    )
)
(instance wrongSound of Sound
    (properties
        flags $0001
        number 56
    )
)
(instance oldSound of Sound
    (properties
        flags $0001
        number 54
    )
)
(instance squawkSound of Sound
    (properties
        flags $0001
        number 104
    )
)
(instance rewardSound of Sound
    (properties
        flags $0001
        number 51
    )
)
(instance wordWindow of SysWindow
    (properties
        top 19
        left 79
        bottom 180
        right 247
    )

    (method (open param1)
        (var temp0, temp1, temp2[15], temp17, temp18, temp19, temp20)
        (asm
            pushi   #open
            pushi   0
            super   SysWindow, 4
            ldi     5
            sat     temp18
            ldi     23
            sat     temp19
            ldi     0
            sat     temp20
            ldi     0
            sat     temp0
code_0855:  lst     temp0
            ldi     30
            lt?     
            bnt     code_099e
            pushi   3
            lea     @temp2
            push   
            lat     temp0
            lsli    local20
            push   
            ldi     1
            add     
            lsli    local20
            &rest   param1
            callk   Format, 6
            ldi     0
            sat     temp1
code_0876:  lst     temp1
            ldi     15
            lt?     
            bnt     code_0945
            pushi   2
            lea     @temp2
            push   
            lst     temp1
            callk   StrAt, 4
            push   
            pushi   15
            lst     temp0
            ldi     2
            div     
            mul     
            push   
            lat     temp1
            add     
            sali    local50
            sat     temp17
            pushi   10
            lea     @temp17
            push   
            pushi   100
            lst     temp18
            lst     temp19
            pushi   105
            pushi   999
            pushi   102
            ldi     1
            lsli    local0
            pushi   103
            ldi     2
            lsli    local0
            callk   Display, 20
            lst     temp0
            ldi     2
            div     
            lsli    local423
            lst     temp1
            ldi     1
            add     
            lali    local439
            and     
            bnt     code_08f1
            pushi   5
            lst     temp0
            ldi     2
            div     
            push   
            ldi     15
            mul     
            push   
            lat     temp1
            add     
            push   
            lst     temp1
            lst     temp0
            ldi     2
            div     
            push   
            ldi     8
            lsli    local0
            ldi     7
            lsli    local0
            call    localproc_0a0a, 10
code_08f1:  lst     temp18
            ldi     11
            add     
            sat     temp18
            lst     temp20
            ldi     0
            eq?     
            bnt     code_0940
            lst     temp1
            ldi     14
            ne?     
            bnt     code_0940
            pushi   8
            pushi   4
            pushi   22
            lst     temp18
            ldi     2
            sub     
            push   
            pushi   156
            lst     temp18
            ldi     2
            sub     
            push   
            ldi     0
            lsli    local0
            pushi   65535
            dup     
            callk   Graph, 16
            pushi   6
            pushi   12
            pushi   23
            lst     temp18
            ldi     3
            sub     
            push   
            pushi   156
            lst     temp18
            ldi     1
            sub     
            push   
            pushi   1
            callk   Graph, 12
code_0940:  +at     temp1
            jmp     code_0876
code_0945:  ldi     1
            sat     temp20
            ldi     5
            sat     temp18
            lst     temp19
            ldi     9
            add     
            sat     temp19
            lst     temp0
            ldi     28
            ne?     
            bnt     code_0994
            pushi   8
            pushi   4
            lst     temp19
            ldi     2
            sub     
            push   
            pushi   4
            lst     temp19
            ldi     2
            sub     
            push   
            pushi   168
            ldi     0
            lsli    local0
            pushi   65535
            dup     
            callk   Graph, 16
            pushi   6
            pushi   12
            lst     temp19
            ldi     3
            sub     
            push   
            pushi   5
            lst     temp19
            ldi     1
            sub     
            push   
            pushi   168
            pushi   1
            callk   Graph, 12
code_0994:  lst     temp0
            ldi     2
            add     
            sat     temp0
            jmp     code_0855
code_099e:  lal     local458
            not     
            bt      code_09ab
            lsl     local459
            lag     global114
            ne?     
code_09ab:  bnt     code_09b8
            pushi   0
            call    localproc_0c27, 0
            ldi     1
            sal     local458
code_09b8:  pushi   0
            call    localproc_0bc4, 0
            pushi   #setCursor
            pushi   4
            lsg     gCursorNumber
            pushi   1
            pushi   9
            pushi   26
            lag     gGame
            send    12
            ret     
        )
    )

)
(instance sPlaySounds of Script
    (properties)

    (method (changeState newState)
        (asm
            lap     newState
            aTop    state
            push   
            dup     
            ldi     0
            eq?     
            bnt     code_0b27
            pushi   #play
            pushi   1
            pushSelf
            lofsa   rewardSound
            send    6
            jmp     code_0b87
code_0b27:  dup     
            ldi     1
            eq?     
            bnt     code_0b43
            pushi   3
            pushi   325
            pushi   18
            lsl     local422
            calle   proc5_14, 6
            ldi     1
            aTop    cycles
            jmp     code_0b87
code_0b43:  dup     
            ldi     2
            eq?     
            bnt     code_0b6a
            pushi   #number
            pushi   1
            pushi   967
            pushi   102
            pushi   1
            pushi   1
            pushi   162
            pushi   1
            pushi   1
            pushi   161
            pushi   1
            pushi   127
            pushi   42
            pushi   1
            pushSelf
            lag     gCMusic2
            send    30
            jmp     code_0b87
code_0b6a:  dup     
            ldi     3
            eq?     
            bnt     code_0b87
            pushi   #solvePuzzle
            pushi   0
            pushi   539
            pushi   0
            lofsa   word
            send    8
            ldi     0
            aTop    client
            pushi   #dispose
            pushi   0
            self    4
code_0b87:  toss   
            ret     
        )
    )

)

Offline OmerMor

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #27 on: June 05, 2015, 02:49:50 AM »
Another example:
Hoyle's volume 3, 301.SCR.
Decompilation log:
Quote
Decompiling script 301
Restructured branches in BGPlayer_generateBoards
WARNING:  BGPlayer::handleEvent: Analyzing control flow: Unable to insert if node. Exit needs to predecessors.: 1 at 05d2
Falling back to disassembly for handleEvent
WARNING:  BGPlayer::dieMove: Analyzing control flow: Unable to insert if node. Exit needs to predecessors.: 1 at 079b
Falling back to disassembly for dieMove
Decompiled 25 of 27 functions successfully (92%).
Overall bytecount success rate: 90%.
Fell back to assembly for the remaining functions.
« Last Edit: June 05, 2015, 02:52:53 AM by OmerMor »

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #28 on: June 05, 2015, 04:36:16 AM »
Lars, can you send me a zip file with the patch files? Should be easy to tell what the issue is. Even if it's a corrupt/bogus patch file, I'd like to handle it gracefully.

I found the issue with the decompilation. Well, basically at some point I decided I had done enough work on the decompiler, and any "sticky situations" it got into, I would just say "ok, bail, and fall back to disassembly". But I missed some of the sticky situations, so it's just a matter of identifying them properly. It was the same issue for both Dr Brain and Hoyle (btw, most of the resources in Hoyle 3 don't load properly - I may look at it eventually, but Hoyle isn't high on the list of games to have working).
« Last Edit: June 05, 2015, 04:49:30 AM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline OmerMor

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #29 on: June 05, 2015, 06:00:15 AM »
I see.
Thanks for addressing this so quickly!


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.027 seconds with 17 queries.