Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: does get palette work ok?  (Read 3478 times)

0 Members and 1 Guest are viewing this topic.

MichaelVParent

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 62
does get palette work ok?
« on: May 26, 2008, 05:21:11 AM »

Hi everyone,

I'm working on a demo and am using get palette to get the palette from different screens in order to create flashing effects (like lightning)...yet most of the time, Index 4 is corrupted. :(  I thought it might be "flash" and set flash to off for each of the screens but I still have the issue.  all the colors change perfectly accept index 4, which seems to make up its own RGB value....any ideas?

(They are all 32 color images loaded into seperate screens that I'm getting palettes from)

thanks,
Holymonkey
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: does get palette work ok?
« Reply #1 on: May 26, 2008, 04:23:43 PM »

Did you set Flash to off on the screens before or after they were loaded?
Logged

MichaelVParent

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 62
Re: does get palette work ok?
« Reply #2 on: May 26, 2008, 05:32:05 PM »

I tried both ways...but which way is the way that should work?
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: does get palette work ok?
« Reply #3 on: May 26, 2008, 05:34:06 PM »

I think before would be better.
Logged

MichaelVParent

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 62
Re: does get palette work ok?
« Reply #4 on: May 26, 2008, 05:49:47 PM »

I just tried not only both ways...but having both before and after present in the code....its still an issue.  I made the screens visible and the palette seems to not be corrupted untul its put into the other screen with the get palette command.  But the colors that DO show up in index 4 do remind me of the cursor colors, so I think its somehow related.

would you be interested in taking a look at what I've got so far with the new demo... I'm almost done.  Just need to fix the palette issue and tweak some of the art.

regards,
Holymonkey (Mike)
Logged

MichaelVParent

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 62
Re: does get palette work ok?
« Reply #5 on: May 26, 2008, 06:04:28 PM »

I just descovered the issue!

The palettes I were getting from all but one of the screens were working perfectly.  The issue with the defective palette-screen was that instead of loading an image into it to get set up  its palette int he first place, I was getting the palette from one of the other screens.  When I set up the screen  by loading an image instead of getting the palette from a previously loaded screen, it works fine.

It doesnt make sense that it would make a difference, but somehow it seems to.

Holymonkey
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: does get palette work ok?
« Reply #6 on: May 29, 2008, 09:13:33 PM »


When you set up the screen do you use a Flash Off command? You need to use Flash Off (or any other colour-related commands) each time you set up a screen. So you can open screen 0 and turn flash off, then open screen 1 and you will get the flashing back unless you use Flash Off a second time.

When opening a new screen by loading in an image it will automatically turn off any flashing and load in the pallette associated with the image.

I personally haven't used Get Palette much, but that's what seems to be the cause from what you have told us.


Regards,
Lonewolf10

Logged

MichaelVParent

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 62
Re: does get palette work ok?
« Reply #7 on: May 30, 2008, 04:24:40 PM »

thanks...that makes alot of sense.  I'll go back and re-do that part when I get a chance.  Currently I have it working, but clearly it would be better to avoid re-loading an image a second time (which is what I'm doing now)

In the meantime, I've posted a link to the  otherwise finished demo in the submissions section.  I'd love some feedback. :)

here's the link again

www.holymonkeystudio.com/a_demo.zip


regards,
Holymonkey
Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022