Last change
on this file since 129 was
129,
checked in by Sam Hocevar, 15 years ago
|
- Get rid of jmalloc and replace it with standard malloc. Modern operating
systems certainly perform a lot better than this custom implementation,
and we have superior tools (eg. valgrind) to debug and profile memory
usage without interfering with the code itself.
|
File size:
1.4 KB
|
Rev | Line | |
---|
[56] | 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 | |
---|
[2] | 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 | |
---|
| 26 | main(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 | } |
---|
| 51 | for (j=0;j<100;j++) |
---|
| 52 | { |
---|
| 53 | for (k=1;k<t;k++) |
---|
| 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 | } |
---|
| 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.