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

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