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

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

core: Get rid of mostly useless headers, move endianness handling to
common.h (and rewrite functions so that they do not need the SDL headers)
and move a few functions out of sdlport's video.cpp. These functions
were in the original video.cpp (which reappears) and shouldn't be part
of the SDL port.

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 "mdlread.h"
16#include "video.h"
17#include "image.h"
18#include "palette.h"
19#include "linked.h"
20
21#include "glread.h"
22#include "gifread.h"
23#include "ppmread.h"
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 **)malloc(sizeof(image *)*80);
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.