[Alephmodular-devel] CoreGraphics work
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2005-07-07 22:43:20
|
I got the itch to try recoding AM to use CoreGraphics instead of QuickDraw. Mostly to find that CoreGraphics is a pain in the neck, at least when it comes to CGDirectDisplay. And on top of that, it looks like most of the functions that will help add Quartz support so I can do the HUD and Map are things that were added since 10.2. So it's either code to the 10.2 methods and cross fingers that what I compile actually runs on such machines to begin with, or I code to the 10.4 methods. Which should be stable. Some specifics: CDContext_CoreGraphics is a no-op. In similar fashion, some other platform specific modules that relied upon CBuffer_Carbon, like CMovie, aren't enabled in the devel-cg branch. This means no title screen, no chapter screen, no hud, no map, no terminals. CDisplay_CoreGraphics is functional, grabs a screen, and throws it into 640x480 at whatever color mode you had picked out. It then works with a CBuffer_CoreGraphics, copying the bitmap of the buffer to the screen whenever flush_working_buffer() is called. It also tries to float all application dialogs, such as preferences, asserts, and open/ save dialogs over the shield window. It mostly succeeds. However, there's ugly non-drawn space around the dialogs, and pop-up menus work, however I can't promote their window level yet. So they can't be seen. CBuffer_CoreGraphics is half implemented. It operates with a CPictureBitmap as its pixel array. However, it needs to be able to map it's bitmap within a CGBitmapContext and then spawn a DrawingContext that does all the drawing operations on the bitmap via Quartz calls. So what is the end result? Something no where near close to release, but it does let you kill Pfhor full screen, if you don't mind a screen of 640x480. -Jeremy Parsons http://alephmodular.sourceforge.net/ |