From cf7fe21b121c0c32051352304ccddb480850e4c7 Mon Sep 17 00:00:00 2001 From: Shadow15510 Date: Fri, 4 Jun 2021 09:47:31 +0200 Subject: [PATCH] Fully functional save system (#4) Functional save system Save system Fixing SysError SysError on read save Fix bugs Fix bugs Cancel precend commit Extract the planes from the structure game Change on save system Save system Re-balance DNA gain and research speed Co-authored-by: Shadow15510 Reviewed-on: https://gitea.planet-casio.com/Shadow15510/Plague/pulls/4 Co-Authored-By: Shadow15510 Co-Committed-By: Shadow15510 --- CMakeLists.txt | 1 + Plague.g1a | Bin 64656 -> 65184 bytes src/core.c | 7 ++-- src/core.h | 2 + src/data.c | 14 +++---- src/main.c | 17 ++++---- src/mutation_engine.c | 2 +- src/save.c | 93 ++++++++++++++++++++++++++++++++++++++++++ src/save.h | 12 ++++++ 9 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 src/save.c create mode 100644 src/save.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 56e7d81..d6490c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ set(SOURCES src/mutation_engine.c src/data.c src/epidemic_engine.c + src/save.c # ... ) # Shared assets, fx-9860G-only assets and fx-CG-50-only assets diff --git a/Plague.g1a b/Plague.g1a index bfc6a57c345865ad9fa8af5a3b5d82dbf32cd6c2..29520fea59c122d61c0261acacba8641624b3180 100644 GIT binary patch delta 5795 zcmZ`-0Z^1jmhS(baRLm%VL%*4GBb_{h#b@6s3;>2NIWH!FasJTM3D@j5j}#)x`t&i zQ5FRv(3IhJxfHjdT+X!=`Q23Nic4`D&f>1z++aq^xKiw_#y{})te*OCW{nPwR*7?0`!MXGQcCoqs7fr#_f5D&bhv{iy_pe(Pm=xwjy4Jkn zQf9Xx{?I8+3hM;t_UZst&}BjiexCMe7Z_dA7N81L5hBzQ>ggop6;*&rgnU&Fw2=K^ z0GE3)^vxrL)($`~Csa1T3GHM;^HpOU#ecw$k@DHLFxw_!be;WL5Z+^| zGo3M=HGO8f@_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!{MnKWPb^{w z{6O&M%OXr%tOQ}f#nUj?hyU(2g5p3}WeK!2&Z zMKa&t8pV^|bFHz4($Ur1pmcmq+auXpYemu6CwbZ@#qcwEt!XovZqhhF=$ZRc-w$lk`)yIg zduHaXR$V5lU5NHVKGE_j4x`h1dpCTGo^+$W*m+jVA8nk)E(xJu^~>r)SXMZ@qJ+56 zNn*Kru3T0p949oPYgL`#AZmGZAJorLdm;(|irvab3l@lytLJKPdpxQyK{YO}VM0^W zSNo}6luwR#^!9GsPU8k-6`jMXdDkDof(@E?8}bF_=^8+=JK@Jp1dazbK>M@p_M-iS z{7rVg{n=bXn7!K=+vx-h^R2?r=dy;iGS<_5AfxkRh)36o(Z2~o8ay_f;~uTbb-lft z*-tKqO8ejbLyS07$>@hsh9MX14h`B4{*>INL&uqus~gabTcb9vs9RXihf(6tX*SDQ z7rV~Eecu3USHOcDWf;2hSJWRf(-71=5|Q$Vz)!f$=+I5(;OcR71I7i^0i)^AZPq>% zRWLLYkjgVC(T)a15;}AroJ090)F8fr6v!7=+F$n(lo~^tew1jVl%iGUg#bRA@FQDa3ZjTFE)bguQqGwRb zyIL$rKfU&Mg35CRa*tF#9Ac9i=XbAD%^@G>nxx^yW+CYfO!>w}P!`BZXtNLWCE7h8 zBxEym&2_jaLP1oj{PS}HJND0d_JKb^^;Hwjb`!hpKiPH`@Uu>Ci2Tvoc|u>~{(Ai5 zGWu%J_EjA{1~aPW9|>s9it`{3ejF40=t(c0GgzYurL*ZaQP8C(_WcjGvW2fN{Xc~B Bo;&~m diff --git a/src/core.c b/src/core.c index 3be605c..a476971 100644 --- a/src/core.c +++ b/src/core.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "core.h" #include "mutation_engine.h" @@ -53,12 +54,12 @@ void next_frame(struct game *current_game) current_game->time = 0; // Update the game - if (current_game->dna <= 100) current_game->dna += 1; - current_game->research += current_game->priority; + if (current_game->dna <= 100) current_game->dna += 1 + floor(current_game->severity / 25); + if (current_game->research < current_game->limit) current_game->research += current_game->priority; epidemic_simulation(current_game); // Check the end of the game - if (current_game->research > current_game->limit) + if (current_game->research >= current_game->limit) { const char *msg[5] = {"Vous avez", "perdu.", "", "", ""}; message(msg); diff --git a/src/core.h b/src/core.h index 734dc89..cd9427a 100644 --- a/src/core.h +++ b/src/core.h @@ -3,6 +3,8 @@ #include + + // Duration for internal clock (ms) #define ENGINE_TICK 50 #define CURSOR_TICK 150 diff --git a/src/data.c b/src/data.c index 0ad46a1..2aad3a3 100644 --- a/src/data.c +++ b/src/data.c @@ -4,17 +4,17 @@ // (contation, severity, lethality, DNA cost, change to cure requirement) const struct mutation symptoms_data[14] = { - {15, 10, 0, 2, 0, "NAUSEE"}, - {25, 10, 0, 4, 0, "VOMISSEMENT"}, + {10, 10, 0, 2, 0, "NAUSEE"}, + {25, 10, 0, 10, 0, "VOMISSEMENT"}, {20, 10, 0, 3, 0, "TOUX"}, - {15, 20, 0, 4, 0, "PNEUMONIE"}, + {15, 20, 0, 10, 0, "PNEUMONIE"}, {10, 30, 20, 15, 25, "TUMEUR"}, {25, 10, 0, 4, 0, "PLAIES"}, {10, 10, 0, 10, 0, "LESIONS"}, {30, 20, 20, 20, 30, "HEMORRAGIE"}, {25, 15, 10, 17, 0, "INFECTION"}, - {15, 10, 10, 5, 0, "INFLAMMATION"}, - {10, 15, 20, 12, 0, "IMMUNITE"}, + {25, 10, 20, 20, 0, "INFLAMMATION"}, + {10, 15, 20, 15, 0, "IMMUNITE"}, { 0, 20, 0, 15, 120, "PARANOIA"}, { 0, 15, 0, 20, 100, "FOLIE"}, { 0, 30, 30, 30, 250, "ARRET TOTAL"}, @@ -25,8 +25,8 @@ const struct mutation abilities_data[6] = { {15, 0, 0, 10, 0, "FROID"}, {15, 0, 0, 15, 0, "CHAUD"}, - { 0, 20, 4, 25, 20, "GENETIQUE"}, - {10, 40, 8, 30, 50, "MUTATION+"}, + { 0, 10, 4, 25, 20, "GENETIQUE"}, + {10, 40, 20, 30, 50, "MUTATION+"}, {30, 0, 0, 30, 0, "ENVIRON"}, { 0, 15, 30, 15, 30, "MEDICAMENT"}, }; diff --git a/src/main.c b/src/main.c index 8c3318d..18568f8 100644 --- a/src/main.c +++ b/src/main.c @@ -17,7 +17,7 @@ #include "core.h" #include "display_engine.h" #include "mutation_engine.h" - +#include "save.h" // title_screen : display the title screen static void title_screen(void); @@ -41,6 +41,7 @@ int main(void) struct plane plane_4 = {104, 20, 3, 104, 50, 104, 20}; struct plane plane_5 = {68, 44, 4, 34, 44, 68, 44}; + struct game current_game = { .contagion = 0, @@ -65,21 +66,19 @@ int main(void) .grid = {64, 128, NULL}, }; - /* allocate memory */ + // Allocate memory current_game.grid.data = calloc(current_game.grid.width * current_game.grid.height, sizeof(uint8_t)); - if (current_game.grid.data == NULL) - { - const char *msg[5] = {"CALLOC", "FAILED", "", "", ""}; - message(msg); - } - current_game.grid.data[95 + 20 * current_game.grid.width] = 1; current_game.humans[0] = (current_game.grid.width * current_game.grid.height) - 1; + read_save(¤t_game); + main_loop(¤t_game); - /* free memory */ + write_save(¤t_game); + + // Free memory free(current_game.grid.data); return 1; diff --git a/src/mutation_engine.c b/src/mutation_engine.c index 403257f..1fa3c1d 100644 --- a/src/mutation_engine.c +++ b/src/mutation_engine.c @@ -158,7 +158,7 @@ void update_disease(struct game *current_game) // research parameters current_game->limit = RESEARCH_LIMIT + symptom->changement + ability->changement + transmission->changement; - current_game->priority = floor((current_game->severity + current_game->lethality) / 200); + current_game->priority = floor((current_game->severity + current_game->lethality) / 40); } diff --git a/src/save.c b/src/save.c new file mode 100644 index 0000000..addae58 --- /dev/null +++ b/src/save.c @@ -0,0 +1,93 @@ +#include +#include +#include + +#include "save.h" + +/* BUG + Démarrer le jeu, quitter, revenir sur le jeu, quitter -> la calto plante + => Premier démarrage du jeu : ok (valeur par défaut bien initialisée) + => Quand on revient sur le jeu, pas de problème : tout est sauvé correctement (sauvé correctement et chargé correctement) + => On quitte : bug +*/ + +// Name of the savefile +static const uint16_t *filename = u"\\\\fls0\\Plague.sav"; + + +void read_save(struct game *current_game) +{ + struct BFile_FileInfo fileInfo; + int fd, handle; + uint16_t foundpath[30]; + + // Sizes of data and init + const int planes_size = sizeof(*current_game->planes) * (NB_PLANES + 1); + struct plane *new_planes[NB_PLANES + 1]; + for (int i = 0; i < NB_PLANES; i ++) + { + new_planes[i] = current_game->planes[i]; + } + + const int data_size = current_game->grid.width * current_game->grid.height; + uint8_t *data = current_game->grid.data; + + // Check if the savefile exists + char checkfile = BFile_FindFirst(filename, &handle, foundpath, &fileInfo); + BFile_FindClose(handle); + + // If file doesn't exists + if (checkfile == -1) + { + int size = sizeof(struct game) + planes_size + data_size; + BFile_Create(filename, BFile_File, &size); + } + + // Loading game data + else + { + fd = BFile_Open(filename, BFile_ReadOnly); + BFile_Read(fd, current_game, sizeof(struct game), 0); + + // Overwritten struct plane* planes + for (int i = 0; i < NB_PLANES; i ++) + { + current_game->planes[i] = new_planes[i]; + } + + // Loa + for (int i = 0; i < NB_PLANES; i ++) + { + BFile_Read(fd, current_game->planes[i], sizeof(struct plane), -1); + } + BFile_Read(fd, data, data_size, -1); + BFile_Close(fd); + + current_game->grid.data = data; + } +} + + +void write_save(const struct game *current_game) +{ + // Remove the old savefile + BFile_Remove(filename); + + // Create a new one + const int data_size = current_game->grid.width * current_game->grid.height; + int size = sizeof(struct game) + NB_PLANES * sizeof(struct plane) + data_size; + BFile_Create(filename, BFile_File, &size); + + int fd = BFile_Open(filename, BFile_WriteOnly); + + // Write data + BFile_Write(fd, current_game, sizeof(struct game)); + for (int i = 0; i < NB_PLANES ; i ++) + { + BFile_Write(fd, current_game->planes[i], sizeof(struct plane)); + } + BFile_Write(fd, current_game->grid.data, data_size); + + // Close file + BFile_Close(fd); +} \ No newline at end of file diff --git a/src/save.h b/src/save.h new file mode 100644 index 0000000..f4dd4bc --- /dev/null +++ b/src/save.h @@ -0,0 +1,12 @@ +#ifndef _SAVE_H +#define _SAVE_H + +#include "core.h" + +// read_save : read or create a new save +void read_save(struct game *current_game); + +// write_save : write the savefile +void write_save(const struct game *current_game); + +#endif /* _SAVE_H */ \ No newline at end of file