It is currently Tue Nov 21, 2017 8:06 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Hello my foreign friends. Freddy Pharkas question here...
PostPosted: Fri Aug 19, 2011 7:28 pm 
Offline
Peasant Status

Joined: Mon Jul 06, 2009 5:02 pm
Posts: 8
Hello!

I'm currently translating a two Sierra's adventures: QFG IV and Freddy Pharkas.

I'm having a trouble positioning menu buttons at start screen of FP.
Look at this picture:
Image

Don't pay attention to strange letters :) It's Russian language.
But how you can clearly see, the buttons of menu moved from its places, because of font widths rearrangement.

Can anybody give me a hint how and where to correct a script to rearrange buttons for my needs?
I got a strong feeling that's an answer is hiding somewhere in the 110.scr.

Here's a source of 110.scr (and please explain to me how to compile it back to game :)) I'm just a painter and translator, not a programmer.

Quote:
export110_0 = rm110

rm110::init:
pushi $f1 ; 241, disable
push0
lag global[$45]
send $4
pushi $81 ; 129, addToFront
push1
pushSelf
lag global[$48]
send $6
pushi $81 ; 129, addToFront
push1
pushSelf
lag global[$49]
send $6
pushi $cc ; 204, setCursor
push2
pushi $3e4 ; 996, BAD SELECTOR
push1
lag global[$1]
send $8
pushi $28 ; 40, '(', number
push1
pushi $68 ; 104, 'h', scaleX
pushi $63 ; 99, 'c', flags
push1
push1
pushi $3 ; loop
push1
push1
pushi $ab ; 171, prevSignal
push1
push0
pushi $27 ; 39, ''', play
push1
pushSelf
lag global[$66]
send $1e
pushi $6e ; 110, 'n', init
push0
pushi $66 ; 102, 'f', hide
push0
lofsa titleView1
send $8
pushi $6e ; 110, 'n', init
push0
pushi $66 ; 102, 'f', hide
push0
lofsa titleView2
send $8
pushi $3 ; loop
pushi $8f ; 143, caller
push0
pushi $6e ; 110, 'n', init
calle export958_0, $6
pushi $6e ; 110, 'n', init
push0
super FPRoom, $4
pushi $92 ; 146, setScript
push1
lofsa sTownScript
push
self $6
ret

rm110::handleEvent:
pushi $1f ; 31, type
push0
lap param[$1]
send $4
bnt code_00ca
lal local[$6]
not
bnt code_00ca
ldi $1
sal local[$6]
pushi $49 ; 73, 'I', claimed
push1
push1
lap param[$1]
send $6
pushi $90 ; 144, changeState
push1
pushi $6 ; nsTop
lofsa sTownScript
send $6
code_00ca: ret

rm110::dispose:
pushi $6f ; 111, 'o', dispose
push0
super FPRoom, $4
pushi $51 ; 81, 'Q', delete
push1
pushSelf
lag global[$48]
send $6
pushi $51 ; 81, 'Q', delete
push1
pushSelf
lag global[$49]
send $6
ret

sTownScript::changeState:
lap param[$1]
aTop state
push
dup
ldi $0
eq?
bnt code_010b
pushi $ab ; 171, prevSignal
push0
lag global[$66]
send $4
push
ldi $a ; 10, lsTop
eq?
bnt code_0102
ldi $1
aTop cycles
jmp code_0562

code_0102: dpToa state
ldi $1
aTop cycles
jmp code_0562

code_010b: dup
ldi $1
eq?
bnt code_0187
ldi $0
sal local[$6]
pushi $28 ; 40, '(', number
push1
pushi $b66 ; 2918, BAD SELECTOR
pushi $63 ; 99, 'c', flags
push1
push1
pushi $3 ; loop
push1
push1
pushi $27 ; 39, ''', play
push0
lofsa yellSound
send $16
pushi $131 ; 305, setScale
push1
pushi $a ; 10, lsTop
pushi $131 ; 305, setScale
push0
pushi $3f ; 63, '?', setPri
push1
pushi $f ; 15, illegalBits
pushi $9b ; 155, setLoop
push1
push0
pushi $142 ; 322, setStep
push2
pushi $5 ; underBits
dup
lofsa titleView1
send $1e
ldi $a ; 10, lsTop
sal local[$2]
code_014f: lsl local[$2]
ldi $81 ; 129, addToFront
lt?
bnt code_0180
push2
pushi $18 ; 24, elements
push0
lag global[$5]
send $4
push
push1
callk kernel_11, $4
pushi $68 ; 104, 'h', scaleX
push1
lsl local[$2]
pushi $69 ; 105, 'i', scaleY
push1
lsl local[$2]
pushi $e0 ; 224, show
push0
lofsa titleView1
send $10
lsl local[$2]
ldi $6 ; nsTop
add
sal local[$2]
jmp code_014f

