summaryrefslogtreecommitdiff
path: root/src/include/data_ini.h
blob: 9b14899cdcb823425f4878487e0eae772c24d992 (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
83
84
85
86
87
88
89
90
91
#ifndef DATA_INI_H
#define DATA_INI_H

#include <SDL_stdinc.h>

// Original game level size is fixed to 1664x160. We want to display all the game with a x2 zoom
#define LEVEL_WIDTH 1664*2
#define LEVEL_HEIGHT 160*2

#define MAX_NAMELEN 64

#define MAX_PARTICLE_COLORS 16
#define MAX_MUSICS_COUNT 32
#define MAX_DIFFICULTY_COUNT 8
#define MAX_OBJECTS_COUNT 256
#define MAX_TERRAINS_COUNT 1024
#define MAX_STEELS_COUNT 256

//////////////////////// LEVEL INI FILES ////////////////////////

// Item should be an object, terrain or steel
struct levelItem {
	int id, xpos, ypos;	// Common to all types (but no id for steel)
	int paintMode, ud;	// Specific to objects
	int modifier;		// Specific to terrains
	int width, height;	// Specific to steels
};

struct levelIni {
	int releaseRate, numLemmings, numToRescue, timeLimit;
	int numClimbers, numFloaters, numBlockers, numBombers;
	int numBuilders, numBashers, numMiners, numDiggers;
	int xPos; // Initial camera position on level
	char style[MAX_NAMELEN], name[MAX_NAMELEN];
	int superLemming;
	int objectCount, terrainCount, steelCount;
	struct levelItem objects[MAX_OBJECTS_COUNT];
	struct levelItem terrains[MAX_OBJECTS_COUNT];
	struct levelItem steels[MAX_OBJECTS_COUNT];
};


//////////////////////// LEVELPACK INI FILES ////////////////////////
struct levelPackIni {
	char name[MAX_NAMELEN];
	int maxFallDistance;
	char codeSeed[MAX_NAMELEN];
	int musicCount, levelDifficultyCount;
	char music[MAX_MUSICS_COUNT][MAX_NAMELEN];
	char levelDifficulty[MAX_DIFFICULTY_COUNT][MAX_NAMELEN];
};

//////////////////////// STYLE INI FILES ////////////////////////
struct styleIni {
	char name[MAX_NAMELEN];
	uint32_t bgColor, debrisColor;
	int tiles, particleColorCount;
	uint32_t particleColor[MAX_PARTICLE_COLORS];
	int objectCount;
	int frames[MAX_OBJECTS_COUNT];
	int anim[MAX_OBJECTS_COUNT];
	int type[MAX_OBJECTS_COUNT];
	int sound[MAX_OBJECTS_COUNT];
};

/*////////////////////// MISC/LEMMING.INI FILE ////////////////////////
struct lemmingAnim {
	int haveMask, haveImask;

	int lemmFrames, lemmDirs, lemmAnimType;
	int maskFrames, maskDirs, maskStartFrame;
	int imaskFrames, imaskDirs;
	int xPos, yPos, posFlags;
};

struct miscIni {
	int lemmingAnimCount;
	struct lemmingAnim *lemmingAnims;
};
*/

//////////////////////// GLOBAL INI FILES ////////////////////////
typedef struct {
	struct styleIni style;
	struct levelIni level;
	struct levelPackIni levelPack;
	//struct miscIni misc;
} gameIni_t;


#endif /*DATA_INI_H*/