chiark / gitweb /
Create readable text `.bas' for each tokenized BASIC `,ffb' file.
[ssr] / StraySrc / Glass / !Glass / h / gSprite
1 /*
2  * gSprite.c
3  *
4  * Handling of template file sprite windows and areas
5  *
6  * © 1994-1998 Straylight
7  */
8
9 /*----- Licensing note ----------------------------------------------------*
10  *
11  * This file is part of Straylight's Glass.
12  *
13  * Glass is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2, or (at your option)
16  * any later version.
17  *
18  * Glass is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with Glass.  If not, write to the Free Software Foundation,
25  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26  */
27
28 #ifndef __gSprite_h
29 #define __gSprite_h
30
31 /*----- Required header files ---------------------------------------------*/
32
33 #ifndef __gStruct_h
34   #include "gStruct.h"
35 #endif
36
37 /*----- External routines -------------------------------------------------*/
38
39 /*
40  * void gSprite_kill(glass_tfile *t)
41  *
42  * Use
43  *  Closes the sprite viewer and frees the sprite area
44  *
45  * Parameters
46  *  glass_tfile *t == the template file that's closing
47  */
48
49 void gSprite_kill(glass_tfile *t);
50
51 /*
52  * void gSprite_display(glass_tfile *t)
53  *
54  * Use
55  *  Displays the sprite viewer for the specified template file.
56  *
57  * glass_tfile *t == the template file whose sprites we want to see
58  */
59
60 void gSprite_display(glass_tfile *t);
61
62 /*
63  * void gSprite_mergeFromMemory(glass_tfile *t,void **p)
64  *
65  * Use
66  *  Merges a sprite file which is stored in memory.  This is so I can do
67  *  in-memory transfer of sprites.
68  *
69  * Parameters
70  *  glass_tfile *t == the template file owner of the sprite area
71  *  void **p == the flex block stroing the sprite file
72  */
73
74 void gSprite_mergeFromMemory(glass_tfile *t,void **p);
75
76 /*
77  * void gSprite_mergeFromFile(glass_tfile *t,char *name)
78  *
79  * Use
80  *  Merges the given file into the sprite area specified.
81  *
82  * Parameters
83  *  glass_tfile *t == the template file that we're going to load for
84  *  char *name == the name of the file to load
85  */
86
87 void gSprite_mergeFromFile(glass_tfile *t,char *name);
88
89 /*
90  * void gSprite_new(glass_tfile *t)
91  *
92  * Use
93  *  Creates a sprite file for the given template file.  Initially, the file
94  *  is blank.  On failure, an error is generated and sprite area 1 (WIMP
95  *  pool) is used instead.  Note that at present, this section uses indir
96  *  for allocation of sprite areas.
97  *
98  * Parameters
99  *  glass_tfile *t == the file to use
100  */
101
102 void gSprite_new(glass_tfile *t);
103
104 /*
105  * sprite_area *gSprite_area(void)
106  *
107  * Use
108  *  Returns the address of the Glass default sprite file, or 1 for the
109  *  WIMP sprite area if no default sprites are loaded
110  */
111
112 sprite_area *gSprite_area(void);
113
114 /*
115  * void gSprite_init(void)
116  *
117  * Use
118  *  Loads the Glass default sprite area into memory.
119  */
120
121 void gSprite_init(void);
122
123 #endif