fix gamedata
This commit is contained in:
		
							parent
							
								
									385d2a62cb
								
							
						
					
					
						commit
						d27c9bd1ef
					
				
					 1 changed files with 2 additions and 84 deletions
				
			
		
							
								
								
									
										86
									
								
								src/data.h
									
										
									
									
									
								
							
							
						
						
									
										86
									
								
								src/data.h
									
										
									
									
									
								
							|  | @ -1,64 +1,29 @@ | |||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| #pragma once | ||||
| ======= | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| #pragma once | ||||
| >>>>>>> 08f4a9f (draw function added) | ||||
| #include <stdbool.h> | ||||
| 
 | ||||
| #define MAX_UNITS 100 | ||||
| #define MAX_BUILDINGS 50 | ||||
| #define MAX_PLAYERS 2 | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| #define MAX_MISSIONS 10 | ||||
| #define MAX_RESOURCES 50 | ||||
| #define MAP_SIZE 100 | ||||
| 
 | ||||
| typedef struct Player { | ||||
| ======= | ||||
| 
 | ||||
| typedef struct { | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| #define MAX_MISSIONS 10 | ||||
| #define MAX_RESOURCES 50 | ||||
| #define MAP_SIZE 100 | ||||
| 
 | ||||
| typedef struct Player { | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
|     int playerID; | ||||
|     char playerName[50]; | ||||
|     int gold; | ||||
|     int xp; | ||||
| } Player; | ||||
| 
 | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| 
 | ||||
| typedef struct Unit { | ||||
| ======= | ||||
| typedef struct { | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| typedef struct Unit { | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
|     int unitID; | ||||
|     int playerID; | ||||
|     int x, y; // Position
 | ||||
|     int health; | ||||
| } Unit; | ||||
| 
 | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| typedef struct Building { | ||||
| ======= | ||||
| typedef struct { | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| typedef struct Building { | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
|     int buildingID; | ||||
|     int playerID; | ||||
|     int x, y; // Position
 | ||||
|  | @ -66,45 +31,17 @@ typedef struct Building { | |||
|     int health; | ||||
| } Building; | ||||
| 
 | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| typedef struct Map { | ||||
| ======= | ||||
| typedef struct { | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| typedef struct Map { | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
|     int mapID; | ||||
|     char mapName[50]; | ||||
|     int mapWidth; | ||||
|     int mapHeight; | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
|     int tileData[MAP_SIZE][MAP_SIZE]; // 2D array for map tile indices
 | ||||
| ======= | ||||
|     int tileData[MAX_MAP_WIDTH][MAX_MAP_HEIGHT]; | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
|     int tileData[MAP_SIZE][MAP_SIZE]; // Assuming 2D array for resource coordinates
 | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
| ======= | ||||
|     int tileData[MAP_SIZE][MAP_SIZE]; // 2D array for map tile indices
 | ||||
| >>>>>>> 08f4a9f (draw function added) | ||||
|     int tileData[MAP_SIZE][MAP_SIZE];  | ||||
|     int playerStartingPositions[MAX_PLAYERS][2]; // [x, y] coordinates for each player
 | ||||
|     int resourceLocations[MAX_RESOURCES][2]; // [x, y] coordinates for each resource
 | ||||
| } Map; | ||||
| 
 | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| typedef struct Mission { | ||||
| ======= | ||||
| typedef struct { | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| typedef struct Mission { | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
|     int missionID; | ||||
|     char missionName[50]; | ||||
|     char missionDescription[100]; | ||||
|  | @ -119,24 +56,12 @@ typedef struct Mission { | |||
|     bool hasSpecialConditions; // Flag indicating whether the mission has special conditions
 | ||||
| } Mission; | ||||
| 
 | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| typedef struct GameData { | ||||
| ======= | ||||
| typedef struct { | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| typedef struct GameData { | ||||
| >>>>>>> 0125c62 (update gamestructure) | ||||
|     Player players[MAX_PLAYERS]; | ||||
|     Unit units[MAX_UNITS]; | ||||
|     Building buildings[MAX_BUILDINGS]; | ||||
|     Map currentMap; | ||||
|     Mission missions[MAX_MISSIONS]; | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| ======= | ||||
| >>>>>>> 4b87dcb (ui) | ||||
|     int mapx, mapy;  | ||||
| } GameData; | ||||
| 
 | ||||
|  | @ -165,11 +90,4 @@ typedef struct { | |||
|     GameData data; | ||||
|     BuildingData buildings[100]; | ||||
|     UnitData units[100]; | ||||
| <<<<<<< HEAD | ||||
| } Game; | ||||
| ======= | ||||
| } GameData; | ||||
| >>>>>>> 8e3d2ca (add game structure) | ||||
| ======= | ||||
| } Game; | ||||
| >>>>>>> 4b87dcb (ui) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue