04 September 2011, 18:47 | #1 |
Dazed and Confused
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 242
|
LoadRGB4() puzzle
I've opened an Intuition friendly CustomScreen and want to change the colours, so I do this:
Code:
movea.l GfxBase,a6 movea.l my_screen,a0 ;pointer to my new screen movea.l sc_ViewPort(a0),a0 ;and its ViewPort lea colors,a1 ;array of my colours move.w #NUM_COLOURS,d0 jsr _LVOLoadRGB4(a6) ;my colours into colormap movea.l IntBase(pc),a6 movea.l my_screen(pc),a0 jsr _LVOMakeScreen(a6) ;make new copperlist jsr _LVORethinkDisplay(a6) bra menus_done |
04 September 2011, 21:12 | #2 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
Hi,
I'm not sure but a0 in your code doesn't point to your screen ViewPort. Try with this Code:
lea sc_ViewPort(a0),a0 Code:
move.l sc_ViewPort(a0),a0 |
04 September 2011, 21:52 | #3 |
Dazed and Confused
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 242
|
That was it. Thanks Asman.
I'm always getting lea and movea.l mixed up, I seem to have some kind of a blind spot there! |
05 September 2011, 22:40 | #4 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
Regards, Lonewolf10 |
|
06 September 2011, 15:51 | #5 |
Registered User
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 71
Posts: 351
|
My biggest problem was leaving out #.
As an example, instead of move.l #127,d0 I would put move.l 127,d0 I can't tell you how many times I've done that and how long it took to find them, my brain just wouldn't see them. I just got to the point where I would look for that anytime something didn't work correctly. I probably lost half my hair this way. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Puzzle Games | Gordon | Retrogaming General Discussion | 45 | 08 July 2013 06:06 |
Mickey's Jigsaw Puzzle | s2325 | request.Old Rare Games | 2 | 23 April 2008 11:17 |
puzzle platformer | Asimir | Looking for a game name ? | 4 | 19 November 2005 23:50 |
Looking for a puzzle game | Phiber | Looking for a game name ? | 11 | 31 July 2004 22:12 |
Candy Puzzle CD³² ? | RetroMan | request.Old Rare Games | 1 | 19 January 2002 10:27 |
|
|