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

0 Members and 2 Guests are viewing this topic.

Offline OmerMor

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #555 on: December 27, 2015, 03:36:49 AM »
I fail to recompile scripts from King's Quest 5 CD.
Script #0 appears to be accessing property called 'yourself' from KQ5Cursor, but the KQ5Cursor class (from script #768) doesn't appear to have it.

Any idea?

You mean a method? yourself: is a method on Obj, which is the base class for most objects. What's the error? I get errors too, but about not finding the cursor property on TheMenuBar. TheMenuBar kind of looks corrupt.

I'll be away from my main computer for several days, so I won't be able to help much unfortunately. All I can do is helplessly watch the bug reports file in :P

Here's a complete repro:
  • Open up KQ5 from the King's Quest Collection (version 1.000.052).
  • Decompile all scripts twice.
  • Open script #0.
  • Compile script.

Here's the complete compilation output:
Code: [Select]
Script 65535 (n000) declared itself as resource 0
  [Warning]: 'Polygon' has no effect on code.  Line: 1531, col: 2
  [Warning]: 'PolyPath' has no effect on code.  Line: 1532, col: 2
  [Warning]: 'RFeature' has no effect on code.  Line: 1533, col: 2
  [Warning]: 'Timer' has no effect on code.  Line: 1534, col: 2
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1590, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1594, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1598, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1602, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1606, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1610, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1614, col: 11
  [Error]: cursor is not a property or method on type 'TheMenuBar'.  Line: 1618, col: 11
  [Error]: select is not a property or method on type 'TheMenuBar'.  Line: 1909, col: 20
  [Error]: select is not a property or method on type 'TheMenuBar'.  Line: 1919, col: 20
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 1988, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2008, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2026, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2044, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2064, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2084, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2104, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2124, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2144, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2164, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2182, col: 12
Unable to find name for script #766
  [Error]: yourself is not a property or method on type 'KQCursor'.  Line: 2202, col: 12
09:31:30PM
--------------------------------------------------------
Compiling n000.sc failed.
22 errors, 5 warnings.

And here's the complete decompiled script #0:
Code: [Select]
(version 2)
(include "sci.sh")
(exports
0 KQ5
1 proc0_1
2 proc0_2
3 proc0_3
4 proc0_4
5 proc0_5
6 proc0_6
7 proc0_7
8 proc0_8
9 proc0_9
10 proc0_10
11 proc0_11
12 proc0_12
13 proc0_13
14 proc0_14
15 proc0_15
16 proc0_16
17 proc0_17
18 proc0_18
19 proc0_19
20 proc0_20
21 proc0_21
22 proc0_22
23 proc0_23
24 proc0_24
25 proc0_25
26 proc0_26
27 proc0_27
28 proc0_28
29 proc0_29
30 proc0_30
)
(use "n255")
(use "n403")
(use "n765")
(use "n768")
(use "n931")
(use "n933")
(use "n937")
(use "n945")
(use "n946")
(use "n958")
(use "n967")
(use "n973")
(use "n978")
(use "n989")
(use "n992")
(use "n994")
(use "n996")
(use "n997")
(use "n998")
(use "n999")
(script 0)

(local
gEgo
gGame
global2
gNewSpeed = 6
global4
gCast
gRegions
gTimers
gSounds
gInv
gAddToPics
gNumber
gGNumber
gNewRoomNumber
global14
global15
global16
global17 = 7
global18
gCursorNumber
gArrowCursor = 999
gSpeakCursor = 20
global22 = 1
global23 = 4
gPEvent
gTheNewDialog
global26 = 1
global27
gLocales
global29
global30 = 10
gPicAngle
gFeatures
gSFeatures
global34
global35
gPicNumber = -1
global37
gKQ5Window
global39 = 3
global40
global41
global42
global43
global44
global45
global46
global47
global48
global49
global50
global51
global52
global53
global54
global55
global56
global57
global58
global59
global60
global61
global62
gKQ5Controls
gFtrInit
gKq5DoVerbCode
global66
global67 = 1
global68
gIconBar
gPEventX
gPEventY
gMyKeyDownHandler
gMyMouseDownHandler
global74
gTheGameCursor
global76
gKQPMouse
gTheDoits
global79 = 60
gUser
global81
gNewSync
global83
gNewEventHandler
gFont
global86
global87
global88
gTheInvCursor
global90
global91
global92
global93
global94
global95
global96
global97
global98
global99
global100
global101 = 5
global102
global103 = 1
global104
global105
gGTheGameCursor
global107
global108
global109
gGEgoX
gGEgoY
global112
global113
global114
global115
global116
global117
global118
global119
global120
global121
global122
global123
global124
global125
global126
global127
global128
global129
global130
global131
global132
global133
global134
global135
global136
global137
global138
global139
global140
global141
global142
global143
global144
global145
global146
global147
global148
global149
global150
global151
global152
global153
global154
global155
global156
global157
gGlobalSound3
global159 = 256
global160
global161
global162
global163
global164
global165
global166
global167
global168
global169
global170
global171
global172
global173
global174
global175
global176
global177
global178
global179
global180
global181
global182
global183
global184
global185
global186
global187
global188
global189
global190
global191
global192
global193
global194
global195
global196
global197
global198
global199
global200
global201
global202
global203
global204
global205
global206
global207
global208
global209
global210
global211
global212
global213
global214
global215
global216
global217
global218
global219
global220
global221
global222
global223
global224
global225
global226
global227
global228
global229
global230
global231
global232
global233
global234
global235
global236
global237
global238
global239
global240
global241
global242
global243
global244
global245
global246
global247
global248
global249
global250
global251
global252
global253
global254
global255
global256
global257
global258
global259
global260
global261
global262
global263
global264
global265
global266
global267
global268
global269
global270
global271
global272
global273
global274
global275
global276
global277
global278
global279
global280
global281
global282
global283
global284
global285
global286
global287
global288
global289
global290
global291
global292
global293
global294
global295
global296
global297
global298
global299
global300
global301
global302
global303
global304
global305
global306
global307
global308
global309
global310
global311
global312 = -1
global313
global314
global315
global316
gGlobalSound4
global318
global319
global320
global321
gPolyList15
gPEventX_2
gPEventY_2
global325
global326
global327
gGlobalAudio
gGlobalSound2
global330
global331
global332
global333
global334
global335
global336
global337
global338
global339
global340
global341
global342
global343
global344
global345
global346
global347
global348
global349
global350
global351
global352
global353
global354
global355
global356
global357
global358
global359
global360
global361
global362
global363
gTheHenchManX
gTheHenchManY
global366
global367
global368
global369
global370
global371
global372
global373
global374 = 1
global375
global376
global377
global378
global379
global380
global381
global382
global383
global384
global385
gMordObj
global387
gNewActorCloner
gNewActorCloner_2
gNewActorCloner_3
gNewActorCloner_4
gNewActorCloner_5
global393
global394 = 1
global395
gTheCrownCursor
gGlobalSound
gEmptyBagCursor
global399
global400
global401

)
(procedure public (proc0_1 param1 param2)
(if (>= paramTotal 1)
(send gEgo:loop(param1))
)(else
(if (== paramTotal 2)
(send gEgo:view(param2))
)
)
(send gEgo:
setLoop(-1)
setPri(-1)
setMotion(0)
moveSpeed((send gGame:egoMoveSpeed))
setCycle(KQ5SyncWalk)
cycleSpeed((send gGame:egoMoveSpeed))
setStep(3 2)
normal(1)
illegalBits(-32768)
ignoreActors(0)
)
)


