| 1 |
/* Libvisual-plugins - Standard plugins for libvisual |
| 2 |
* |
| 3 |
* Copyright (C) 2002, 2003, 2004, 2005, 2006 Dennis Smit <[email protected]> |
| 4 |
* |
| 5 |
* Authors: Dennis Smit <[email protected]> |
| 6 |
* |
| 7 |
* $Id: screen.c,v 1.4 2006/01/22 13:25:26 synap Exp $ |
| 8 |
* |
| 9 |
* This program is free software; you can redistribute it and/or modify |
| 10 |
* it under the terms of the GNU General Public License as |
| 11 |
* published by the Free Software Foundation; either version 2 |
| 12 |
* of the License, or (at your option) any later version. |
| 13 |
* |
| 14 |
* This program is distributed in the hope that it will be useful, |
| 15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 |
* GNU General Public License for more details. |
| 18 |
* |
| 19 |
* You should have received a copy of the GNU General Public License |
| 20 |
* along with this program; if not, write to the Free Software |
| 21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 |
*/ |
| 23 |
|
| 24 |
#include <stdio.h> |
| 25 |
#include <string.h> |
| 26 |
|
| 27 |
#include "oinksie.h" |
| 28 |
#include "common.h" |
| 29 |
#include "config.h" |
| 30 |
#include "gfx-palette.h" |
| 31 |
#include "screen.h" |
| 32 |
|
| 33 |
void _oink_screen_init (OinksiePrivate *priv, int width, int height) |
| 34 |
{ |
| 35 |
_oink_screen_size_set (priv, width, height); |
| 36 |
} |
| 37 |
|
| 38 |
void _oink_screen_size_set (OinksiePrivate *priv, int width, int height) |
| 39 |
{ |
| 40 |
priv->screen_width = width; |
| 41 |
priv->screen_height = height; |
| 42 |
|
| 43 |
priv->screen_size = priv->screen_width * priv->screen_height; |
| 44 |
|
| 45 |
priv->screen_halfwidth = priv->screen_width / 2; |
| 46 |
priv->screen_halfheight = priv->screen_height / 2; |
| 47 |
|
| 48 |
priv->screen_xybiggest = priv->screen_width > priv->screen_height ? priv->screen_width : priv->screen_height; |
| 49 |
priv->screen_xysmallest = priv->screen_width < priv->screen_height ? priv->screen_width : priv->screen_height; |
| 50 |
} |
| 51 |
|