Mercurial > mxe-octave
annotate src/sdl_image-test.c @ 946:35a9e556c82c
improved coding style of test programs
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sun, 09 May 2010 23:21:01 +0200 |
parents | 6f7cdcfc3279 |
children | 870ce42b74d3 |
rev | line source |
---|---|
733
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
1 /* This file is part of mingw-cross-env. */ |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
2 /* See doc/index.html for further information. */ |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
3 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
4 #include <SDL.h> |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 #include <SDL_image.h> |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 |
946
35a9e556c82c
improved coding style of test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
733
diff
changeset
|
7 int main(int argc, char *argv[]) |
733
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 { |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 SDL_Surface *image; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 SDL_Surface *screen; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 (void)argc; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 (void)argv; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 image = IMG_Load("test.png"); |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE); |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 SDL_Quit(); |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 return 0; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
22 } |