RTG sprite fallback?
I was thinking about writing a floating toolbox BOOPSI class but it depends on sprite hardware by transplanting pointer information from a SimpleSprite struct into a BitMap struct. If there's a way to indicate that only RTG softsprites are available, I'd like to enable a system-friendly fallback mode that makes no assumptions about sprites or video modes. If possible, I'd like to make one library work for all systems instead of one for RTG and one for chipsets. Can anybody offer useful advice? (I consider pontificating about operating systems having exclusive control of the hardware to be useless advice.)
PropertyFlags from DisplayInfoData() is what I needed. Since my proposed class is a size constrained speed optimization that can pass-through to the parent class when sprtes aren't there, it only needs to know what simple sprite it gets. AllocSpriteDataA() will never be used by my code.
Online Status
I am not sure, but I think that you can use GetDisplayInfoData() to retrieve DisplayInfo record, which contains two interesting informations:
- PropertyFlags. Only if DIPF_IS_SPRITES flag is set, you can use Amiga sprites in this display mode,
- NumStdSprites: a number of available Amiga sprites.
Additionally there were added two system-friendly functions for working with mouse pointer and sprites:
- pointerclass BOOPSI class,
- AllocSpriteDataA() compatible with RTG.
Hope that helps. Regards, Robert.