Ignore:
Timestamp:
Mar 2, 2008, 3:03:36 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Add licensing terms to most C / C++ files (Ref #5).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/remap.cpp

    r2 r56  
     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
    112#include <stdio.h>
    2 
    313#include <stdlib.h>
    414
    5 
    6 
    715extern "C" {
    8 
    916void remap_line_asm(void *scr, void *remap, void *seq, int seqlen);
    10 
    1117}
    1218
     19main()
     20{
     21    unsigned char *s = (unsigned char *) malloc(320*200);
     22    unsigned char *r, *seq;
     23    int i,j;
    1324
     25    r = (unsigned char *) malloc(256*256*2);
     26    r = (unsigned char *) (((unsigned) r + (256*256-1)) & ~(256*256-1));
     27    seq = (unsigned char *) malloc(40);
    1428
    15 main()
     29    for (j=0 ; j<64 ; j++)
     30        for (i=0 ; i<256; i++)
     31            r[j*256+i] = i+j;
     32    for (i=0 ; i<320*200 ; i++) s[i] = i&0xff;
     33    for (i=0 ; i<40 ; i++) seq[i] = i;
    1634
    17 {
    18 
    19 
    20 
    21         unsigned char *s = (unsigned char *) malloc(320*200);
    22 
    23         unsigned char *r, *seq;
    24 
    25         int i,j;
    26 
    27 
    28 
    29         r = (unsigned char *) malloc(256*256*2);
    30 
    31         r = (unsigned char *) (((unsigned) r + (256*256-1)) & ~(256*256-1));
    32 
    33         seq = (unsigned char *) malloc(40);
    34 
    35 
    36 
    37         for (j=0 ; j<64 ; j++)
    38 
    39                 for (i=0 ; i<256; i++)
    40 
    41                         r[j*256+i] = i+j;
    42 
    43         for (i=0 ; i<320*200 ; i++) s[i] = i&0xff;
    44 
    45         for (i=0 ; i<40 ; i++) seq[i] = i;
    46 
    47 
    48 
    49         for (j=0 ; j<200 ; j++)
    50 
     35    for (j=0 ; j<200 ; j++)
    5136                remap_line_asm(s+j*320, r, seq, 40);
    52 
    53 
    54 
    55 
    56 
    5737}
    5838
    59 
    60 
Note: See TracChangeset for help on using the changeset viewer.