Last change
on this file since 494 was
494,
checked in by Sam Hocevar, 12 years ago
|
style: remove trailing spaces, fix copyright statements.
|
File size:
1.4 KB
|
Rev | Line | |
---|
[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 "macs.h" |
---|
| 16 | #include "mdlread.h" |
---|
| 17 | #include "video.h" |
---|
| 18 | #include "image.h" |
---|
| 19 | #include "palette.h" |
---|
| 20 | #include "linked.h" |
---|
[2] | 21 | |
---|
[481] | 22 | #include "glread.h" |
---|
| 23 | #include "gifread.h" |
---|
| 24 | #include "ppmread.h" |
---|
[2] | 25 | |
---|
| 26 | |
---|
| 27 | main(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; |
---|
[129] | 36 | im=(image **)malloc(sizeof(image *)*80); |
---|
[2] | 37 | i=1; t=1; |
---|
| 38 | while (i<argc) |
---|
| 39 | { |
---|
| 40 | pal=NULL; |
---|
| 41 | printf("reading %s",argv[i]); |
---|
[124] | 42 | im[t]=read_pic(argv[i],pal); |
---|
[2] | 43 | printf(" %d %d\n",im[t]->width(),im[t]->height()); |
---|
| 44 | if (pal) |
---|
| 45 | { pal->load(); |
---|
[124] | 46 | delete pal; |
---|
[2] | 47 | } |
---|
| 48 | if (*(argv[i]+strlen(argv[i])-3)=='c') |
---|
| 49 | t++; |
---|
| 50 | i++; |
---|
| 51 | } |
---|
[494] | 52 | for (j=0; j<100; j++) |
---|
[2] | 53 | { |
---|
[494] | 54 | for (k=1; k<t; k++) |
---|
[2] | 55 | { |
---|
| 56 | im[k]->put_image(screen,0,0); |
---|
[124] | 57 | printf("put image\n"); |
---|
[2] | 58 | update_dirty(screen); |
---|
| 59 | screen->bar(0,0,im[k]->width(),im[k]->height(),0); |
---|
| 60 | } |
---|
[494] | 61 | for (k=t-1; k>0; k--) |
---|
[2] | 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.