summaryrefslogtreecommitdiff
path: root/src/win95/gsprchnk.hpp
blob: f467e05f57fe5cbe1cb153d21a6c9680ec8b9a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef _included_gsprchnk_hpp_
#define _included_gsprchnk_hpp_

#include "chunk.hpp"
#include "mishchnk.hpp"

class AllSprites_Header_Chunk;

class AllSprites_Chunk : public Lockable_Chunk_With_Children
{
public:

	// empty constructor
	AllSprites_Chunk (Chunk_With_Children * parent);
	// constructor from buffer
	AllSprites_Chunk (Chunk_With_Children * const parent,const char *, size_t const);

	AllSprites_Header_Chunk * get_header();

	// functions for the locking functionality

	BOOL file_equals (HANDLE &);
	const char * get_head_id();
	void set_lock_user(const char *);
	
	void post_input_processing();

private:

	friend class File_Chunk;
	friend class GodFather_Chunk;




};

///////////////////////////////////////////////

class AllSprites_Header_Chunk : public Chunk
{
public:
	// constructor from buffer
	AllSprites_Header_Chunk (Chunk_With_Children * parent, const char * pdata, size_t psize);

	virtual size_t size_chunk ()
	{
		chunk_size = 36;
		return chunk_size;
	}

	virtual BOOL output_chunk (HANDLE &);

	virtual void fill_data_block (char * data_start);

	void prepare_for_output();

private:

	friend class AllSprites_Chunk;
	friend class File_Chunk;

	int flags;

	int version_no;

	char lock_user[17];
	

	
	// constructor from parent
	AllSprites_Header_Chunk (AllSprites_Chunk * parent)
	: Chunk (parent, "ASPRHEAD"),
	flags (0), version_no (0)
	{}
	
};
	



#endif // _included_gsprchnk_hpp_