Quote:
Originally Posted by Photon
Set 0 bitplanes, 200 height
|
0 is not a valid bitdepth. How do you plan to set it?
Quote:
Originally Posted by Photon
RemakeDisplay
|
This only rebuilds all copper lists and moves them to the hardware. This is necessary when changing the bitdepth to let the display hardware only show one plane.
Quote:
Originally Posted by Photon
FreeMem (not FreeRaster)
|
FreeMem and FreeRaster are very closely related. Actually, the only difference is that FreeRaster() computes the size value for FreeMem(). However, as the system bitmap was never allocated by AllocRaster(), but by AllocBitMap(), and is most likely interleaved, this is not the right call. FreeBitMap() is.
Quote:
Originally Posted by Photon
Alloc 1 bitplane
|
With AllocBitMap().
Quote:
Originally Posted by Photon
Set 1 bitplane
|
If that's already allocated with 1 bitplane, this is redundant.
Quote:
Originally Posted by Photon
RemakeDisplay
|
See above for what this does.
Some things worth understanding: The bitmap is the bitmap of the screen, which is IntuitionBase->FirstScreen (when it is open, and if there is only one screen). The bitmap of the screen is in Screen->RastPort.BitMap (and NOT Screen->BitMap, which is a bogus bitmap). That is the bitmap you need to release or dispose. Screen->BitMap is just a deep copy of this bitmap, at least it is for native screens.
RemakeDisplay rebuilds the copper lists from screen->ViewPort and the information therein. Screen->ViewPort contains a pointer to the bitmap that represents the screen content in its RasInfo, that is, Screen->ViewPort.RasInfo->BitMap points to Screen->RastPort.BitMap (and not Screen->BitMap). So that would be another pointer you need to adjust when "changing" the bitmap.
Finally, whether "replacing the bitmap" under the feed of intuition is maybe or maybe not going to work, keeping in mind that other programs using the screen may potentially have cached the bitmap - namey in their own RastPort. Thus, for example, the console window has its own RastPort (window->RastPort) which has a bitmap pointer of its own (window->RastPort->BitMap) and this bitmap is also that of the screen (i.e. window->RastPort->BitMap == screen->RastPort.BitMap). Thus, you cannot simply replace one without also replacing the other. There are potentially other RastPorts involved (gadgets may have one, the console.device may have one), so it's really not that easy.