source: abuse/trunk/src/imlib/glview.cpp @ 579

Last change on this file since 579 was 555, checked in by Sam Hocevar, 11 years ago

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

File size: 1.5 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include <math.h>
16
17#include "mdlread.h"
18#include "video.h"
19#include "image.h"
20#include "palette.h"
21#include "linked.h"
22
23#include "glread.h"
24#include "gifread.h"
25#include "ppmread.h"
26
27
28main(int argc, char **argv)
29{
30  int i,j,k,t;
31  image **im,*pic;
32  palette *pal;
33  image_init();
34  set_mode(0x13,argc,argv);
35  screen->clear();
36  i=argc;
37  im=(image **)malloc(sizeof(image *)*80);
38  i=1; t=1;
39  while (i<argc)
40  {
41    pal=NULL;
42    printf("reading %s",argv[i]);
43    im[t]=read_pic(argv[i],pal);
44    printf(" %d %d\n",im[t]->width(),im[t]->height());
45    if (pal)
46    { pal->load();
47    delete pal;
48    }
49    if (*(argv[i]+strlen(argv[i])-3)=='c')
50      t++;
51    i++;
52  }
53  for (j=0; j<100; j++)
54  {
55    for (k=1; k<t; k++)
56    {
57      im[k]->put_image(screen,0,0);
58    printf("put image\n");
59      update_dirty(screen);
60      screen->bar(0,0,im[k]->width(),im[k]->height(),0);
61    }
62    for (k=t-1; k>0; k--)
63    {
64      im[k]->put_image(screen,0,0);
65        printf("put image\n");
66      update_dirty(screen);
67      screen->bar(0,0,im[k]->width(),im[k]->height(),0);
68    }
69  }
70
71
72  close_graphics();
73  return 0;
74}
Note: See TracBrowser for help on using the repository browser.