Re: [AD] WIP 4.1.15 and CVS freeze |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 2004-07-27 at 13:03 +0200, Elias Pschernig wrote:
> Docs are also updates with the attached patch.
>
Um. Now it is attached.
--
Elias Pschernig
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.234
diff -u -r1.234 allegro._tx
--- docs/src/allegro._tx 13 Jul 2004 10:47:33 -0000 1.234
+++ docs/src/allegro._tx 27 Jul 2004 11:00:38 -0000
@@ -305,17 +305,6 @@
available or does not apply, in which case the values stored in the
variables you provided for `width' and `height' are undefined.
-@domain.hid @yield_timeslice();
-@domain.hid vsync, d_yield_proc
- Gives up some CPU time. This can be useful in order to "play nice"
- with other processes, or simply to make the CPU usage drop. This will
- look better to users, and also does things like saving battery power
- and making fans less noisy.
-
- Note that calling this inside your active game loop is a very bad idea,
- you never know when the OS will give you the CPU back, so you could end up
- missing the vertical retrace and skipping frames.
-
@@void @check_cpu();
@xref cpu_vendor, cpu_family, cpu_model, cpu_capabilities, allegro_init
Detects the CPU type, setting the following global variables. You don't
@@ -2567,12 +2556,24 @@
set_palette(), and you shouldn't try to alter more than two or three
palette entries in a single retrace.
-@domain.hid @rest(long time);
+@@void @rest(unsigned int time);
@xref install_timer, rest_callback
+@xref vsync, d_yield_proc
@eref exsample, extimer, exunicod
- Once Allegro has taken over the timer the standard delay() function will
- no longer work, so you should use this routine instead. The time is given
- in milliseconds.
+ This function waits for the specified number of milliseconds.
+
+ Passing 0 as parameter will not wait, but just yield. This can be useful
+ in order to "play nice" with other processes. Other values will cause
+ CPU time to be dropped on most platforms. This will look better to
+ users, and also does things like saving battery power and making fans
+ less noisy.
+
+ Note that calling this inside your active game loop is a very bad idea,
+ you never know when the OS will give you the CPU back, so you could end up
+ missing the vertical retrace and skipping frames.
+
+ In DOS, where Allegro takes over the timer, the standard delay() function will
+ no longer work, so you should use this routine instead.
@@void @rest_callback(long time, void (*callback)())
@xref install_timer, rest
@@ -8376,7 +8377,7 @@
should return D_O_K, D_REDRAW, or D_CLOSE.
@@int @d_yield_proc(int msg, DIALOG *d, int c);
-@domain.hid yield_timeslice
+@xref rest
@eref exgui
An invisible helper object that yields timeslices for the scheduler (if
the system supports it) when the GUI has nothing to do but waiting for
Index: docs/src/api._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/api._tx,v
retrieving revision 1.32
diff -u -r1.32 api._tx
--- docs/src/api._tx 19 Jan 2004 17:30:55 -0000 1.32
+++ docs/src/api._tx 27 Jul 2004 11:00:38 -0000
@@ -109,9 +109,8 @@
set_volume() doesn't use the hardware mixer anymore to alter the global
volume. Use set_hardware_volume() instead to get the old behaviour.
<li>
- yield_timeslice() doesn't just yield anymore, but actually takes CPU
- time away from the program, in order to enable Allegro programs to
- use less than 100% of the available processor time.
+ The semantics of rest are clarified so rest(0) does yielding when
+ possible.
</ul>
@heading
@@ -307,4 +306,6 @@
generate_332_pallete (generate_332_palette).
<li>
generate_optimized_pallete (generate_optimized_palette).
+<li>
+ yield_timeslice (rest, passing 0 as parameter)
</ul>