[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Grzegorz Adam Hankiewicz wrote:
Ah, very interesting indeed. And I think we can't go with calling
install_allegro(SYSTEM_NONE, ...) inside allegro_message because
of the errno/atexit variables. Suggestions?
document it. i think it's correct behaviour because it follows the rule
"any allegro function could be called only after prior calling to
allegro_init"
--
Regards,
Michal
--- allegro._tx.old 2004-10-03 14:04:36.000000000 +0200
+++ allegro._tx 2004-10-03 21:59:48.877750900 +0200
@@ -214,7 +214,7 @@
Operating System is multitasking or not.
@@void @allegro_message(const char *text_format, ...);
-@domain.hid set_uformat
+@xref set_uformat, allegro_init
@eref Available Allegro examples
Outputs a message, using a printf() format string. Usually you want to
use this to report messages to the user in an OS independant way when some
@@ -224,7 +224,12 @@
a text console (DOS and Unix) it will print the string to that console,
attempting to work around codepage differences by reducing any accented
characters to 7-bit ASCII approximations, and on platforms featuring a
- windowing system it will bring up a blocking GUI message box. Example:
+ windowing system it will bring up a blocking GUI message box.
+
+ You can call it only after prior calling to allegro_init (even
+ unssuccesful).
+
+ Example:
<codeblock>
ret = allegro_init();
if (ret != 0) {
--- exbitmap.c.old 2004-10-03 14:04:02.000000000 +0200
+++ exbitmap.c 2004-10-03 22:00:09.637602100 +0200
@@ -14,13 +14,14 @@
BITMAP *the_image;
PALETTE the_palette;
+ if (allegro_init() != 0)
+ return 1;
+
if (argc != 2) {
allegro_message("Usage: 'exbitmap filename.[bmp|lbm|pcx|tga]'\n");
return 1;
}
- if (allegro_init() != 0)
- return 1;
install_keyboard();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) != 0) {