code_0180: ldi $1
aTop cycles
jmp code_0562

code_0187: dup
ldi $2
eq?
bnt code_01af
ldi $1
sal local[$4]
pushi $ab ; 171, prevSignal
push0
lag global[$66]
send $4
push
ldi $14 ; 20, name
eq?
bnt code_01a6
ldi $1
aTop cycles
jmp code_0562

code_01a6: dpToa state
ldi $1
aTop cycles
jmp code_0562

code_01af: dup
ldi $3 ; loop
eq?
bnt code_021a
pushi $12b ; 299, stopUpd
push0
lofsa titleView1
send $4
pushi $131 ; 305, setScale
push1
pushi $a ; 10, lsTop
pushi $131 ; 305, setScale
push0
pushi $3f ; 63, '?', setPri
push1
pushi $f ; 15, illegalBits
pushi $9b ; 155, setLoop
push1
push1
pushi $142 ; 322, setStep
push2
pushi $5 ; underBits
dup
lofsa titleView2
send $1e
ldi $a ; 10, lsTop
sal local[$2]
code_01e2: lsl local[$2]
ldi $81 ; 129, addToFront
lt?
bnt code_0213
push2
pushi $18 ; 24, elements
push0
lag global[$5]
send $4
push
push1
callk kernel_11, $4
pushi $68 ; 104, 'h', scaleX
push1
lsl local[$2]
pushi $69 ; 105, 'i', scaleY
push1
lsl local[$2]
pushi $e0 ; 224, show
push0
lofsa titleView2
send $10
lsl local[$2]
ldi $3 ; loop
add
sal local[$2]
jmp code_01e2

code_0213: ldi $1
aTop cycles
jmp code_0562

code_021a: dup
ldi $4 ; cel
eq?
bnt code_0234
ldi $1
sal local[$5]
pushi $12b ; 299, stopUpd
push0
lofsa titleView2
send $4
ldi $3 ; loop
aTop seconds
jmp code_0562

code_0234: dup
ldi $5 ; underBits
eq?
bnt code_025c
pushi $ab ; 171, prevSignal
push0
lag global[$66]
send $4
push
ldi $1e ; 30, font
eq?
bnt code_0253
ldi $1
sal local[$3]
ldi $1
aTop cycles
jmp code_0562

code_0253: dpToa state
ldi $1
aTop cycles
jmp code_0562

code_025c: dup
ldi $6 ; nsTop
eq?
bnt code_0299
ldi $1
sal local[$6]
lal local[$4]
not
bnt code_027c
pushi $67 ; 103, 'g', scaleSignal
push1
push0
pushi $e0 ; 224, show
push0
pushi $12b ; 299, stopUpd
push0
lofsa titleView1
send $e
code_027c: lal local[$5]
not
bnt code_0292
pushi $67 ; 103, 'g', scaleSignal
push1
push0
pushi $e0 ; 224, show
push0
pushi $12b ; 299, stopUpd
push0
lofsa titleView2
send $e
code_0292: ldi $1
aTop cycles
jmp code_0562