(procedure public (proc0_2)
(send gGame:setCursor(gSpeakCursor 1))
(User:
canControl(0)
canInput(0)
)
(send gEgo:setMotion(0))
(send gIconBar:disable())
= global102 1
)


(procedure public (proc0_3)
(User:
canControl(1)
canInput(1)
)
(send gIconBar:enable())
(send gGame:setCursor((send ((send gIconBar:curIcon)):cursor) 1))
= global102 0
)


(procedure public (proc0_4 param1)
return > MemoryInfo(1) param1
)


(procedure public (proc0_5)
Animate((send gCast:elements) 0)
)


(procedure public (proc0_6)
(if (gTheNewDialog)
(send gTheNewDialog:dispose())
)
)


(procedure public (proc0_7 param1 param2 param3)
(var temp0)
proc0_24(param1 = temp0 GetAngle((send param1:x) (send param1:y) (send param2:x) (send param2:y)) param3)
(if (== paramTotal 4)
proc0_7(param2 param1 param3)
)
)


(procedure public (proc0_8 param1 param2 param3 param4)
(var newEvent)
(send (= newEvent (Event:new())):
type(param2)
message(param3)
modifiers(param4)
)
(if (param1)
(send param1:handleEvent(newEvent))
)(else
(KQ5:handleEvent(newEvent))
)
(send newEvent:dispose())
)


(procedure public (proc0_9 param1)
localproc_1315(0 rest param1)
)


(procedure public (proc0_10 param1)
localproc_1315(2 rest param1)
)


(procedure public (proc0_11 param1)
localproc_1315(3 rest param1)
)


(procedure public (proc0_12 param1)
localproc_1315(1 rest param1)
)


(procedure public (proc0_13)
)


(procedure public (proc0_14)
)


(procedure public (proc0_15 param1 param2 param3 param4)
(var temp0, temp1, temp2)
(if (global156)
Display(0 2 108 global157)
Display(0 2 108 global156)
= global156 0
)
(if (param1)
= temp1
(if ((> paramTotal 1) and (>= param2 0))
param2
)(else
5
)
= temp0
(if ((> paramTotal 2) and (>= param3 0))
param3
)(else
5
)
= temp2
(if ((> paramTotal 3) and (>= param4 0))
param4
)(else
0
)
= global156 Display(param1 106 (- 260 temp0) 100 temp0 temp1 101 0 105 9 102 temp2 107)
= global157 Display(param1 106 (- 260 temp0) 100 temp0 temp1 101 0 105 8 102 15 107)
)
)


(procedure public (proc0_16)
)


(procedure public (proc0_17)
)


(procedure public (proc0_18 param1 param2 param3)
(var temp0)
= temp0 0
(while (<= temp0 100)
Palette(4 param1 param2 temp0)
Wait(param3)
= temp0 (+ temp0 5)
)
)


(procedure public (proc0_19)
(var temp0)
(while (not <> (= temp0 proc255_3("Teleport to:")) -1)
)
= global103 0
(send gGame:setCursor((= gGTheGameCursor gTheGameCursor) 1))
(send global2:newRoom(temp0))
)


(procedure public (proc0_20)
)


(procedure public (proc0_21)
(var temp0, newEvent, temp2)
(if ((User:canInput()))
= temp0 (send gGame:setCursor(gTheInvCursor))
= global126 0
(signalView:
view(942)
loop(0)
cel(10)
posn(gPEventX - (signalView:y) 10 - (signalView:y) gPEventY)
forceUpd()
show()
)
Animate((send gCast:elements) 0)
= temp2 GetTime()
(while (not not (< Abs((- temp2 GetTime())) 40) and not proc999_5((send ((= newEvent (Event:new()))):type) 4 1))
(send newEvent:dispose())
)
(if (IsObject(newEvent))
(send newEvent:dispose())
)
(signalView:
posn(1000 1000)
hide()
)
(send gGame:setCursor(temp0 1))
)
)


(procedure public (proc0_22)
)


(procedure public (proc0_23)
)


