annotate src/video/xbios/SDL_xbios_blowup.c @ 4179:d7294b7c732d SDL-1.2

Date: Fri, 24 Apr 2009 17:47:07 +0200 From: Stefan Klug Subject: Re: [SDL] SVN doesn't compile for wince the patch applied for Revision 4483 was seemingly not checked for side effects. It broke the WinCE build. The attached patch should fix these problems. I'm not using SDL 1.2 on CE anymore, and therefore haven't tested the patch... but at least it compiles ;-) Regards Stefan
author Sam Lantinga <slouken@libsdl.org>
date Thu, 07 May 2009 12:40:16 +0000
parents a1b03ba2fcd0
children 05c9e942cc46
rev   line source
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
1 /*
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
4159
a1b03ba2fcd0 Updated copyright date
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
3 Copyright (C) 1997-2009 Sam Lantinga
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
4
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
6 modify it under the terms of the GNU Library General Public
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
8 version 2 of the License, or (at your option) any later version.
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
9
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
13 Library General Public License for more details.
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
14
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
16 License along with this library; if not, write to the Free
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
18
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
19 Sam Lantinga
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
20 slouken@libsdl.org
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
21 */
1402
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1042
diff changeset
22 #include "SDL_config.h"
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
23
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
24 /*
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
25 Blowup extension definitions
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
26
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
27 Patrice Mandin
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
28 */
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
29
1042
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
30 #include <mint/falcon.h>
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
31
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
32 #include "SDL_xbios.h"
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
33 #include "SDL_xbios_blowup.h"
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
34
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
35 void SDL_XBIOS_BlowupInit(_THIS, blow_cookie_t *cookie_blow)
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
36 {
1042
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
37 int i, num_mode, bank;
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
38 blow_mode_t *blow_mode;
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
39
1042
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
40 /* Add bit 15 for old modes */
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
41 for (i=0;i<XBIOS_nummodes;i++) {
1042
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
42 XBIOS_modelist[i].number |= 1<<15;
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
43 }
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
44
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
45 /* Add Blowup modes for 8 and 16 bpp */
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
46 for (num_mode=3; num_mode<5; num_mode++) {
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
47 bank = cookie_blow->num_mode[num_mode];
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
48 blow_mode = &(cookie_blow->blowup_modes[num_mode+(bank*5)]);
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
49
1042
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
50 /* Check extended mode enabled */
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
51 if (blow_mode->enabled == 0) {
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
52 /* Check monitor needed for this mode */
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
53 if ((blow_mode->monitor == cookie_blow->montype)
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
54 || ((blow_mode->monitor == MONITOR_TV)
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
55 && (cookie_blow->montype == MONITOR_RGB))
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
56 || ((blow_mode->monitor == MONITOR_RGB)
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
57 && (cookie_blow->montype == MONITOR_TV)))
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
58 {
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
59 /* we can use this extended mode */
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
60 SDL_XBIOS_AddMode(this,
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
61 num_mode == 3 ? BPS8 : BPS16,
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
62 blow_mode->width + 1,
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
63 blow_mode->height + 1,
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
64 num_mode == 3 ? 8 : 16,
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
65 SDL_FALSE
0e7218843cfb Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents: 1040
diff changeset
66 );
1040
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
67 }
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
68 }
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
69 }
c6ed27c7d47d Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
70 }