source: golgotha/src/i4/loaders/load.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 15 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.5 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef __IMAGE_LOAD_HPP_
10#define __IMAGE_LOAD_HPP_
11
12#include "arch.hh"
13#include "init/init.hh"
14
15class i4_const_str;
16class i4_file_class;
17class i4_image_class;
18class i4_status_class;
19
20class i4_image_loader_class : public i4_init_class
21{
22  public :
23  // returns the maximum size you need to identify your file format
24  virtual w16 max_header_size() = 0;                 
25
26  // return true if you recognize your header signature
27  virtual i4_bool recognize_header(w8 *buf) = 0;     
28
29  // assume fp is at the start of the file
30  // if status is non-null, then it should updated as the load progresses
31  virtual i4_image_class *load(i4_file_class *fp,
32                               i4_status_class *status) = 0;           
33
34  virtual void init();
35
36  i4_image_loader_class *next;
37} ;
38
39
40i4_image_class *i4_load_image(const i4_const_str &filename,
41                              i4_status_class *status=0);
42
43i4_image_class *i4_load_image(i4_file_class *fp,
44                              i4_status_class *status=0);
45
46
47#endif
Note: See TracBrowser for help on using the repository browser.