src/video/xbios/SDL_xbios_blowup.c
author Sam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 04:04:35 +0000
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
permissions -rw-r--r--
more tweaking indent options
patmandin@1040
     1
/*
patmandin@1040
     2
    SDL - Simple DirectMedia Layer
patmandin@1040
     3
    Copyright (C) 1997-2004 Sam Lantinga
patmandin@1040
     4
patmandin@1040
     5
    This library is free software; you can redistribute it and/or
patmandin@1040
     6
    modify it under the terms of the GNU Library General Public
patmandin@1040
     7
    License as published by the Free Software Foundation; either
patmandin@1040
     8
    version 2 of the License, or (at your option) any later version.
patmandin@1040
     9
patmandin@1040
    10
    This library is distributed in the hope that it will be useful,
patmandin@1040
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
patmandin@1040
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
patmandin@1040
    13
    Library General Public License for more details.
patmandin@1040
    14
patmandin@1040
    15
    You should have received a copy of the GNU Library General Public
patmandin@1040
    16
    License along with this library; if not, write to the Free
patmandin@1040
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
patmandin@1040
    18
patmandin@1040
    19
    Sam Lantinga
patmandin@1040
    20
    slouken@libsdl.org
patmandin@1040
    21
*/
slouken@1402
    22
#include "SDL_config.h"
patmandin@1040
    23
patmandin@1040
    24
/*
patmandin@1040
    25
	Blowup extension definitions
patmandin@1040
    26
patmandin@1040
    27
	Patrice Mandin
patmandin@1040
    28
*/
patmandin@1040
    29
patmandin@1042
    30
#include <mint/falcon.h>
patmandin@1042
    31
patmandin@1040
    32
#include "SDL_xbios.h"
patmandin@1040
    33
#include "SDL_xbios_blowup.h"
patmandin@1040
    34
slouken@1662
    35
void
slouken@1668
    36
SDL_XBIOS_BlowupInit(_THIS, blow_cookie_t * cookie_blow)
patmandin@1040
    37
{
slouken@1662
    38
    int i, num_mode, bank;
slouken@1662
    39
    blow_mode_t *blow_mode;
patmandin@1040
    40
slouken@1662
    41
    /* Add bit 15 for old modes */
slouken@1662
    42
    for (i = 0; i < XBIOS_nummodes; i++) {
slouken@1662
    43
        XBIOS_modelist[i].number |= 1 << 15;
slouken@1662
    44
    }
patmandin@1040
    45
slouken@1662
    46
    /* Add Blowup modes for 8 and 16 bpp */
slouken@1662
    47
    for (num_mode = 3; num_mode < 5; num_mode++) {
slouken@1662
    48
        bank = cookie_blow->num_mode[num_mode];
slouken@1662
    49
        blow_mode = &(cookie_blow->blowup_modes[num_mode + (bank * 5)]);
patmandin@1042
    50
slouken@1662
    51
        /* Check extended mode enabled */
slouken@1662
    52
        if (blow_mode->enabled == 0) {
slouken@1662
    53
            /* Check monitor needed for this mode */
slouken@1662
    54
            if ((blow_mode->monitor == cookie_blow->montype)
slouken@1662
    55
                || ((blow_mode->monitor == MONITOR_TV)
slouken@1662
    56
                    && (cookie_blow->montype == MONITOR_RGB))
slouken@1662
    57
                || ((blow_mode->monitor == MONITOR_RGB)
slouken@1662
    58
                    && (cookie_blow->montype == MONITOR_TV))) {
slouken@1662
    59
                /* we can use this extended mode */
slouken@1668
    60
                SDL_XBIOS_AddMode(this,
slouken@1668
    61
                                  num_mode == 3 ? BPS8 : BPS16,
slouken@1668
    62
                                  blow_mode->width + 1,
slouken@1668
    63
                                  blow_mode->height + 1,
slouken@1668
    64
                                  num_mode == 3 ? 8 : 16, SDL_FALSE);
slouken@1662
    65
            }
slouken@1662
    66
        }
slouken@1662
    67
    }
patmandin@1040
    68
}
slouken@1662
    69
slouken@1662
    70
/* vi: set ts=4 sw=4 expandtab: */