Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MusicallyInspired

Pages: 1 ... 3 4 [5] 6 7 ... 118
61
SCI Syntax Help / Re: SCI0: Title screen menu
« on: April 03, 2023, 12:14:59 AM »
Here's my script for recreating KQ1SCI's title screen for my KQ2SCI project:

Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
;
; King's Quest II SCI Remake
; By Brandon Blume
(script# TITLESCREEN_SCRIPT)
(include sci.sh)
(include game.sh)
(include keys.sh)
(use main)
(use game)
(use menubar)
(use obj)
(use cycle)
(use user)
(use controls)
(use feature)

(public
TitleScreen 0
)

(local
title1 =  0
title2 =  0
sIntro =  1
sBegin =  0
sCred =  0
sCont =  0
sMenuStart =  0
bootingup = TRUE
keyheld = FALSE
indicator = {}
)

(instance TitleScreen of Rm
(properties
picture 95;scriptNumber
)

(method (init)
; Set up the title screen
(= gDefaultPalette 1)
(ProgramControl)
(= gProgramControl TRUE)
(gGame setSpeed: 4)
(SL disable:)
(SetCursor gLoadingCursor (HaveMouse))
(TheMenuBar hide:)
(super init:)
(self setScript: RoomScript)
(gEgo init: hide:)
(theRomance init: hide:)
(theThrone init: hide: )
)
)

; (send gTheMusic:prevSignal(0)stop()number(1)loop(0)play())

(instance RoomScript of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(0 (= cycles 20)
(SetCursor gLoadingCursor (HaveMouse))
)
(1
(= cycles 80)
(= bootingup FALSE)
(DrawPic scriptNumber dpOPEN_CENTEREDGE dpCLEAR gDefaultPalette)
(theRomance show:)
(theThrone show:)
(theSpark1 init: setCycle: Fwd)
(theSpark2 init: setCycle: Fwd)
(theSpark3 init: setCycle: Fwd)
(theSpark4 init: setCycle: Fwd)
(theSpark5 init: setCycle: Fwd)
(theSpark6 init: setCycle: Fwd)
(theSpark7 init: setCycle: Fwd)
(theSpark8 init: setCycle: Fwd)
(gTheMusic prevSignal: 0 stop: number: 1 loop: 0 play:)
(SetCursor gLoadingCursor 0)
(= title1
(Display
{SCI Alpha 0.1}
dsCOORD 0 170
dsALIGN alCENTER
dsWIDTH 320
dsCOLOUR clWHITE
dsBACKGROUND clTRANSPARENT
dsFONT 4
dsSAVEPIXELS
)
)
(= title2
(Display
{By: Brandon Blume}
dsFONT 4
dsCOORD 0 180
dsWIDTH 320
dsALIGN alCENTER
dsCOLOUR clWHITE
dsBACKGROUND clTRANSPARENT
dsSAVEPIXELS
)
)
)
(2
(= cycles 15)
(theRomance hide:)
(theThrone hide:)
(Display {} dsRESTOREPIXELS title1)
(Display {} dsRESTOREPIXELS title2)
)
(3
(if gDefaultPalette
(= gDefaultPalette 0)
)
(gGame setCursor: gNormalCursor (HaveMouse))
(= sMenuStart 1)
(theRomance dispose:)
(theThrone dispose:)
(Display {} dsRESTOREPIXELS title1)
(Display {} dsRESTOREPIXELS title2)
(buttonIntro init: loop: 1 setScript: pressIntro)
(buttonBegin init: loop: 2 setScript: pressBegin)
(buttonCred init: loop: 3 setScript: pressCred)
(buttonCont init: loop: 4 setScript: pressCont)
(cond
(sIntro (buttonSelect init: loop: 5 posn: 58 146))
(sBegin (buttonSelect init: loop: 5 posn: 161 146))
(sCred (buttonSelect init: loop: 5 posn: 58 165))
(sCont (buttonSelect init: loop: 5 posn: 161 165))
)
)
)
)

