1 /* ______ ___ ___
2 * /\ _ \ /\_ \ /\_ \
3 * \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
4 * \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
5 * \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
6 * \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
7 * \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
8 * /\____/
9 * \_/__/
10 *
11 * Hack to handle split_modex_screen().
12 *
13 * By Peter Wang.
14 *
15 * See readme.txt for copyright information.
16 */
17
18
19 #include "allegro.h"
20
21 #include "modexsms.h"
22
23
24 #ifdef GFX_MODEX
25
26 /* split_modex_screen() should be available whenever GFX_MODEX is defined,
27 * but the ModeX driver itself either may not be available on the given
28 * platform or may reside in a module. The right way to handle this would be
29 * to add another method to the GFX_VTABLE, but in this case the method would
30 * be useless for all other drivers. Also split_modex_screen() is going to
31 * be removed soon anyway. Hence this hack: we set _split_modex_screen_ptr
32 * to point to the real function when the ModeX driver is initialised and
33 * unset it when it is shut down.
34 */
35
36 void (*_split_modex_screen_ptr)(int);
37
split_modex_screen(int line)38 void split_modex_screen(int line)
39 {
40 if (_split_modex_screen_ptr)
41 _split_modex_screen_ptr(line);
42 }
43
44 #endif
45