Author Topic: Views with more than 64 colors  (Read 4599 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Views with more than 64 colors
« on: August 02, 2018, 07:57:29 AM »
I have a need for a view that will be used in multiple rooms and the built-in 64 colors aren't enough so I created a view using the first 112 palette entries.  My rooms share the same first 112 palette entries and the remainder of the palette is used for the room colors.

In the room I init the view and it nukes the current room palette, the only thing I've found that allow for the room and view to display propertly is to force the palette to be updated in the doit method.

Code: [Select]
  (method (init)
(super init:)
(thief init:)
)

(method (doit)
(Palette palSET_FROM_RESOURCE 0)
)

This feels wrong to be making the call in the doit.  I did try using a changeState method in a room script, but that didn't work - looks like the view's palette overrides the room palette.  Is there a better way to be doing this?


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Kawa

Re: Views with more than 64 colors
« Reply #1 on: August 02, 2018, 02:12:38 PM »
You really don't want to do full palette sets in a doit.

What you could do, purely hypothetical, is maybe have 999.pal have all 112 colors? There's nothing "built in" about the "standard" palette being 64 colors, after all.

Offline gumby

Re: Views with more than 64 colors
« Reply #2 on: August 02, 2018, 07:09:43 PM »
Setting the additional colors in the 999 palette didn't work for me initially.  However, once I trashed my first version of the view and started from scratch w/999 it worked without a hitch.  Thanks Kawa.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Kawa

Re: Views with more than 64 colors
« Reply #3 on: August 02, 2018, 07:30:04 PM »
Well, the view's embedded palette could've interfered with the newly-extended 999.pal so I can see that not working. Grats on your success, and good night!

Offline lskovlun

Re: Views with more than 64 colors
« Reply #4 on: August 06, 2018, 06:20:08 PM »
Since bugs/missing features came up in that other thread, I'm going to just say this: One advantage of the new (SCI 1.1) palette format over the old is that you can have palettes that don't cover all 256 colors. Peeking in the SCICompanion source reveals that Phil knows this, but it is still not supported. In addition, at some point during the transition from SCI1.0 to SCI1.1, the palette handling changed from what Gumby seems to believe it should be (merging) to copying. I believe in this case restricting the view palette to the relevant palette range should do it (but that requires support). I'm not sure about this part though; I didn't code it in ScummVM.


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

Page created in 0.027 seconds with 22 queries.