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

Last change on this file since 534 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
RevLine 
[56]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
[494]4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
[56]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
[481]15#include "mdlread.h"
16#include "video.h"
17#include "image.h"
18#include "palette.h"
19#include "linked.h"
[2]20
[481]21#include "glread.h"
22#include "gifread.h"
23#include "ppmread.h"
[2]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;
[129]35  im=(image **)malloc(sizeof(image *)*80);
[2]36  i=1; t=1;
37  while (i<argc)
38  {
39    pal=NULL;
40    printf("reading %s",argv[i]);
[124]41    im[t]=read_pic(argv[i],pal);
[2]42    printf(" %d %d\n",im[t]->width(),im[t]->height());
43    if (pal)
44    { pal->load();
[124]45    delete pal;
[2]46    }
47    if (*(argv[i]+strlen(argv[i])-3)=='c')
48      t++;
49    i++;
50  }
[494]51  for (j=0; j<100; j++)
[2]52  {
[494]53    for (k=1; k<t; k++)
[2]54    {
55      im[k]->put_image(screen,0,0);
[124]56    printf("put image\n");
[2]57      update_dirty(screen);
58      screen->bar(0,0,im[k]->width(),im[k]->height(),0);
59    }
[494]60    for (k=t-1; k>0; k--)
[2]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.