[80] | 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 |
|
---|
| 15 | class i4_const_str;
|
---|
| 16 | class i4_file_class;
|
---|
| 17 | class i4_image_class;
|
---|
| 18 | class i4_status_class;
|
---|
| 19 |
|
---|
| 20 | class 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 |
|
---|
| 40 | i4_image_class *i4_load_image(const i4_const_str &filename,
|
---|
| 41 | i4_status_class *status=0);
|
---|
| 42 |
|
---|
| 43 | i4_image_class *i4_load_image(i4_file_class *fp,
|
---|
| 44 | i4_status_class *status=0);
|
---|
| 45 |
|
---|
| 46 |
|
---|
| 47 | #endif
|
---|