-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
118 lines (105 loc) · 4.06 KB
/
main.c
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
############################################################
# #
# Made by: Leonardo Tórtoro Pereira #
# #
# “you have something called "determination." #
# so as long as you hold on... #
# so as long as you do what's in your heart... #
# i believe you can do the right thing.” #
# #
# 'll0MMMMMMMMMMMMMOll' #
# .OMMMMMMMMMMMMMMMMMMM0l' #
# 'OMMMMMMMMMMMMMMMMMMMMMM0' #
# '0MMMMMMMMMMMMMMMMMMMMMMMM0' #
# '0MMMMMMMMMMMMMMMMMMMMMMMMMM0' #
# lMMMMMMMMMMMMMMMMMMMMMMMMMMMMl #
# 0MMMMMMMMMMMMMMMMMMMMMMMMMMMM0 #
# MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM #
# MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM #
# MMMM0lllllOMMMMMMMM0lllll0MMMM #
# MM0l' .OMMMMMM0' 'l0MM #
# M0' lMMMMMMl '0M #
# Ml 'l' lMMMMMMl 'l' lM #
# Ml lMl lMMMMMMl lMl lM #
# 00' 'l' '0M0ll0M0' 'l' '00 #
# lM0l' lMMl lMMl 'l0Ml #
# '0MM0lll''0M0' '0M0''lll0MM0' #
# lMMMM0ll0MMl lMM0ll0MMMMl #
# '0MM000l0MMMl lMMM0lOO0MMO. #
# lMM0'lMMMMMMOllll0MMMMMMl'0MMl #
# lM0' 'l0MMMMMMMMMMMMMM0l' '0Ml #
# lM0l' 'llllllllllllllll' 'l0Ml #
# lMMMl ll ll lMMMl #
# '0MM0'll'l''l''lll''l'll'0MM0' #
# lMMM0l'lMllMllMMMllMl'l0MMMl #
# '0MMMO''0llMllMMMll0''0MMM0' #
# '0MMM0ll''l''lll''ll0MMM0' #
# 'l0MMM0llllllllll0MMMOl' #
# 'l0MMMMMMMMMMMMMM0l' #
# lMMMMMMMMMMMMMMl #
# #
############################################################
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "Util.h"
#include "PokeType.h"
#include "Pokemon.h"
#include "PokeBox.h"
#include "PokeDex.h"
#include "SaveManager.h"
#include "Moves.h"
int main()
{
//pokemon_t** team = NULL;
pokemon_t** pkdex = NULL;
#ifdef DEBUG
pokebox_t box;
#endif
srand(time(NULL));
//box_t* pcBox = NULL;
//int actualTeamSize = 6;
int totalPkmn = 0;
#ifdef DEBUG
printf("Loading Pokedex, please wait\n");
#endif
pkdex = readPkDex(&totalPkmn);
#ifdef DEBUG
printf("Pokedex Loaded!\n");
#endif
/*team = (pokemon_t**) malloc(sizeof(pokemon_t*)*actualTeamSize);
for(int i = 0; i < actualTeamSize; ++i)
{
team[i] = randPkmn(pkdex, totalPkmn);
printPokemon(team[i]);
}*/
#ifdef DEBUG
for (int i = 0; i < BOXSIZE; i++) {
box[i] = randPkmn(pkdex, totalPkmn);
}
box[3] = NULL;
printBox(box);
for (int i = 0; i < BOXSIZE; i++) {
box[i] = NULL;
}
#endif
for(int i = 0; i < totalPkmn; ++i)
{
free(pkdex[i]);
}
free(pkdex);
/*saveTeam(team, "data/player2.dat");
team = loadTeam("data/player2.dat");
for(int i = 0; i < actualTeamSize; ++i)
{
if(team[i] != NULL)
printPokemon(team[i]);
else
printf("NULL POKEMON\n");
}*/
//team[0]->moves[0] = createMove("Ember", FIRE, SPECIAL, 25, 40, 100, applyBurn, ENEMY);
//team[0]->moves[0]->effectFunction(team[1], 100);
}