Просмотр исходного кода

patch_list: move to main codebase, rename, cleanup

Makes the patch_list struct opaque

Signed-off-by: Kris Bahnsen <Kris@KBEmbedded.com>
Kris Bahnsen 1 год назад
Родитель
Сommit
17dc0b7f6b
3 измененных файлов с 7 добавлено и 6 удалено
  1. 1 4
      src/include/patch_list.h
  2. 5 1
      src/patch_list.c
  3. 1 1
      src/views/trade.c

+ 1 - 4
src/views/trade_patch_list.h → src/include/patch_list.h

@@ -7,10 +7,7 @@
 #include <src/include/pokemon_app.h>
 #include <src/include/pokemon_app.h>
 #include <src/include/pokemon_data.h>
 #include <src/include/pokemon_data.h>
 
 
-struct patch_list {
-    uint8_t index;
-    struct patch_list* next;
-};
+struct patch_list;
 
 
 struct patch_list* plist_alloc(void);
 struct patch_list* plist_alloc(void);
 
 

+ 5 - 1
src/views/trade_patch_list.c → src/patch_list.c

@@ -1,5 +1,9 @@
 #include <src/include/pokemon_app.h>
 #include <src/include/pokemon_app.h>
-#include <src/views/trade_patch_list.h>
+
+struct patch_list {
+    uint8_t index;
+    struct patch_list* next;
+};
 
 
 struct patch_list* plist_alloc(void) {
 struct patch_list* plist_alloc(void) {
     struct patch_list* plist = NULL;
     struct patch_list* plist = NULL;

+ 1 - 1
src/views/trade.c

@@ -99,7 +99,7 @@
 
 
 #include <src/include/pokemon_app.h>
 #include <src/include/pokemon_app.h>
 #include <src/include/pokemon_data.h>
 #include <src/include/pokemon_data.h>
-#include <src/views/trade_patch_list.h>
+#include <src/include/patch_list.h>
 
 
 /* Uncomment the following line to enable graphics testing for the different
 /* Uncomment the following line to enable graphics testing for the different
  * phases of the trade view. Pressing the okay button will step through each
  * phases of the trade view. Pressing the okay button will step through each