Re: [AD] Runtime Gfx Mode Info - Submission for A4.3.11+

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang said :
"The is_a_* functions definitely sound wrong. Maybe change them to gfx_mode_is_*? I don't think so many functions are required. You should be able to call one function to tell you both whether a mode is windowed or fullscreen, and whether that's definite. I'm not sure there's any need for is_a_magic_mode()."

How about a single function called get_gfx_mode_type instead then? It would return a bitfield containing it's type, with one bit each for windowed, fullscreen, definitely windowed or fullscreen, and the magic driver type. Unknown types would return GFX_TYPE_UNKNOWN which is defined to 0. I renamed current_gfx_mode to get_gfx_mode and rewrote the function. Example source code attached here, as well as an updated example on the a.cc forum thread.

Peter said "Stick to Allegro formatting conventions."

Which ones did I break? I used a 3 space indentation level, 3 lines between functions, lower cased underscored function names, and added a short description comment section before the function definitions. What else should I have done? Also, please tell me how to quote properly for the mailing list.


Attachment: GfxModeQueryTest2_Source.zip
Description: Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/