code_0299: dup
ldi $7 ; nsLeft
eq?
bnt code_03c2
pushi $cc ; 204, setCursor
pushi $4 ; cel
pushi $3e7 ; 999, BAD SELECTOR
push1
pushi $4a ; 74, 'J', value
pushi $af ; 175, hold
lag global[$1]
send $c
pushi $ae ; 174, pause
push1
push0
lag global[$66]
send $6
pushi $d0 ; 208, dialog
push1
lofsa TBDialog
push
pushi $1e ; 30, font
push1
lsg global[$16]
pushi $99 ; 153, posn
push2
pushi $2e ; 46, '.', b-i1
pushi $a0 ; 160, set
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
push1
pushi $13 ; 19, brRight
push0
push0
push1
push0
push0
push0
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
push2
pushi $13 ; 19, brRight
push0
push0
pushi $6 ; nsTop
pushi $37 ; 55, '7', heading
push0
push0
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
pushi $3 ; loop
pushi $13 ; 19, brRight
push0
push0
pushi $3 ; loop
pushi $6e ; 110, 'n', init
push0
push0
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
pushi $4 ; cel
pushi $13 ; 19, brRight
push0
push0
pushi $4 ; cel
pushi $95 ; 149, globalize
push0
push0
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
push0
pushi $13 ; 19, brRight
push0
push0
pushi $5 ; underBits
pushi $bc ; 188, moveTo
push0
push0
pushi $6e ; 110, 'n', init
push0
class Print
send $7c
push
dup
ldi $0
eq?
bnt code_033c
ldi $0
sal local[$0]
ldi $1
sag global[$4]
jmp code_03ba

code_033c: dup
ldi $1
eq?
bnt code_0354
pushi $ae ; 174, pause
push1
push1
lag global[$66]
send $6
pushi $4c ; 76, 'L', restore
push0
lag global[$1]
send $4
jmp code_03ba

code_0354: dup
ldi $2
eq?
bnt code_0373
ldi $0
sal local[$0]
pushi $b0 ; 176, fade
push0
lag global[$66]
send $4
pushi $181 ; 385, newRoom
push1
pushi $96 ; 150, hotSpotX
lag global[$2]
send $6
jmp code_03ba

code_0373: dup
ldi $3 ; loop
eq?
bnt code_0391
ldi $0
sal local[$0]
pushi $b0 ; 176, fade
push0
lag global[$66]
send $4
pushi $181 ; 385, newRoom
push1
pushi $1a ; 26, back
lag global[$2]
send $6
jmp code_03ba