(procedure public (proc0_24 param1 param2 param3)
(var temp0)
(if (not & (send param1:signal) $0800)
(if ((< paramTotal 3) or not (= temp0 param3))
= temp0 NumLoops(param1)
)
(if (> temp0 8)
(send param1:loop(
(if ((> param2 22) and (< param2 68))
6
)(else
(if ((> param2 67) and (< param2 113))
0
)(else
(if ((> param2 112) and (< param2 158))
4
)(else
(if ((> param2 157) and (< param2 203))
2
)(else
(if ((> param2 202) and (< param2 248))
5
)(else
(if ((> param2 247) and (< param2 293))
1
)(else
(if ((> param2 292) and (< param2 338))
7
)(else
3
)
)
)
)
)
)
)
))
)(else
(if (> temp0 4)
(send param1:loop(
(if ((> param2 44) and (< param2 136))
0
)(else
(if ((> param2 135) and (< param2 225))
2
)(else
(if ((> param2 224) and (< param2 316))
1
)(else
3
)
)
)
))
)(else
(if (temp0)
= param2 (% (+ (= param2 (- param2 (/ 180 temp0))) 360) 360)
(send param1:loop((/ param2 (/ 360 temp0))))
)
)
)
(if ((send param1:respondsTo(#head)))
(send ((send param1:head)):look())
)
)
)


(procedure public (proc0_25)
)


(procedure public (proc0_26 param1 param2 param3 param4)
(asm
  pushi   0
  call    proc0_2, 0
  pushi   #setCursor
  pushi   1
  lofsa   arrowCursor
  push   
  lag     gGame
  send    6
  lap     paramTotal
  bnt     code_13df
  pushi   2
  pushi   128
  lsp     param1
  callk   Load, 4
  jmp     code_13e9
code_13df:pushi   2
  pushi   128
  pushi   248
  callk   Load, 4
code_13e9:pushi   5
  pushi   1
  lap     paramTotal
  bnt     code_13f6
  lap     param1
  jmp     code_13f9
code_13f6:ldi     248
code_13f9:push   
  pushi   6
  pushi   1
  lap     paramTotal
  bnt     code_1407
  lap     param2
  jmp     code_1409
code_1407:ldi     0
code_1409:push   
  pushi   217
  pushi   1
  lsp     paramTotal
  ldi     3
  lt?     
  bnt     code_141b
  ldi     0
  jmp     code_141d
code_141b:lap     param3
code_141d:push   
  pushi   216
  pushi   1
  lsp     paramTotal
  ldi     4
  lt?     
  bnt     code_142f
  ldi     30
  jmp     code_1431
code_142f:lap     param4
code_1431:push   
  lofsa   deathIcon
  send    24
  pushi   #number
  pushi   1
  pushi   19
  pushi   6
  pushi   1
  pushi   1
  pushi   97
  pushi   1
  pushi   127
  pushi   63
  pushi   1
  pushi   500
  pushi   164
  pushi   0
  lag     gGlobalSound
  send    28
  pushi   2
  pushi   2
  lsg     global330
  callk   DoAudio, 4
code_145c:pushi   18
  lofsa   "LOOKUP_ERROR"
  push   
  pushi   70
  pushi   220
  pushi   82
  lofsa   deathIcon
  push   
  lsp     param2
  pushi   0
  pushi   30
  pushi   1
  pushi   81
  lofsa   "Restore"
  push   
  pushi   1
  pushi   81
  lofsa   "Restart"
  push   
  pushi   2
  pushi   81
  lofsa   "    Quit    "
  push   
  pushi   3
  calle   proc255_0, 36
  push   
  dup     
  ldi     1
  eq?     
  bnt     code_14a5
  pushi   1
  pushi   3
  callk   DoAudio, 2
  pushi   #restore
  pushi   0
  lag     gGame
  send    4
  jmp     code_14d1
code_14a5:dup     
  ldi     2
  eq?     
  bnt     code_14bd
  pushi   1
  pushi   3
  callk   DoAudio, 2
  pushi   #restart
  pushi   1
  pushi   0
  lag     gGame
  send    6
  jmp     code_14d1
code_14bd:dup     
  ldi     3
  eq?     
  bnt     code_14d1
  pushi   1
  pushi   3
  callk   DoAudio, 2
  ldi     1
  sag     global4
  jmp     code_14d5
code_14d1:toss   
  jmp     code_145c
code_14d5:ret     
)
)


(procedure public (proc0_27 param1)
(rm0Sound:
priority(15)
number(65)
loop(1)
play()
)
(if (paramTotal)
= global15 (+ global15 param1)
)
)


(procedure public (proc0_28 param1 param2 param3 param4)
(var temp0, temp1[500])
(if (<u param2 1000)
GetFarText(param2 param3 @temp1)
)(else
StrCpy(@temp1 param2)
)
(talkerIcon:
view(param1)
cycler(Fwd)
cycleSpeed(6)
count(+ (/ StrLen(@temp1) 20) 1)
talker(1)
)
(if (<u param2 1000)
proc255_0(@temp1 rest param4 82 talkerIcon 0 0)
)(else
proc255_0(@temp1 param3 rest param4 82 talkerIcon 0 0)
)
)


(procedure public (proc0_29 param1 param2)
(var temp0, temp1, temp2, temp3)
(asm
  pushi   1
  pushi   3
  callk   DoAudio, 2
  lsp     paramTotal
  ldi     3
  eq?     
  not     
  bnt     code_1674
  lag     global401
  not     
  bnt     code_1674
  ldi     1
  sag     global401
  pushi   #masterVolume
  pushi   0
  lag     gGame
  send    4
  sat     temp3
  pushi   #masterVolume
  pushi   0
  lag     gGame
  send    4
  push   
  ldi     4
  ge?     
  bnt     code_1674
  pushi   379
  pushi   #superClass
  lst     temp3
  ldi     4
  sub     
  push   
  lag     gGame
  send    6
code_1674:lsp     paramTotal
  ldi     2
  eq?     
  bnt     code_16a0
  lsp     paramTotal
  ldi     3
  eq?     
  not     
  bnt     code_16a0
  pushi   #theVol
  pushi   1
  lst     temp3
  pushi   150
  pushi   2
  lsp     param2
  pushi   2
  pushi   2
  lsp     param1
  callk   DoAudio, 4
  push   
  class   SpeakTimer
  send    14
  jmp     code_176d
code_16a0:lsp     paramTotal
  ldi     3
  eq?     
  bnt     code_16b2
  pushi   2
  pushi   2
  lsp     param1
  callk   DoAudio, 4
  jmp     code_176d
code_16b2:pushi   #setCursor
  pushi   1
  lofsa   speakCursor
  push   
  lag     gGame
  send    6
  sat     temp0
  pushi   2
  pushi   2
  lsp     param1
  callk   DoAudio, 4
  push   
  ldi     2
  add     
  push   
  pushi   0
  callk   GetTime, 0
  add     
  sat     temp2
code_16d3:pushi   #type
  pushi   0
  pushi   #new
  pushi   0
  class   Event
  send    4
  sat     temp1
  send    4
  not     
  bt      code_1702
  pushi   #type
  pushi   0
  lat     temp1
  send    4
  push   
  ldi     2
  eq?     
  bt      code_1702
  pushi   #type
  pushi   0
  lat     temp1
  send    4
  push   
  ldi     512
  eq?     
  bnt     code_1731
code_1702:pushi   0
  callk   GetTime, 0
  push   
  lat     temp2
  lt?     
  bnt     code_1731
  pushi   1
  pushi   6
  callk   DoAudio, 2
  push   
  ldi     65535
  ne?     
  bnt     code_1731
  pushi   1
  lst     temp1
  callk   IsObject, 2
  bnt     code_16d3
  pushi   #dispose
  pushi   0
  lat     temp1
  send    4
  ldi     0
  sat     temp1
  jmp     code_16d3
code_1731:pushi   1
  lst     temp1
  callk   IsObject, 2
  bnt     code_1745
  pushi   #dispose
  pushi   0
  lat     temp1
  send    4
  ldi     0
  sat     temp1
code_1745:pushi   1
  pushi   3
  callk   DoAudio, 2
  lsg     global401
  ldi     1
  eq?     
  bnt     code_1763
  pushi   #masterVolume
  pushi   1
  lst     temp3
  lag     gGame
  send    6
  ldi     0
  sag     global401
code_1763:pushi   #setCursor
  pushi   1
  lst     temp0
  lag     gGame
  send    6
code_176d:ret     
)
)


(procedure public (proc0_30 param1 param2 param3 param4 param5)
DoAudio(2 param1)
proc255_0("" 82 param2 param3 param4 rest param5)
)


(procedure (localproc_1315 param1 param2)
(var temp0, temp1, temp2, temp3)
(asm
  ldi     0
  sat     temp0
code_131b:lst     temp0
  lsp     paramTotal
  ldi     1
  sub     
  lt?     
  bnt     code_1390
  lat     temp0
  lapi    param2
  sat     temp1
  push   
  ldi     16
  div     
  sat     temp2
  pushi   1
  lst     temp1
  ldi     16
  mod     
  shl     
  sat     temp3
  lsp     param1
  dup     
  ldi     1
  eq?     
  bnt     code_134a
  jmp     code_1390
  jmp     code_138a
code_134a:dup     
  ldi     2
  eq?     
  bnt     code_1361
  lat     temp2
  lsgi    global129
  lat     temp3
  bnot   
  and     
  push   
  lat     temp2
  sagi    global129
  jmp     code_138a
code_1361:dup     
  ldi     0
  eq?     
  bnt     code_1377
  lat     temp2
  lsgi    global129
  lat     temp3
  or     
  push   
  lat     temp2
  sagi    global129
  jmp     code_138a
code_1377:dup     
  ldi     3
  eq?     
  bnt     code_138a
  lat     temp2
  lsgi    global129
  lat     temp3
  xor     
  push   
  lat     temp2
  sagi    global129
code_138a:toss   
  +at     temp0
  jmp     code_131b
code_1390:lat     temp2
  lsgi    global129
  lat     temp3
  and     
  ret     
)
)


(procedure (localproc_14d6) of SpeakTimer
(var theClient)
= theClient client
= client 0
(if (IsObject(theClient))
(if ((send theClient:respondsTo(#timer)))
(send theClient:timer(0))
)
(if ((send theClient:respondsTo(#cue)))
(send theClient:cue())
)
)
)

(class KQ5SyncWalk of SyncWalk
(properties
client 0
caller 0
cycleDir 1
cycleCnt 0
completed 0
xLast 0
yLast 0
)

(method (doit)
(if (<= (send client:loop) 3)
(super:doit())
)
)

)
(class ego of Body
(properties
x 0
y 0
z 0
heading 0
noun 0
nsTop 0
nsLeft 0
nsBottom 0
nsRight 0
description 0
sightAngle 26505
actions 0
onMeCheck $6789
approachX 0
approachY 0
approachDist 0
_approachVerbs 26505
lookStr 0
yStep 2
view 0
loop 0
cel 0
priority 0
underBits 0
signal $2000
lsTop 0
lsLeft 0
lsBottom 0
lsRight 0
brTop 0
brLeft 0
brBottom 0
brRight 0
palette 0
cycleSpeed 0
script 0
cycler 0
timer 0
detailLevel 0
illegalBits $8000
xLast 0
yLast 0
xStep 3
moveSpeed 0
blocks 0
baseSetter 0
mover 0
looper 0
viewer 0
avoider 0
code 0
edgeHit 0
head 0
caller 0
lookingDir 1
normal 1
)

(method (init param1)
(if (not cycler)
(self:setCycle(KQ5SyncWalk))
)
(super:init(rest param1))
)


(method (handleEvent pEvent)
(if (((& (send pEvent:type) evJOYSTICK) or (== (send pEvent:type) evMOUSEBUTTON)) or ((== (send pEvent:type) 16384) and (== (send pEvent:message) JOY_UP)))
= gPEventX (send pEvent:x)
= gPEventY (send pEvent:y)
(super:handleEvent(pEvent))
)
(if (((send pEvent:claimed) or (<> (send pEvent:type) 16384)) or not proc255_5(self pEvent))
return
)(else
(switch ((send pEvent:message))
(case JOY_UPRIGHT
(if (proc0_12(74))
proc0_29(82)
)(else
proc0_29(83)
)
(send pEvent:claimed(1))
)
(case JOY_DOWNRIGHT
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 10)
(if ((<> gNumber 90) and (<> gNumber 85))
(rm0Sound:
number(52)
loop(1)
play()
)
proc0_29(136)
(send pEvent:claimed(1))
)
)(else
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 26)
(if (proc0_12(15))
proc0_29(137)
(send pEvent:claimed(1))
)(else
(if (not proc999_5(gNumber 29 30))
proc0_29(138)
(send pEvent:claimed(1))
)
)
)(else
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 34)
(if ((proc0_12(15) or not proc999_5(gNumber 29 30 85 2 90)) or ((== gNumber 2) and proc0_12(47)))
(rm0Sound:
number(50)
loop(1)
play()
)
proc0_29(139)
(send pEvent:claimed(1))
)
)(else
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 17)
(if (<> gNumber 24)
proc0_29(140)
(send pEvent:claimed(1))
)
)(else
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 6)
(send global2:newRoom(208))
(send pEvent:claimed(1))
)(else
(if (proc999_5((send gInv:indexOf((send gIconBar:curInvIcon))) 2 19 27 17 32 15 33 18 12 22 25 36 8 5 37))
(switch ((send gInv:indexOf((send gIconBar:curInvIcon))))
(case 2
proc0_9(16)
proc0_29(141)
(send gEgo:put(2 1))
(send pEvent:claimed(1))
)
(case 19
(if (== ++global316 1)
proc0_27(4)
proc0_9(16)
proc0_29(142)
(send ((send gInv:at(19))):cel(5))
(send ((send gInv:at(19))):
cursor(halfLambCursor)
yourself()
)
(send gEgo:put(19 gNumber))
(send gEgo:get(19))
)(else
proc0_29(143)
(send gEgo:put(19 1))
)
(send pEvent:claimed(1))
)
(case 27
(if (proc0_12(84))
proc0_29(144)
)(else
proc0_29(145)
(rm0Sound:
priority(15)
number(65)
loop(1)
play()
)
proc0_9(84)
)
(send pEvent:claimed(1))
)
(default
(if (proc0_12(15) or not proc999_5(gNumber 29 30))
proc0_29(
(switch ((send gInv:indexOf((send gIconBar:curInvIcon))))
(case 32
146
)
(case 15
147
)
(case 33
148
)
(case 12
149
)
(case 22
150
)
(case 25
151
)
(case 36
152
)
(case 8
153
)
(case 18
154
)
(default
155
)
)
)
(send pEvent:claimed(1))
)
)
)
)
)
)
)
)
)
)
(case JOY_DOWN
(if (proc0_12(74))
proc0_29(157)
)(else
proc0_29(158)
)
(send pEvent:claimed(1))
)
(case JOY_RIGHT
(if (proc0_12(74))
proc0_29(130)
(send pEvent:claimed(1))
)(else
(send pEvent:claimed(0))
)
)
)
)
)


