home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / dde / datatoaof / HiddenLib / c / resspr+
Encoding:
Text File  |  1993-03-11  |  1.0 KB  |  37 lines

  1. /* Title:       resspr+.c
  2.  * Purpose:     Replacement for resspr routines in RISCOSLib.
  3.  *              These routines use internal an internal sprite
  4.  *              file stored in the !RunImage file using
  5.  *              DataToAOF.
  6.  * Author:      (c) Paul Fidler 1992
  7.  * Version:     1.00 (12-Oct-92)
  8.  *
  9.  * This file is included as part of the DataToAOF distribution
  10.  * to demonstrate how the resspr functions can be made to
  11.  * work for internally stored sprites. The length of the sprite
  12.  * file is placed in the blank word (see Technical Details
  13.  * section in 'Guide') in order to make a sprite area. Note that
  14.  * exactly the same piece of code could be used to set up an
  15.  * internally stored relocatable module (which also requires
  16.  * it's length stored immedietely in front of it in memory
  17.  * if it is to be run/uploaded from application workspace).
  18.  */
  19.  
  20.  
  21.  
  22. static int *area = 1;
  23.  
  24. void resspr_init(int *data, int length)
  25. {
  26.     int *ptr = data;
  27.     ptr--;
  28.     ptr[0] = length;
  29.     area = ptr;
  30. }
  31.  
  32. int *resspr_area(void)
  33. {
  34.     return( area );
  35. }
  36.  
  37.