From: <el...@us...> - 2010-09-01 18:28:17
|
Revision: 13682 http://alleg.svn.sourceforge.net/alleg/?rev=13682&view=rev Author: elias Date: 2010-09-01 18:28:11 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Added some visual empahsize to "Note:"s in the docs. Modified Paths: -------------- allegro/branches/4.9/docs/src/pandoc.css allegro/branches/4.9/docs/src/refman/audio.txt allegro/branches/4.9/docs/src/refman/display.txt allegro/branches/4.9/docs/src/refman/events.txt allegro/branches/4.9/docs/src/refman/font.txt allegro/branches/4.9/docs/src/refman/graphics.txt allegro/branches/4.9/docs/src/refman/opengl.txt allegro/branches/4.9/docs/src/refman/system.txt allegro/branches/4.9/docs/src/refman/threads.txt Modified: allegro/branches/4.9/docs/src/pandoc.css =================================================================== --- allegro/branches/4.9/docs/src/pandoc.css 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/pandoc.css 2010-09-01 18:28:11 UTC (rev 13682) @@ -16,6 +16,26 @@ -webkit-border-radius: 5px; } +blockquote { + border: 1px solid #ddd; + background-color: #fff8e0; + padding: 0.6em; + padding-left: 0.8em; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +blockquote p { + padding: 0; + margin: 0; +} + +blockquote p em:first-child { + font-style: normal; + font-weight: bold; + color: #400000; +} + code { font-family: monospace; } Modified: allegro/branches/4.9/docs/src/refman/audio.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/audio.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/audio.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -724,17 +724,17 @@ This is only the delay due to Allegro's streaming, there may be additional delay caused by sound drivers and/or hardware. -Note: If you know the fragment size in bytes, you can get the size in samples -like this: +> *Note:* If you know the fragment size in bytes, you can get the size in samples +> like this: +> +> sample_size = al_get_channel_count(chan_conf) * al_get_audio_depth_size(depth); +> samples = bytes_per_fragment / sample_size; +> +> The size of the complete buffer is: +> +> buffer_size = bytes_per_fragment * fragment_count - sample_size = al_get_channel_count(chan_conf) * al_get_audio_depth_size(depth); - samples = bytes_per_fragment / sample_size; - -The size of the complete buffer is: - - buffer_size = bytes_per_fragment * fragment_count - -Note: unlike many Allegro objects, audio streams are not implicitly destroyed +> *Note:* unlike many Allegro objects, audio streams are not implicitly destroyed when Allegro is shut down. You must destroy them manually with [al_destroy_audio_stream] before the audio system is shut down. @@ -743,7 +743,7 @@ Destroy an audio stream which was created with [al_create_audio_stream] or [al_load_audio_stream]. -Note: If the stream is still attached to a mixer or voice, +> *Note:* If the stream is still attached to a mixer or voice, [al_detach_audio_stream] is automatically called on it first. See also: [al_drain_audio_stream]. @@ -890,7 +890,7 @@ If the stream is not ready for new data, the function will return NULL. -Note: If you listen to events from the stream, an +> *Note:* If you listen to events from the stream, an ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT event will be generated whenever a new fragment is ready. However, getting an event is *not* a guarantee that [al_get_audio_stream_fragment] will not return NULL, so you still must check for it. @@ -1047,7 +1047,7 @@ Returns the sample on success, NULL on failure. -Note: the allegro_audio library does not support any audio file formats by +> *Note:* the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. @@ -1066,7 +1066,7 @@ Returns the sample on success, NULL on failure. The file remains open afterwards. -Note: the allegro_audio library does not support any audio file formats by +> *Note:* the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. @@ -1086,7 +1086,7 @@ Returns the stream on success, NULL on failure. -Note: the allegro_audio library does not support any audio file formats by +> *Note:* the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. @@ -1113,7 +1113,7 @@ and will be closed when the audio stream is destroyed. On failure the file will be closed. -Note: the allegro_audio library does not support any audio file formats by +> *Note:* the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. @@ -1128,7 +1128,7 @@ Returns true on success, false on error. -Note: the allegro_audio library does not support any audio file formats by +> *Note:* the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. @@ -1144,7 +1144,7 @@ Returns true on success, false on error. The file remains open afterwards. -Note: the allegro_audio library does not support any audio file formats by +> *Note:* the allegro_audio library does not support any audio file formats by default. You must use the allegro_acodec addon, or register your own format handler. Modified: allegro/branches/4.9/docs/src/refman/display.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/display.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/display.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -379,8 +379,8 @@ Changes the icon associated with the display (window). -Note: If the underlying OS can not use an icon with the size of the provided -bitmap, it will be scaled. +> *Note:* If the underlying OS can not use an icon with the size of the +provided bitmap, it will be scaled. TODO: Describe best practice for the size? TODO: Allow providing multiple icons in differet sizes? Modified: allegro/branches/4.9/docs/src/refman/events.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/events.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/events.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -77,11 +77,11 @@ - mouse.dz, - mouse.display. - Note: Calling [al_set_mouse_xy] also will result in a change of axis + > *Note:* Calling [al_set_mouse_xy] also will result in a change of axis values, but such a change is reported with ALLEGRO_EVENT_MOUSE_WARPED events instead. - Note: currently mouse.display may be NULL if an event is generated in + > *Note:* currently mouse.display may be NULL if an event is generated in response to [al_set_mouse_axis]. * ALLEGRO_EVENT_MOUSE_BUTTON_DOWN - a mouse button was pressed. @@ -130,7 +130,8 @@ * ALLEGRO_EVENT_DISPLAY_EXPOSE - The display (or a portion thereof) has become visible. - Note: The display needs to be created with ALLEGRO_GENERATE_EXPOSE_EVENTS + + > *Note:* The display needs to be created with ALLEGRO_GENERATE_EXPOSE_EVENTS flag. Fields: Modified: allegro/branches/4.9/docs/src/refman/font.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/font.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/font.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -284,7 +284,7 @@ EM*, if you instead want to specify the size as the total height of glyphs in pixel, pass it as a negative value. -Note: If you want to display text at multiple sizes, load the font +> *Note:* If you want to display text at multiple sizes, load the font multiple times with different size parameters. The only flag supported right now is: @@ -299,7 +299,7 @@ Like [al_load_ttf_font], but the font is read from the file handle. The filename is only used to find possible additional files next to a font file. -Note: The file handle is owned by the returned ALLEGRO_FONT object and must not +> *Note:* The file handle is owned by the returned ALLEGRO_FONT object and must not be freed by the caller, as FreeType expects to be able to read from it at a later time. Modified: allegro/branches/4.9/docs/src/refman/graphics.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/graphics.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/graphics.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -95,17 +95,17 @@ to low bits, so for example a fully opaque red pixel in ARGB_8888 format is 0xFFFF0000. -Note: +> *Note:* +> +> The pixel format is independent of endianness. That is, in the above +> example you can always get the red component with +> +> (pixel & 0x00ff0000) >> 16 +> +> But you can *not* rely on this code: +> +> *(pixel + 2) -The pixel format is independent of endianness. That is, in the above -example you can always get the red component with - - (pixel & 0x00ff0000) >> 16 - -But you can *not* rely on this code: - - *(pixel + 2) - It will return the red component on little endian systems, but the green component on big endian systems. @@ -235,11 +235,10 @@ call with `al_get_bitmap_format(bitmap)` as the format or use ALLEGRO_PIXEL_FORMAT_ANY. Locking in the native format will usually be faster. -Note: +> *Note:* While a bitmap is locked, you can not use any drawing operations +on it (with the sole exception of [al_put_pixel] and +[al_put_blended_pixel]). -While a bitmap is locked, you can not use any drawing operations on -it (with the sole exception of [al_put_pixel] and [al_put_blended_pixel]). - See also: [ALLEGRO_LOCKED_REGION], [ALLEGRO_PIXEL_FORMAT], [al_unlock_bitmap] @@ -507,14 +506,14 @@ * ALLEGRO_FLIP_HORIZONTAL - flip the bitmap about the y-axis * ALLEGRO_FLIP_VERTICAL - flip the bitmap about the x-axis -Note: The current target bitmap must be a different bitmap. +> *Note:* The current target bitmap must be a different bitmap. Drawing a bitmap to itself (or to a sub-bitmap of itself) or drawing a sub-bitmap to its parent (or another sub-bitmap of its parent) are not currently supported. To copy part of a bitmap into the same bitmap simply use a temporary bitmap instead. -Note: The backbuffer (or a sub-bitmap thereof) can not be transformed. +> *Note:* The backbuffer (or a sub-bitmap thereof) can not be transformed. If you need to draw a transformed part of the backbuffer draw it to a temporary bitmap first. @@ -975,7 +974,7 @@ Returns NULL on error. -Note: the core Allegro library does not support any image file formats by +> *Note:* the core Allegro library does not support any image file formats by default. You must use the allegro_image addon, or register your own format handler. @@ -992,7 +991,7 @@ Returns NULL on error. The file remains open afterwards. -Note: the core Allegro library does not support any image file formats by +> *Note:* the core Allegro library does not support any image file formats by default. You must use the allegro_image addon, or register your own format handler. @@ -1006,7 +1005,7 @@ Returns true on success, false on error. -Note: the core Allegro library does not support any image file formats by +> *Note:* the core Allegro library does not support any image file formats by default. You must use the allegro_image addon, or register your own format handler. @@ -1021,7 +1020,7 @@ Returns true on success, false on error. The file remains open afterwards. -Note: the core Allegro library does not support any image file formats by +> *Note:* the core Allegro library does not support any image file formats by default. You must use the allegro_image addon, or register your own format handler. Modified: allegro/branches/4.9/docs/src/refman/opengl.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/opengl.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/opengl.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -52,7 +52,7 @@ If _glMultiTexCoord3fARB_ is not NULL then it can be used as if it has been defined in the OpenGL core library. -Note: Under Windows, OpenGL functions may need a special calling +> *Note:* Under Windows, OpenGL functions may need a special calling convention, so it's best to always use the ALLEGRO_DEFINE_PROC_TYPE macro when declaring function pointer types for OpenGL functions. Modified: allegro/branches/4.9/docs/src/refman/system.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/system.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/system.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -32,7 +32,7 @@ Closes down the Allegro system. -Note: al_uninstall_system() can be called without a corresponding +> Note: al_uninstall_system() can be called without a corresponding [al_install_system] call, e.g. from atexit(). ## API: al_get_allegro_version Modified: allegro/branches/4.9/docs/src/refman/threads.txt =================================================================== --- allegro/branches/4.9/docs/src/refman/threads.txt 2010-09-01 17:33:29 UTC (rev 13681) +++ allegro/branches/4.9/docs/src/refman/threads.txt 2010-09-01 18:28:11 UTC (rev 13682) @@ -85,7 +85,7 @@ See also: [al_join_thread], [al_set_thread_should_stop]. -*Note:* +> *Note:* We don't support forceful killing of threads. @@ -235,7 +235,7 @@ See also: [al_signal_cond]. -*Note:* +> *Note:* The pthreads spec says to lock the mutex associated with `cond` before signalling for predictable scheduling behaviour. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |