Debian Codegraph @

src/image.cpp

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 /***************************************************************************
2 image.cpp - description
3 -------------------
4 begin : Sat Aug 19 2000
5 copyright : (C) 2000 by Waldemar Baraldi
6 email : [email protected]
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18 #include "image.h"cxx . . $ `<file>/src/image.h`/
19 #include "SDL_image.h"
20 #include <stdio.h>
21
•22 Imagecxx . . $ Image#::Imagecxx . . $ Image#Image(954ae62f9fac4410).(Strcxx . . $ Str# * filename):Graphiccxx . . $ Graphic#(){
23 if (filename) loadcxx . . $ Image#load(954ae62f9fac4410).(filename);
24 }
25
26 Imagecxx . . $ Image#::Imagecxx . . $ Image#Image(2728a9b7beaa669d).(Imagecxx . . $ Image# * im):Graphiccxx . . $ Graphic#(im){}
27
28 void Imagecxx . . $ Image#::loadcxx . . $ Image#load(954ae62f9fac4410).(Strcxx . . $ Str# * filename){
29 SDL_Surface * aux_surface;
30
31 IMG_InvertAlpha(1);
32 if (surfacecxx . . $ Surface#surface.) SDL_FreeSurface(surfacecxx . . $ Surface#surface.);
33 aux_surface=IMG_Load(filename->getcxx . . $ Str#get(33a1f659e94feb42).());
34 if (!aux_surface){
35 printf("Fatal Error : File %s not found\n", filename->getcxx . . $ Str#get(33a1f659e94feb42).());
36 exitcxx . . $ exit(44ed87f96534fad7).(-1);
37 }
38 surfacecxx . . $ Surface#surface.=SDL_DisplayFormatAlpha(aux_surface);
39 SDL_FreeSurface(aux_surface);
40 delete filename;
41 }
42