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 - gumby

Pages: [1] 2 3 ... 69
1
What about just be empirical about this?  Can we just take an existing sound resource (as a patch file) that doesn't currently work with AdLib, use a hex editor and just modify the header byte in question?  Muck with it till it works (or doesn't)?

2
It does, yeah.  Just wanted to document it here just in case it helps someone else out in the future.

3
Follow up: The template game code doesn't work out-of-the-box with scaled views however.

In Actor.sc, I changed the onMe method of the View class to first check to see if the view is scaled and if it is compute the scale factor for x and y and use that in the IsItSkip check:
Code: [Select]
(method (onMe param1 param2 &tmp temp0 temp1 xScaleFactor yScaleFactor)
(if (IsObject param1)
(= temp0 (param1 x?))
(= temp1 (param1 y?))
else
(= temp0 param1)
(= temp1 param2)
)
(cond
((& signal $0080) 0)
(
(and (not (IsObject onMeCheck)) (& signal skipCheck))

    (if (!= scaleX maxScale)
        (= xScaleFactor (/ (CelWide view loop cel) (- nsRight nsLeft)))
     else
        (= xScaleFactor 1)
)

(if (!= scaleY maxScale)
        (= yScaleFactor (/ (CelHigh view loop cel) (- nsBottom nsTop)))
     else 
        (= yScaleFactor 1)   
)
   
(if
(or
(not (if (or nsLeft nsRight nsTop) else nsBottom))
(and
(<= nsLeft temp0)
(<= temp0 nsRight)
(<= nsTop temp1)
(<= temp1 nsBottom)
)
)
(not
(IsItSkip
view
loop
cel
(* (- temp1 nsTop) xScaleFactor)
(* (- temp0 nsLeft) yScaleFactor)
)
)
)
)
(else (super onMe: temp0 temp1))
)
)


4
Thank you Lars, greatly appreciate the guidance.  From an implementation perspective, the template game already handled it in Actor.sc.  All I had to do in my code was set the signal for the views to $1000.

5
Is there any way to detect what the color of a pixel is (or the index # of the palette) when clicking on a view?  I have several views that are very large and irregularly shaped and I'd like it so that the view only responds to a click when that click isn't on a transparent portion of it.

If not, I was thinking about solving this need with creating polygons on-the-fly that match the placement of the view on the screen.  Anyone see any gotchas this this approach?  One potential one that comes to mind is that I don't think I want to use any of the existing polygon types, unless maybe PTotalAccess would be appropriate?

6
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: September 15, 2021, 09:36:23 PM »
Just scored 250 out of 350 points in my Zork effort.  Game locked up, I've probably got a memory management issue  ::)

7
SCI Syntax Help / Re: SCI0 - Text window vanishing cutouts of Views
« on: September 11, 2021, 01:02:14 PM »
Yes, I've seen this happen before too.  Not sure how to fix it though.

8
The Games and other Sierra Adventure stuff / Re: What are we working on?
« on: September 02, 2021, 09:11:42 AM »
That's awesome, I never played it.

9
Very nice.  I really liked the Cthulu/frog thing animation eating the hero.

10
SCI Syntax Help / Re: SCI 1.1 - Alternate Palette for Rooms - Grayscale
« on: August 20, 2021, 09:08:11 AM »
Reading through the documentation (under VGA Palette Editor) I figured out the easiest way to do this.  Open a pic and use the 'Adjust' functionality on the existing palette, save that palette off and utilize it when needed.

Lowering the saturation down to the min does what I'm looking for.

11
SCI Syntax Help / SCI 1.1 - Alternate Palette for Rooms - Grayscale
« on: August 19, 2021, 09:13:07 PM »
I have a need to create an alternate grayscale palette for all room pics for Zork (100+).  Similar to day/night scenes I've seen done in SCI0, I'm guessing there have been similar scenes in later Sierra games.  I could create 2x the number of pic resources, but it seems like using an alternate palette for existing pics would be appropriate. I'm thinking of taking each existing palette and converting it to grayscale in a non-manual way?

Any suggestions how best to accomplish what I'm trying to do?

12
SCI Syntax Help / Numeric overflow
« on: August 01, 2021, 11:01:45 AM »
Here's a bit of code that caused downstream problems in my game resulting in OOPS messages.  My use case was debugging the results from checking flags and got nailed when the gFlags index was 16.

Code: [Select]
    (DebugPrint "Flag value = %d" (Btest MY_FLAG))

Simplified, you can get the same result with:
Code: [Select]
    (DebugPrint "Flag value = %d" $8000)

It returns "Print this = -4294934528", which is an overflow for a 16 bit integer - I should have used %x instead  :-[

13
SCI Syntax Help / Re: Status line vertical size
« on: May 27, 2021, 09:16:41 AM »
Thanks for that explanation Kawa

14
SCI Syntax Help / Re: Status line vertical size
« on: May 26, 2021, 07:40:11 PM »
I think another way to do it would be to use the SetPort kernel call.  I found examples of this when digging around in the TitleScreen.sc.

15
SCI Syntax Help / Re: Status line vertical size
« on: May 25, 2021, 06:43:31 PM »
I got it figured out.  Just needed to trigger another call to update the status line code during the init of the room, after the picture is drawn.

EDIT: Better still, I just threw it in as the last line of the drawPic method in the room class.

Pages: [1] 2 3 ... 69

SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.101 seconds with 21 queries.