(method (handleEvent pEvent)
(super handleEvent: pEvent)
(if (== (pEvent type?) evKEYBOARD)
(if bootingup
(switch (pEvent message:)
(KEY_w
(= gDefaultPalette 0)
)
(KEY_W
(= gDefaultPalette 0)
)
(KEY_b
(= gDefaultPalette 2)
)
(KEY_B
(= gDefaultPalette 2)
)
(KEY_p
(= gDefaultPalette 3)
)
(KEY_P
(= gDefaultPalette 3)
)
)
else
(cond
((== (pEvent message:) KEY_RETURN)
(if sMenuStart
(cond
(sBegin (gTheMusic fade:) (gRoom newRoom: INITROOMS_SCRIPT))
(sCont (gGame restore:))
(sIntro
(= gIntro 1)
(gTheMusic fade:)
(gRoom newRoom: INTRO_SCRIPT)
)
(sCred
(= gCred 1)
(gTheMusic fade:)
(gRoom newRoom: INTROCREDITS_SCRIPT)
)
)
else
(RoomScript changeState: 3)
)
)
(sMenuStart
(Print
{Use the arrow keys then enter or mouse to select option.}
)
)
)
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 1) (selectorCheckUp)) ; UP
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 5) (selectorCheckDown)) ; Down
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 7) (selectorCheckLeft)) ; Left
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 3) (selectorCheckRight)) ; Right
)
)
(if (== (pEvent type?) evMOUSEBUTTON)
(if sMenuStart
(cond
(
(and
(> (pEvent x?) (buttonBegin nsLeft?))
(< (pEvent x?) (buttonBegin nsRight?))
(> (pEvent y?) (buttonBegin nsTop?))
(< (pEvent y?) (buttonBegin nsBottom?))
)
(if sBegin
(selectorZero)
(= sBegin 1)
(gTheMusic fade:)
(gRoom newRoom: INITROOMS_SCRIPT)
else
(pressBegin changeState: 2)
)
)
(
(and
(> (pEvent x?) (buttonCont nsLeft?))
(< (pEvent x?) (buttonCont nsRight?))
(> (pEvent y?) (buttonCont nsTop?))
(< (pEvent y?) (buttonCont nsBottom?))
)
(if sCont
(selectorZero)
(= sCont 1)
(gGame restore:)
else
(pressCont changeState: 2)
)
)
(
(and
(> (pEvent x?) (buttonCred nsLeft?))
(< (pEvent x?) (buttonCred nsRight?))
(> (pEvent y?) (buttonCred nsTop?))
(< (pEvent y?) (buttonCred nsBottom?))
)
(if sCred
(selectorZero)
(= gCred 1)
(gTheMusic fade:)
(gRoom newRoom: INTROCREDITS_SCRIPT)
else
(pressCred changeState: 2)
)
)
(
(and
(> (pEvent x?) (buttonIntro nsLeft?))
(< (pEvent x?) (buttonIntro nsRight?))
(> (pEvent y?) (buttonIntro nsTop?))
(< (pEvent y?) (buttonIntro nsBottom?))
)
(if sIntro
(selectorZero)
(= gIntro 1)
(gTheMusic fade:)
(gRoom newRoom: INTRO_SCRIPT)
else
(pressIntro changeState: 2)
)
)
(else
(Print
{Use the arrow keys then enter or mouse to select option.}
)
)
)
else
(RoomScript changeState: 3)
)
)
)
)