code_0391: dup
ldi $4 ; cel
eq?
bnt code_03ba
pushi $ae ; 174, pause
push1
push1
lag global[$66]
send $6
pushi $28 ; 40, '(', number
push1
pushi $26c ; 620, clear
pushi $63 ; 99, 'c', flags
push1
push1
pushi $3 ; loop
push1
pushi $ff ; 255, cycler
pushi $27 ; 39, ''', play
push0
lag global[$67]
send $16
ldi $1
sal local[$1]
code_03ba: toss
ldi $1
aTop cycles
jmp code_0562

code_03c2: dup
ldi $8 ; nsBottom
eq?
bnt code_0517
lal local[$1]
bnt code_0511
pushi $20 ; 32, ' ', window
push1
class SysWindow
push
pushi $1e ; 30, font
push1
lsg global[$16]
pushi $d6 ; 214, addTitle
pushi $5 ; underBits
pushi $11 ; 17, brLeft
push0
push0
push1
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
push1
pushi $4 ; cel
push0
push0
push1
push0
push0
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
push2
pushi $5 ; underBits
push0
push0
push1
push0
pushi $11 ; 17, brLeft
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
pushi $3 ; loop
pushi $6 ; nsTop
push0
push0
push1
push0
pushi $22 ; 34, '"', max
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
pushi $4 ; cel
pushi $7 ; nsLeft
push0
push0
push1
push0
pushi $33 ; 51, '3', xStep
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
pushi $5 ; underBits
pushi $8 ; nsBottom
push0
push0
push1
push0
pushi $44 ; 68, 'D', wordFail
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
pushi $6 ; nsTop
pushi $9 ; nsRight
push0
push0
push1
push0
pushi $55 ; 85, 'U', subtitleLang
pushi $6e ; 110, 'n', init
pushi $d4 ; 212, addButton
pushi $8 ; nsBottom
push0
pushi $a ; 10, lsTop
push0
push0
push1
push0
pushi $66 ; 102, 'f', hide
pushi $6e ; 110, 'n', init
dup
push0
class Print
send $aa
push
dup
ldi $0
eq?
bnt code_0485
ldi $1
sal local[$0]
ldi $0
sal local[$1]
pushi $ad ; 173, stop
push0
lag global[$67]
send $4
pushi $ae ; 174, pause
push1
push0
lag global[$66]
send $6
ldi $1
aTop cycles
jmp code_050e

code_0485: dup
ldi $1
eq?
bnt code_049d
pushi $aa ; 170, say
pushi $5 ; underBits
pushi $b ; 11, lsLeft
push0
push0
push0
pushSelf
lag global[$5b]
send $e
jmp code_050e

code_049d: dup
ldi $2
eq?
bnt code_04b4
pushi $aa ; 170, say
pushi $5 ; underBits
pushi $c ; 12, lsBottom
push0
push0
push0
pushSelf
lag global[$5b]
send $e
jmp code_050e

code_04b4: dup
ldi $3 ; loop
eq?
bnt code_04cb
pushi $aa ; 170, say
pushi $5 ; underBits
pushi $d ; 13, lsRight
push0
push0
push0
pushSelf
lag global[$5b]
send $e
jmp code_050e

code_04cb: dup
ldi $4 ; cel
eq?
bnt code_04e2
pushi $aa ; 170, say
pushi $5 ; underBits
pushi $e ; 14, signal
push0
push0
push0
pushSelf
lag global[$5b]
send $e
jmp code_050e

code_04e2: dup
ldi $5 ; underBits
eq?
bnt code_04f9
pushi $aa ; 170, say
pushi $5 ; underBits
pushi $f ; 15, illegalBits
push0
push0
push0
pushSelf
lag global[$5b]
send $e
jmp code_050e

code_04f9: dup
ldi $6 ; nsTop
eq?
bnt code_050e
pushi $aa ; 170, say
pushi $5 ; underBits
pushi $10 ; 16, brTop
push0
push0
push0
pushSelf
lag global[$5b]
send $e
code_050e: toss
jmp code_0562

code_0511: ldi $1
aTop cycles
jmp code_0562

code_0517: dup
ldi $9 ; nsRight
eq?
bnt code_0531
lal local[$1]
bnt code_052b
pushi $90 ; 144, changeState
push1
pushi $8 ; nsBottom
self $6
jmp code_0562

code_052b: ldi $1
aTop cycles
jmp code_0562

code_0531: dup
ldi $a ; 10, lsTop
eq?
bnt code_054b
lal local[$0]
bnt code_0545
pushi $90 ; 144, changeState
push1
pushi $7 ; nsLeft
self $6
jmp code_0562

code_0545: ldi $1
aTop cycles
jmp code_0562

code_054b: dup
ldi $b ; 11, lsLeft
eq?
bnt code_0562
pushi $cc ; 204, setCursor
push2
pushi $3e4 ; 996, BAD SELECTOR
push1
lag global[$1]
send $8
pushi $6f ; 111, 'o', dispose
push0
self $4
code_0562: toss
ret

TBDialog::doit:
link $3
lsg global[$56]
push0
callk kernel_66, $0
add
sag global[$58]
ldi $0
sat temp[$2]
pushi $77 ; 119, 'w', eachElementDo
push1
pushi $6e ; 110, 'n', init
self $6
pToa theItem
bnt code_0585
pushi $b8 ; 184, select
push1
push0
send $6
code_0585: lap param[$0]
bnt code_0591
lap param[$1]
bnt code_0591
lap param[$1]
jmp code_059a

code_0591: pushi $78 ; 120, 'x', firstTrue
push2
pushi $bf ; 191, checkState
push1
self $8
code_059a: aTop theItem
pToa theItem
bnt code_05a7
pushi $b8 ; 184, select
push1
push1
send $6
code_05a7: pToa theItem
not
bnt code_05b8
lag global[$4f]
aTop eatTheMice
push0
callk kernel_66, $0
aTop lastTicks
jmp code_05bc

code_05b8: ldi $0
aTop eatTheMice
code_05bc: ldi $0
sat temp[$1]
code_05c0: lat temp[$1]
not
bnt code_067f
lsg global[$56]
push0
callk kernel_66, $0
add
sag global[$58]
pushi $77 ; 119, 'w', eachElementDo
push1
pushi $c0 ; 192, cycle
self $6
pushi $94 ; 148, localize
push0
pushi $6d ; 109, 'm', new
push0
class Event
send $4
send $4
sat temp[$0]
pToa eatTheMice
bnt code_0614
dpToa eatTheMice
pushi $1f ; 31, type
push0
lat temp[$0]
send $4
push
ldi $1
eq?
bnt code_0601
pushi $1f ; 31, type
push1
push0
lat temp[$0]
send $6
code_0601: pTos lastTicks
push0
callk kernel_66, $0
eq?
bnt code_060e
jmp code_0601

jmp code_0601

code_060e: push0
callk kernel_66, $0
aTop lastTicks
code_0614: pushi $77 ; 119, 'w', eachElementDo
pushi $4 ; cel
pushi $60 ; 96, '`', perform
lofsa checkHiliteCode
push
pushSelf
lst temp[$0]
self $c
pushi $85 ; 133, handleEvent
push1
lst temp[$0]
self $6
sat temp[$1]
pushi $6f ; 111, 'o', dispose
push0
lat temp[$0]
send $4
pushi $b4 ; 180, check
push0
self $4
bnt code_063e
jmp code_067f

code_063e: lst temp[$1]
ldi $fe ; 254, cycleSpeed
eq?
bnt code_0652
ldi $0
sat temp[$1]
push2
pTos theItem
push0
callk kernel_25, $4
jmp code_067f

code_0652: pushi $77 ; 119, 'w', eachElementDo
push1
pushi $b4 ; 180, check
lag global[$8]
send $6
push1
push1
callk kernel_65, $2
pushi $ab ; 171, prevSignal
push0
lag global[$66]
send $4
push
ldi $ff ; 255, cycler
eq?
bnt code_05c0
push1
pushi $65 ; 101, 'e', restart
callb export000_3, $2
ldi $2
sat temp[$1]
jmp code_067f

jmp code_05c0

code_067f: lat temp[$1]
ret

checkHiliteCode::doit:
pushi $1d ; 29, state
push0
lap param[$1]
send $4
push
ldi $1
and
bnt code_06cb
pushi $b4 ; 180, check
push1
lsp param[$3]
lap param[$1]
send $6
bnt code_06cb
pushi $1d ; 29, state
push0
lap param[$1]
send $4
push
ldi $8 ; nsBottom
and
not
bnt code_06cb
pushi $b8 ; 184, select
push1
push0
pushi $c2 ; 194, theItem
push0
lap param[$2]
send $4
send $6
pushi $c2 ; 194, theItem
push1
lsp param[$1]
lap param[$2]
send $6
pushi $b8 ; 184, select
push1
push1
lap param[$1]
send $6
code_06cb: ret


Thank you!
Kokka,
Russia, Moscow.


Top
 Profile  
 
 Post subject: Re: Hello my foreign friends. Freddy Pharkas question here..
PostPosted: Sat Aug 20, 2011 12:20 pm 
Offline
Trusty Riding Saurus
User avatar

Joined: Mon Sep 24, 2007 10:02 pm
Posts: 1100
Look for five system calls with the same parameter (I'm not familiar with this assember, so just look for commands that repeat at least five times).
Before the system call, there should be some "push" commands the set the button coordinates. Because all buttons have the same height, you know you have found them if the "push" command before the system call share one value on five occasions, while other value increases between calls.

You should change the value that increases to relocate the buttons. Always create a backup file before changing anything, and test your changes every step to test that you don't broke anything. :hat

_________________
The moat monsters appreciate your good taste.


Top
 Profile  
 
 Post subject: Re: Hello my foreign friends. Freddy Pharkas question here..
PostPosted: Sun Aug 21, 2011 8:10 am 
Offline
Peasant Status

Joined: Mon Jul 06, 2009 5:02 pm
Posts: 8
Oh! Thanks alot!

Will try to understand what you mean!
Hope, my brain's size will enough for this task :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group