(method (setMotion theMover)
(self:
cycleSpeed((send gGame:egoMoveSpeed))
moveSpeed((send gGame:egoMoveSpeed))
)
(super:setMotion(rest theMover))
)

)
(instance gControls of Controls
(properties)
)
(instance globalSound of Sound
(properties
flags $0001
priority 1
)
)
(instance globalSound2 of Sound
(properties
flags $0001
priority 2
)
)
(instance globalSound3 of Sound
(properties
flags $0001
priority 3
)
)
(instance globalSound4 of Sound
(properties
flags $0001
priority 4
)
)
(instance rm0Sound of Sound
(properties
flags $0001
priority 15
)
)
(instance public KQ5 of Game
(properties)

(method (init)
(var temp0[270], temp270, temp271[19], temp290)
= global394 1
DoAudio(9 1)
DoAudio(7 11025)
(if ((>= (= global105 Graph(grGET_COLOURS)) 2) and (<= global105 16))
= global159 0
)(else
= global159 1
)
= gKQ5Window KQ5Window
= gKq5DoVerbCode kq5DoVerbCode
= gFtrInit FtrInit
= global330 159
(send gGame:
egoMoveSpeed(2)
setSpeed(1)
masterVolume(12)
)
= gKQPMouse kQPMouse
proc958_0(130 932 756)
Polygon
PolyPath
RFeature
Timer
= gEmptyBagCursor emptyBagCursor
(super:init())
= global27 "1.000.052"
= global100 0
(if (= temp270 DeviceInfo(5))
(if (== (= temp290 StrAt((= temp270 DeviceInfo(5)) (- StrLen((= temp270 DeviceInfo(5))) 1))) 58)
GetCWD(global29)
)(else
StrCpy(global29 temp270)
)
)
= global17 10
(User:
canControl(0)
x(-1)
y(150)
init((User:inputLineAddr) 30)
alterEgo((send (= gEgo ego):
looper(MyLooper)
yourself()
)
)
)
= global16 260
= global22 4
(globalSound:
owner(self)
init()
)
(globalSound2:
owner(self)
init()
)
(globalSound3:
owner(self)
init()
)
(globalSound4:
owner(self)
init()
)
= gGlobalSound globalSound
= gGlobalSound2 globalSound2
= gGlobalSound3 globalSound3
= gGlobalSound4 globalSound4
= gGlobalAudio globalAudio
= gTheInvCursor theInvCursor
= gSpeakCursor speakCursor
= gArrowCursor arrowCursor
= gTheCrownCursor theCrownCursor
= gTheGameCursor theGameCursor
DoSound(sndPLAY 1)
proc0_6()
(send (= gIconBar IconBar):
add((icon0:
cursor(walkCursor)
yourself()
)
 (icon1:
cursor(eyeCursor)
yourself()
)
 (icon2:
cursor(handCursor)
yourself()
)
 (icon3:
cursor(talkCursor)
yourself()
)
 (icon4:
cursor(arrowCursor)
yourself()
)
 (icon5:
cursor(arrowCursor)
yourself()
)
 (icon8:
cursor(arrowCursor)
yourself()
)
 (icon9:
cursor(helpCursor)
yourself()
)
)
eachElementDo(#init)
eachElementDo(#highlightColor 1)
eachElementDo(#lowlightColor
(if (global159)
19
)(else
7
)
)
curIcon(icon0)
useIconItem(icon4)
helpIconItem(icon9)
disable()
disable(icon4)
)
(send (ScriptID(758)):init())
= global103 0
= gGTheGameCursor (= gTheGameCursor 6)
(self:setCursor(theGameCursor))
= global67 1
(if (GameIsRestarting())
= gPolyList15 1
)
(self:newRoom(99))
)


(method (doit)
(var gEgoLoop, temp1, temp2[2])
(send gGlobalAudio:check())
(if (((((<> (= gEgoLoop (send gEgo:loop)) (= temp1 (- NumLoops(gEgo) 1))) and not proc0_12(22)) and not (send gEgo:avoider)) and (send gEgo:normal)) and (not (send gEgo:mover) or (send gEgo:isBlocked())))
(send gEgo:
loop(temp1)
cel(gEgoLoop)
setMotion(0)
signal(& (send gEgo:signal) $fbff)
)
)
(super:doit())
)


(method (newRoom newRoomNumber)
(send gGlobalAudio:stop())
(if (SpeakTimer)
(SpeakTimer:dispose())
)
proc0_6()
(super:newRoom(newRoomNumber))
)


(method (startRoom param1)
(var temp0)
(send gGlobalSound3:stop())
(send gGlobalSound4:stop())
proc958_0(0 972 970 760 762 929 930 941 759 982 949 202 888 889 764 928 767 771)
(if (== gGNumber 99)
(if (== global87 0)
(send (ScriptID(755)):init())
)(else
(send (ScriptID(755 1)):init())
)
)
proc958_0(136 6 7 8 9)
Load(rsFONT 4)
(if (global14)
= global14 0
SetDebug()
)
(if (((>u MemoryInfo(1) (+ 20 MemoryInfo(0))) and (| $0001 Palette(4 0 255 100))) and proc255_0(0 1 81 "Who cares" 0 81 "Debug" 1))
SetDebug()
)
(super:startRoom(param1))
(if (not proc0_12(33))
(signalView:
init()
posn(1000 1000)
setPri(15)
hide()
)
)
= global124 160
= global125 105
(send gFeatures:eachElementDo(#init))
)


(method (restore param1)
DoAudio(3)
(super:restore(rest param1))
)


(method (save)
DoAudio(3)
(super:save())
)


(method (handleEvent pEvent)
(var temp0, newEvent, pEventX, pEventY, pEventModifiers, temp5[278])
(if ((send pEvent:claimed))
return
)
(switch ((send pEvent:message))
(case JOY_DOWNRIGHT
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 28)
(if (proc0_12(60))
proc0_29(134)
)(else
proc0_29(135)
)
(send pEvent:claimed(1))
)(else
(if (== (send gInv:indexOf((send gIconBar:curInvIcon))) 35)
proc0_29(156)
(send pEvent:claimed(1))
)
)
)
)
(switch ((send pEvent:type))
(case (super:handleEvent(pEvent))
)
(case evMOUSEBUTTON
(if (not (send pEvent:claimed) and global100)
(send pEvent:localize())
= pEventX (send pEvent:x)
= pEventY (send pEvent:y)
(if (& (= pEventModifiers (send pEvent:modifiers)) $0008)
(send pEvent:claimed(1))
(while (<> 2 (send ((= newEvent (Event:new()))):type))
(send newEvent:localize())
(send ((User:alterEgo)):
posn((send newEvent:x) (send newEvent:y))
setMotion(0)
)
Animate((send gCast:elements) 0)
(send newEvent:dispose())
)
(send newEvent:dispose())
)
)
)
(case evKEYBOARD
(if ((not (send pEvent:claimed) and not global327) and (User:controls))
(send pEvent:claimed(1))
(switch ((send pEvent:message))
(case KEY_TAB
(send gInv:showSelf(gEgo))
)
(case KEY_SHIFTTAB
(if (HaveMouse())
(send gInv:showSelf(gEgo))
)
)
(case KEY_F1
(send (ScriptID(753)):doit())
)
(default
(if (global100)
(send (ScriptID(889 0)):doit(pEvent))
)
)
)
)
)
)
)


(method (setCursor cursorNumber param2)
(var theGCursorNumber)
= theGCursorNumber gCursorNumber
= gCursorNumber cursorNumber
return
(if (global400)
(if (IsObject(cursorNumber))
(send cursorNumber:init(rest param2))
return theGCursorNumber
)
)(else
return
(if (IsObject(cursorNumber))
(send cursorNumber:init())
theGCursorNumber
)(else
(super:setCursor(rest param2))
)
)
)


(method (quitGame)
DoAudio(2 9254)
(super:quitGame(proc255_0(0 0 81 "Yes" 1 81 "No" 0)))
DoAudio(3)
)


(method (pragmaFail)
(if ((User:canInput()))
proc0_21()
)
)

)
(class SpeakTimer of Timer
(properties
cycleCnt -1
seconds -1
ticksToDo -1
lastTime -1
client 0
theVol 0
)

(method (doit)
(var theLastTime)
(if (<> cycleCnt -1)
(if (not --cycleCnt)
localproc_14d6()
)
)(else
(if (<> seconds -1)
(if (<> lastTime (= theLastTime GetTime(1)))
= lastTime theLastTime
(if (not --seconds)
localproc_14d6()
)
)
)(else
(if ((<u (+ ticksToDo lastTime) GetTime()) or ((>u lastTime GetTime()) and (>u (+ ticksToDo lastTime) lastTime)))
= global401 0
(send gGame:masterVolume(theVol))
localproc_14d6()
)
)
)
)

)
(class SpeakTimeOut of TO
(properties
timeLeft 0
theVol 0
)

(method (doit)
(if (== DoAudio(6) -1)
= global401 0
(send gGame:masterVolume(theVol))
(send gTheDoits:delete(self))
)
)


(method (set)
(send gTheDoits:add(self))
)

)
(instance signalView of View
(properties
view 942
)
)
(instance icon0 of TheMenuBar
(properties)
)
(instance icon1 of TheMenuBar
(properties)
)
(instance icon2 of TheMenuBar
(properties)
)
(instance icon3 of TheMenuBar
(properties)
)
(instance icon4 of TheMenuBar
(properties)
)
(instance icon5 of TheMenuBar
(properties)

(method (select)
(if ((super:select()))
(send gInv:showSelf(gEgo))
)
)

)
(instance icon8 of TheMenuBar
(properties)

(method (select)
(if ((super:select()))
(send gIconBar:hide())
(if (== global87 0)
(send (ScriptID(755)):show())
)(else
(send (ScriptID(755 1)):show())
)
)
)

)
(instance icon9 of TheMenuBar
(properties)
)
(instance deathIcon of DCIcon
(properties)
)
(instance talkerIcon of DCIcon
(properties
state $0010
)
)
(instance kq5DoVerbCode of Code
(properties)

(method (doit)
(send gGame:pragmaFail())
)

)
(instance globalAudio of Audio
(properties)
)
(instance FtrInit of Code
(properties)

(method (doit param1)
(if (== (send param1:sightAngle) 26505)
(send param1:sightAngle(90))
)
(if (== (send param1:actions) 26505)
(send param1:actions(0))
)
)

)
(instance kQPMouse of PseudoMouse
(properties)

(method (handleEvent pEvent)
(var temp0)
= temp0 (send ((send gIconBar:curIcon)):message)
(send ((send gIconBar:curIcon)):message(0))
(super:handleEvent(pEvent))
(send ((send gIconBar:curIcon)):message(temp0))
)

)
(instance arrowCursor of KQCursor
(properties
view 942
loop 1
cel 7
)

(method (init param1)
(if (global400)
(self:
number(999)
yourself()
)
)
(super:init(rest param1))
)

)
(instance theGameCursor of KQCursor
(properties
view 942
loop 1
cel 5
x 8
y 9
)

(method (init param1)
(if (global400)
(self:
number(456)
yourself()
)
)
(super:init(rest param1))
)

)
(instance theInvCursor of KQCursor
(properties
view 942
loop 1
cel 6
)

(method (init param1)
(if (global400)
(self:
number(69)
yourself()
)
)
(super:init(rest param1))
)

)
(instance walkCursor of KQCursor
(properties
view 942
loop 1
y 20
)

(method (init param1)
(if (global400)
(self:
number(6)
yourself()
)
)
(super:init(rest param1))
)

)
(instance eyeCursor of KQCursor
(properties
view 942
loop 1
cel 1
x 15
y 12
)

(method (init param1)
(if (global400)
(self:
number(7)
yourself()
)
)
(super:init(rest param1))
)

)
(instance handCursor of KQCursor
(properties
view 942
loop 1
cel 2
x 14
y 10
)

(method (init param1)
(if (global400)
(self:
number(8)
yourself()
)
)
(super:init(rest param1))
)

)
(instance talkCursor of KQCursor
(properties
view 942
loop 1
cel 3
x 10
y 13
)

(method (init param1)
(if (global400)
(self:
number(9)
yourself()
)
)
(super:init(rest param1))
)

)
(instance helpCursor of KQCursor
(properties
view 942
loop 1
cel 4
x 10
y 15
)

(method (init param1)
(if (global400)
(self:
number(70)
yourself()
)
)
(super:init(rest param1))
)

)
(instance speakCursor of KQCursor
(properties
view 942
loop 1
cel 5
x 8
y 9
)

(method (init param1)
(if (global400)
(self:
number(456)
yourself()
)
)
(super:init(rest param1))
)

)
(instance theCrownCursor of KQCursor
(properties
view 942
loop 1
cel 8
x 5
y 5
)

(method (init param1)
(if (global400)
(self:
number(997)
yourself()
)
)
(super:init(rest param1))
)

)
(instance halfLambCursor of KQCursor
(properties
view 941
loop 1
cel 7
)

(method (init param1)
(if (global400)
(self:
number(52)
yourself()
)
)
(super:init(rest param1))
)

)
(instance emptyBagCursor of KQCursor
(properties
view 941
loop 5
cel 3
x 9
y 10
)

(method (init param1)
(if (global400)
(self:
number(54)
yourself()
)
)
(super:init(rest param1))
)

)

I'm attaching the complete decompiled source for the game.

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #556 on: January 25, 2016, 04:12:43 PM »
New release available, addressing most of these issues.

And there is a new download link
« Last Edit: January 25, 2016, 10:30:03 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #557 on: January 26, 2016, 05:12:43 PM »
Okay so here's what I can see when I re-decompile an SCI0 game, like Larry 3.

1. All Said statements are mangled -- (Said _get_drink_water_) instead of (Said 'get,drink/water'). Some end up as (Said ______) (amount of _ may vary) and are flagged as "expected an expression". It seems that "better token cleaning for object names" thing from 19 days ago is a bit too eager.
2. Synonym blocks are considered "expected word" errors.

Offline MusicallyInspired

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #558 on: January 26, 2016, 06:02:50 PM »
Is this 3.0.1.4?
Brass Lantern Prop Competition

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #559 on: January 26, 2016, 06:16:00 PM »
Ugh
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #560 on: January 26, 2016, 06:36:40 PM »
If there are any other problems you notice, let me know soon, because I won't have much time to work on this in the coming months.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Cloudee1

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #561 on: January 26, 2016, 07:43:36 PM »
I see that the run.cmd file is no longer present.

I found this in the game > Properties: C:\Users\Shane.laptop-Gold\Desktop\sciCompanion\Tools\DOSBox\DOSBox.exe

So I am assuming that this means since it is packaged with companion that it means we no longer have to have it preinstalled while developing but upon release, we will either need to include instructions for install or package it with the game as well.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #562 on: January 26, 2016, 08:04:09 PM »
Quote
upon release, we will either need to include instructions for install or package it with the game as well.

Correct. It has always been that way though.

Luckily people like Collector and Kawa have stepped in to provide installers :-).
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #563 on: January 26, 2016, 09:25:09 PM »
My NSIS Publisher can be directly called from Companion. Drop it in Companion's Plugins folder and your game can be published just by clicking Plugins -> NSISPublisher. It will generate an installer for for whatever game is loaded in Companion. It does require that you have NSIS installed on your system. It includes a script editor if you want to manually edit the script and the NSIS compiler can be invoked from the script editor. I still need to do some documentation for it, but the program itself is mostly done.
KQII Remake Pic

Offline Cloudee1

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #564 on: January 26, 2016, 09:26:28 PM »
I made an installer too, it just isn't very fancy... not very fancy at all lol

It looks in a few different locations for dosbox.exe and if it finds it, gives you a button that then creates the run.cmd file

It turns out I never put dosbox in the same place twice between any two computers, so depending on which machine I am working on and the last machine I was working on, I would need to adjust the run.cmd. So my little sniffer outer did that for me.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #565 on: January 27, 2016, 04:55:22 AM »
If there are any other problems you notice, let me know soon, because I won't have much time to work on this in the coming months.
Okay. King's Quest 6, script 710. dungeon# is renamed to dungeon_ in the property list (and the various dungeon door instances' property lists) but left as-is in ((ScriptID 80 0) dungeonEntered: dungeon#) further down in DungeonDoor::doVerb.

That's all that comes to mind.

Edit: *checks commits* yey~
« Last Edit: January 27, 2016, 09:05:05 AM by Kawa »

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #566 on: January 27, 2016, 10:40:16 AM »
Here's an interesting thing. I tried to compile my own copy of SCI Companion to get those Said fixes ahead of time and found this:

1) When decompiling certain SCI0 games such as SQ3, the Joystick kernel call has been for a while now appeared in the output as ?. Yeah, eth.
2) Phil's builds don't care.
3) Mine, with no source changes on my part besides being a debug build, asserts on it, in EatCommentSemi::EatWhitespaceAndComments's while (isspace(*stream)) loop, when it's building browse info.
4) I know it's that kernel call because editing the .sc file in question in another editor to have Joystick instead of ?, this stops.

