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

Last change on this file since 518 was 494, checked in by Sam Hocevar, 12 years ago

style: remove trailing spaces, fix copyright statements.

File size: 1.4 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 or
8 *  Jonathan Clark.
9 */
10
11#include "config.h"
12
13#include <math.h>
14
15#include "macs.h"
16#include "mdlread.h"
17#include "video.h"
18#include "image.h"
19#include "palette.h"
20#include "linked.h"
21
22#include "glread.h"
23#include "gifread.h"
24#include "ppmread.h"
25
26
27main(int argc, char **argv)
28{
29  int i,j,k,t;
30  image **im,*pic;
31  palette *pal;
32  image_init();
33  set_mode(0x13,argc,argv);
34  screen->clear();
35  i=argc;
36  im=(image **)malloc(sizeof(image *)*80);
37  i=1; t=1;
38  while (i<argc)
39  {
40    pal=NULL;
41    printf("reading %s",argv[i]);
42    im[t]=read_pic(argv[i],pal);
43    printf(" %d %d\n",im[t]->width(),im[t]->height());
44    if (pal)
45    { pal->load();
46    delete pal;
47    }
48    if (*(argv[i]+strlen(argv[i])-3)=='c')
49      t++;
50    i++;
51  }
52  for (j=0; j<100; j++)
53  {
54    for (k=1; k<t; k++)
55    {
56      im[k]->put_image(screen,0,0);
57    printf("put image\n");
58      update_dirty(screen);
59      screen->bar(0,0,im[k]->width(),im[k]->height(),0);
60    }
61    for (k=t-1; k>0; k--)
62    {
63      im[k]->put_image(screen,0,0);
64        printf("put image\n");
65      update_dirty(screen);
66      screen->bar(0,0,im[k]->width(),im[k]->height(),0);
67    }
68  }
69
70
71  close_graphics();
72  return 0;
73}
Note: See TracBrowser for help on using the repository browser.