; Menu Selector Procedures
; Menu select UP
(procedure (selectorCheckUp)
(cond
(sBegin (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
(sCont (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
(sCred (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sIntro (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
)
)

; Menu select DOWN
(procedure (selectorCheckDown)
(cond
(sBegin (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
(sCont (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sCred (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
(sIntro (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
)
)

; Menu select LEFT
(procedure (selectorCheckLeft)
(cond
(sBegin (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sCont (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
(sCred (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
(sIntro (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
)
)

; Menu select RIGHT
(procedure (selectorCheckRight)
(cond
(sBegin (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
(sCont (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sCred (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
(sIntro (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
)
)

; Reset all menu buttons (for use when enabling a buttons variable)
(procedure (selectorZero)
(= sBegin 0)
(= sCont 0)
(= sCred 0)
(= sIntro 0)
)

; Mouse click on new button instances
; when selector is not currently on them
; Mouse click on Begin Game button
(instance pressBegin of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 1)
(selectorZero)
(= sBegin 1)
(buttonSelect posn: 161 146)
)
(3
(gTheMusic fade:)
(gRoom newRoom: INITROOMS_SCRIPT)
)
)
)
)

; Mouse click on Introduction button
(instance pressIntro of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 1)
(selectorZero)
(= sIntro 1)
(buttonSelect posn: 58 146)
)
(3
(gTheMusic fade:)
(gRoom newRoom: INTRO_SCRIPT)
)
)
)
)

; Mouse click on Credits button
(instance pressCred of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 1)
(selectorZero)
(= sCred 1)
(buttonSelect posn: 58 165)
)
(3
(gTheMusic fade:)
(gRoom newRoom: INTROCREDITS_SCRIPT)
)
)
)
)

; Mouse click on Continue Game button
(instance pressCont of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 3)
(selectorZero)
(= sCont 1)
(buttonSelect posn: 161 165)
)
(3 (gGame restore:))
)
)
)

; Forward then backward "Shimmer" animation
(instance shimmerScript of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(1
(theSpark1 setCycle: End shimmerScript)
)
(2
(theSpark1 setCycle: Beg shimmerScript)
)
(3
(shimmerScript changeState: 1)
)
)
)
)
                                                ; make it all loop around forever!
; Prop Instances
(instance theRomance of Prop
(properties
x 86
y 166
view 913
cel 0
)
)

(instance theThrone of Prop
(properties
x 236
y 162
view 913
cel 1
)
)

(instance theSpark1 of Prop
(properties
; x 61 //KQ1
; y 27 //KQ1
x 67                ; KQ4
y 26                ; KQ4
view 950
cycleSpeed 2
)
)

(instance theSpark2 of Prop
(properties
x 97                ; Both
y 59                ; Both
view 950
cycleSpeed 3
cel 2
)
)

(instance theSpark3 of Prop
(properties
; x 130 //KQ1
; y 21 //KQ1
x 142               ; KQ4
y 20                ; KQ4
view 950
cycleSpeed 2
cel 4
)
)

(instance theSpark4 of Prop
(properties
; x 182 //KQ1
; y 21 //KQ1
x 187               ; KQ4
y 28                ; KQ4
view 950
cycleSpeed 1
)
)

(instance theSpark5 of Prop
(properties
; x 208 //KQ1
; y 54 //KQ1
x 213               ; KQ4
y 62                ; KQ4
view 950
cycleSpeed 7
cel 1
)
)

(instance theSpark6 of Prop
(properties
; x 264 //KQ1
; y 32 //KQ1
x 268               ; KQ4
y 38                ; KQ4
view 950
cycleSpeed 5
)
)

(instance theSpark7 of Prop
(properties
x 143
y 89
view 950
cycleSpeed 6
cel 3
)
)

(instance theSpark8 of Prop
(properties
x 174
y 117
view 950
cycleSpeed 4
)
)

(instance buttonIntro of Prop
(properties
x 58
y 146
view 950
)
)

(instance buttonBegin of Prop
(properties
x 161
y 146
view 950
)
)

(instance buttonCred of Prop
(properties
x 58
y 165
view 950
)
)

(instance buttonCont of Prop
(properties
x 161
y 165
view 950
)
)

(instance buttonSelect of Prop
(properties
; x 58
; y 146
view 950
)
)

62
Nice!!!

63
SCI Development Tools / Re: Yamaha FB-01/IMF sound tools
« on: March 07, 2023, 01:13:33 AM »
I'll wait until I update FB2SCI, but yeah at some point I'll do that.

64
SCI Development Tools / Yamaha FB-01/IMF sound tools
« on: March 06, 2023, 01:43:29 PM »
I've written two programs to deal with patch banks for SCI0 and SCI1 games that support the Yamaha FB-01/IBM Music Feature Card. These work similarly to NRS's Bnk2Pat, Pat2Bnk, and Syx2Pat which works with Adlib and MT-32 patch banks. Now we have tools for the FB-01 as well! For those who don't know, the FB-01/IMF is an FM synth generator module/card similar to Adlib but works in a different way. Only the early Sierra games support it (up to QFG2 and KQ5). I've written these tools because I'm trying to support the FB-01 for Doan's Betrayed Alliance Book 1 and Book 2 games since they're both made in SCI0.

SCI2FB
Converts SCI FB-01/IMF patch bank resources to the FB-01's sysex bank file for use with the FB-01 (or an emulator) and software so you can capture the instruments from Sierra games
https://github.com/MusicallyInspired/SCI2FB

FB2SCI
Converts two FB-01 sysex bank files into one SCI patch bank resource file. You can create custom banks for custom SCI games (or even Sierra SC0/SCI1 games that don't have official FB-01/IMF support).
https://github.com/MusicallyInspired/FB2SCI

I'm going to make an update to FB2SCI so that you can create a SCI patch resource with only one bank instead of two if you want (early games like KQ4, PQ2, and LSL2 only have one bank of 48 instrument voices instead of two banks with 96 total). But for now it can only create a 2-bank patch file.

EDIT: Here's a thread from 3 years ago that talked about the potential for this for SCI games up to SCI1.1 as long as we had instrument patch files for each game. Now we can. :)
https://sciprogramming.com/community/index.php?topic=1882

And here's another thread where we were talking about this TEN years ago! Better late than never, right?  ;D
https://sciprogramming.com/community/index.php?topic=746.0

65
SCI Development Tools / Re: SCI0: Soundblaster / Adlib music
« on: March 06, 2023, 01:32:50 PM »
MT32.DRV - MT-32 music and MT-32 MIDI-based sound effects
MTBLAST.DRV - MT-32 music and digital sound effects (if any)
ADL.DRV - Adlib music and Adlib MIDI-based sound effects
SNDBLAST.DRV - Stereo Adlib music and digital sound effects (if any)

You will also need the PATCH file for the Adlib instruments (PATCH.003). If the sound file you are playing back is being played with the wrong patch bank the instruments may sound wrong and some may not sound at all. Ditto for MT-32 (which uses PATCH.001).

66
SCI Syntax Help / Re: SCI0: gTheMusic Roland MT32
« on: March 01, 2023, 01:23:35 PM »
You cannot use SCI1+ drivers with SCI0 games. You will need a MTBLAST and SNDBLAST that's specifically for SCI0. The driver structure is entirely different and SCI0 won't understand it.

67
Yamaha FB-01/IMFC support is coming soon as well as GM.

68
Well I guess we know who's actually really stupid.  :-[  ;D

69
Lol dude I feel stupid

70
Lol dude we've been trying to get a hold of any content from Mega-Tokyo for more than a decade. Please share!

71
What a milestone!

72
AGI Development Tools / Re: C# AGI Interpreter
« on: November 20, 2022, 05:40:34 PM »
I believe the bug only took place if you put the game in any speed except Normal?

I made my own LOGIC patch with AGI Studio years back that skipped the copy protection. It's my goto now when I want to play it. I think I even patched the Apple IIgs version this way. But I still like keeping the original around so I can do my "last words" at the gallows.  ;D

EDIT: Never mind, I had tried to patch the IIGS version but it must not have worked or I ran into too much trouble at the time.

73
AGI Development Tools / Re: C# AGI Interpreter
« on: November 07, 2022, 12:44:29 PM »
It's really authentic already at any rate. If it had to be this way forever and couldn't be fine-tuned it wouldn't be the worst thing.

74
AGI Development Tools / Re: C# AGI Interpreter
« on: November 01, 2022, 02:11:19 AM »
It's been confirmed by a friend of mine that DOSBox actually does impose a filter over the Tandy 3-voice tones after some digging he did in the past to find out why it sounded different. His quote:

Quote
I believe it's because pure squarewaves sound "weird" when played through what amounts to high-end stereo equipment (our modern speakers)...
(high-end from the point of view of 80s gear)
So it's doing a sort of simulation of "cheap speaker buried in a metal box"

75
AGI Development Tools / Re: C# AGI Interpreter
« on: October 30, 2022, 12:10:25 PM »
Trying SQ2 with the latest build Collector posted on the SHP forums. The sound of the sweeping is still wrong (though it sounds like the truncation problem is solved). I decided to test between AGILE, ScummVM, and DOSBox to see how they all measured up. To my surprise it seems like ScummVM doesn't produce the sound correctly either. So while ScummVM has the best tone emulation (until now) with its volume envelope on the notes, DOSBox has the best noise emulation. I took a screen capture. The first one (top left) is AGILE, the second one (top right) is ScummVM, and the bottom one is DOSBox.

https://drive.google.com/file/d/1tFzwrzeT_8URmg6C_f_Lv3VTWRibc-zZ/view?usp=share_link

EDIT: I decided after to do a tone comparison as well and was surprised again at the result. AGILE's tone generation sounds perfect and crisp. ScummVM's tone is great but it sounds like it's also aliasing. And DOSBox's sounds like there's a filter over it so the crispness is lost. Or perhaps the tones generated are not perfect square waves? The tone falloff is also not as noticeable. Just thought it'd be an interesting share. So AGILE's tone generation is the crispiest of them all! :D

https://drive.google.com/file/d/1JZJG1Unfuh8oIXblXZHeJhgaKqIBrknT/view?usp=sharing

Pages: 1 ... 3 4 [5] 6 7 ... 118

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

Page created in 0.028 seconds with 21 queries.