C (151/257)

From:
Date:16 Feb 2001 at 22:42:10
Subject:Re: Screens and IDCMP

Hello Joris

On 16-Hel-01, you wrote:

JK> * I wanted to add something so the user could close the app. I started
JK> with some messageloop, that i copied from some sources. But then i found
JK> out, they where meant for windows, then i searched the Screen-struct and
JK> i didn't find the UserPort. Problemo :). So the q. is: can you make a
JK> screen work with IDCMP? And how to do it. I was thinking to add a window
JK> to it that's as big as the screen and render the pic to the Window's
JK> Rastport. Or maybe open a very little one you couldn't see???

Just open borderless backdrop window. Make it slightly smaller than your
screen so that screen title becames visible.

JK> * My solution now to do this: if(!(*(UBYTE *)0xbfe001 & 0x40)) // Check
JK> leftmouse
JK> done = TRUE;
JK> I found this in some old source, it also mentioned that it was a
JK> really nasty way of doing :) So probably i shouldn't use. But can
JK> someone explain me how it works and how has someone found out that it
JK> works? It does directly something with the interrupts or what?

It is reading directly hardware register. Very bad if you have serial mouse
or your mouse is connected to the second port.

JK> * The pic i'm trying to display is a 320x200x8 ilbm. Now i open a screen
JK> a screen using SA_DisplayID, 0x00021000. This is the PAL-Lowres ID (this
JK> one is 320x256x8), but i also use CGFX and want to make the program work
JK> on my CV3D. I found out that the DisplayID for a 320x240x8 CGFX screen
JK> would be 0x40d2000. I tried this one but i doesn't work, only a black
JK> screen that quits when i click with my lefty.... Do i need to do
JK> something special when working with CGFX?

FYI on my Amiga the display for 320x240x8 CGX screen is 0x40c20001.
This means: there aren't static IDs for screens. Instead define some
requirements:

SA_Width,320
SA_Height,240
SA_Depth,8

and OS chooses the DisplayID for you.

Or you can call BestModeIDA() as well.

JK> * When you open a a Screen using DisplayID, do you still need to give
JK> the Width and Height params to the Screen struct and if so, why? I
JK> thaught that the DisplayID contained all that info???

DisplayID defines resolution, but doesn't define the size of screen.
E.g. you can have 160x120 PAL-Lowres screen. And width/height of DisplayID
is user configurable.

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/982360542/
---------------------------------------------------------------------_->