*builds a release version for the hell of it*

Confirmed, it's a debug build thing.
« Last Edit: January 27, 2016, 10:47:57 AM by Kawa »

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #567 on: January 27, 2016, 05:05:05 PM »
King's Quest 6, script 710. dungeon# is renamed to dungeon_ in the property list (and the various dungeon door instances' property lists) but left as-is in ((ScriptID 80 0) dungeonEntered: dungeon#) further down in

Yup, legit missing piece of functionality.

When decompiling certain SCI0 games such as SQ3, the Joystick kernel call has been for a while now appeared in the output as ?. Yeah, eth.

Found the problem. That addresses the assert to. I should fix the assert, but don't have time to. Kernel 112 is usually Graph, not Joystick. Joystick is 113. At least that's the case in the SCI0 template game, SQ3 might be different. At any rate, the SQ3 kernel name resource is missing stuff. My fix will change the weird character to kernel_112 during decompilation. That should be enough to help someone figure out what to do in order to build (supply a correct kernel name resource from another game, I guess - or just remove the kernel name resource and hope the fixed list Companion uses is correct).

Synonym blocks are considered "expected word" errors.

The synonym stuff has been busted since October, apparently. It's almost like I never tested it! Luckily pretty much no one uses that :-). Should be fixed in next release.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #568 on: January 27, 2016, 05:30:04 PM »
hope the fixed list Companion uses is correct
Negatory. Joystick becomes MemorySegment, and GameIsRestarting becomes NewNode, possibly because the SCI0 file calls are commented out of the list.
Code: [Select]
    /*0x28*/ "SetCursor",
    // FOpen (SCI0)
    // FPuts (SCI0)
    // FGets (SCI0)
    // FClose (SCI0)
    /*0x29*/ "SaveGame",
in Vocab99x.cpp, vs
Code: [Select]
40 SetCursor
41 FOpen
42 FPuts
43 FGets
44 FClose
45 SaveGame
in vocab.999 according to SV. So the internal list is basically valid only for SCI1/11, not SCI0.

Offline troflip

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #569 on: January 28, 2016, 12:52:20 AM »
I just realized I never fixed the issues with the SaveResdtoreDialog in the template game... sigh...
Check out my website: http://icefallgames.com
Groundhog Day Competition


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

Page created in 0.068 seconds with 25 queries.