Skip to content

Commit

Permalink
mass move of files
Browse files Browse the repository at this point in the history
Cleaning up piles of src files.
Adjusted include macros to use paths relative to root directory
for consistency

Signed-off-by: Kris Bahnsen <[email protected]>
  • Loading branch information
kbembedded committed Aug 6, 2024
1 parent 24769ce commit 717f383
Show file tree
Hide file tree
Showing 62 changed files with 171 additions and 173 deletions.
8 changes: 0 additions & 8 deletions item_nl.h

This file was deleted.

8 changes: 0 additions & 8 deletions move_nl.h

This file was deleted.

8 changes: 8 additions & 0 deletions src/include/item_nl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef ITEM_NL_H
#define ITEM_NL_H

#pragma once

extern const NamedList item_list[];

#endif // ITEM_NL_H
8 changes: 8 additions & 0 deletions src/include/move_nl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef MOVE_NL_H
#define MOVE_NL_H

#pragma once

extern const NamedList move_list[];

#endif // MOVE_NL_H
6 changes: 3 additions & 3 deletions named_list.h → src/include/named_list.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __NAMED_LIST_H__
#define __NAMED_LIST_H__
#ifndef NAMED_LIST_H
#define NAMED_LIST_H

#pragma once

Expand Down Expand Up @@ -43,4 +43,4 @@ const char* namedlist_name_get_index(const NamedList* list, uint32_t index);
/* Get a pointer to the item's name from a position */
const char* namedlist_name_get_pos(const NamedList* list, uint32_t pos);

#endif //__NAMED_LIST_H__
#endif //NAMED_LIST_H
2 changes: 1 addition & 1 deletion pokemon_app.h → src/include/pokemon_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <gui/modules/variable_item_list.h>
#include <gblink.h>

#include "pokemon_data.h"
#include <src/include/pokemon_data.h>

#define TAG "Pokemon"

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions pokemon_data.h → src/include/pokemon_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include <math.h>
#include <stdint.h>

#include <named_list.h>
#include <stat_nl.h>
#include <pokemon_table.h>
#include "stats.h"
#include <src/include/named_list.h>
#include <src/include/stat_nl.h>
#include <src/include/pokemon_table.h>
#include <src/include/stats.h>

/* Generation defines */
#define GEN_I 0x01
Expand Down
6 changes: 3 additions & 3 deletions pokemon_table.h → src/include/pokemon_table.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __POKEMON_TABLE_H__
#define __POKEMON_TABLE_H__
#ifndef POKEMON_TABLE_H
#define POKEMON_TABLE_H

#include <stdint.h>

Expand Down Expand Up @@ -30,4 +30,4 @@ uint8_t
const char* table_stat_name_get(const PokemonTable* table, int num);
const PokemonTable* table_pointer_get();

#endif // __POKEMON_TABLE_H__
#endif // POKEMON_TABLE_H
6 changes: 3 additions & 3 deletions stat_nl.h → src/include/stat_nl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAT_NL_H__
#define __STAT_NL_H__
#ifndef STAT_NL_H
#define STAT_NL_H

#pragma once

Expand All @@ -14,4 +14,4 @@ typedef enum {
MAXIV_MAXEV,
} EvIv;

#endif // __STAT_NL_H__
#endif // STAT_NL_H
6 changes: 3 additions & 3 deletions stats.h → src/include/stats.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STATS_H__
#define __STATS_H__
#ifndef STATS_H
#define STATS_H

#pragma once

Expand Down Expand Up @@ -101,4 +101,4 @@ typedef enum {
NONE = 0, // Just a filler value
} DataStatSub;

#endif // __STATS_H__
#endif // STATS_H
8 changes: 8 additions & 0 deletions src/include/type_nl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef TYPE_NL_H
#define TYPE_NL_H

#pragma once

extern const NamedList type_list[];

#endif // TYPE_NL_H
4 changes: 2 additions & 2 deletions item_nl.c → src/item_nl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <named_list.h>
#include <pokemon_data.h>
#include <src/include/named_list.h>
#include <src/include/pokemon_data.h>

const NamedList item_list[] = {
{"No Item", 0x00, GEN_II},
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions move_nl.c → src/move_nl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <named_list.h>
#include <pokemon_data.h>
#include <src/include/named_list.h>
#include <src/include/pokemon_data.h>

const NamedList move_list[] = {
{"No Move", 0x00, (GEN_I | GEN_II)},
Expand Down
2 changes: 1 addition & 1 deletion named_list.c → src/named_list.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <stddef.h>
#include <stdint.h>

#include <named_list.h>
#include <src/include/named_list.h>

/* Get number of elements in a list
* This is not very efficient as-is since it has to walk the whole list.
Expand Down
12 changes: 6 additions & 6 deletions pokemon_app.c → src/pokemon_app.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <furi_hal_light.h>
#include <pokemon_icons.h>

#include "pokemon_app.h"
#include "pokemon_data.h"
#include "scenes/pokemon_menu.h"
#include "views/trade.h"
#include "views/select_pokemon.h"
#include "pokemon_char_encode.h"
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>
#include <src/scenes/pokemon_menu.h>
#include <src/views/trade.h>
#include <src/views/select_pokemon.h>
#include <src/include/pokemon_char_encode.h>

PokemonFap* pokemon_alloc() {
PokemonFap* pokemon_fap = (PokemonFap*)malloc(sizeof(PokemonFap));
Expand Down
2 changes: 1 addition & 1 deletion pokemon_char_encode.c → src/pokemon_char_encode.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stddef.h>

#include "pokemon_char_encode.h"
#include <src/include/pokemon_char_encode.h>

char pokemon_char_to_encoded(int byte) {
switch(byte) {
Expand Down
22 changes: 11 additions & 11 deletions pokemon_data.c → src/pokemon_data.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#include <pokemon_icons.h>
#include "pokemon_data_i.h"

#include <storage/storage.h>

#include "pokemon_data.h"
#include "pokemon_data_i.h"
#include "pokemon_app.h"
#include "pokemon_char_encode.h"
#include <src/include/pokemon_data.h>
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_char_encode.h>

#include "pokemon_table.h"
#include <src/include/pokemon_table.h>

#include <named_list.h>
#include <item_nl.h>
#include <stat_nl.h>
#include <type_nl.h>
#include <move_nl.h>
#include <src/include/named_list.h>
#include <src/include/item_nl.h>
#include <src/include/stat_nl.h>
#include <src/include/type_nl.h>
#include <src/include/move_nl.h>

#include <missingno_i.h>
#include <src/missingno_i.h>

#define RECALC_NONE 0x00
#define RECALC_EXP 0x01
Expand Down
6 changes: 3 additions & 3 deletions pokemon_data_i.h → src/pokemon_data_i.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef __POKEMON_DATA_I_H__
#define __POKEMON_DATA_I_H__

#include "pokemon_data.h"
#include <src/include/pokemon_data.h>

//#include "pokemon_app.h"
//#include "pokemon_char_encode.h"
//#include <src/pokemon_app.h>
//#include <src/include/pokemon_char_encode.h>

static void pokemon_stat_ev_calc(PokemonData* pdata, EvIv val);
static void pokemon_stat_iv_calc(PokemonData* pdata, EvIv val);
Expand Down
9 changes: 4 additions & 5 deletions pokemon_table.c → src/pokemon_table.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#include <stdint.h>

#include <pokemon_table.h>
#include "stats.h"

#include <gui/icon.h>
#include <pokemon_icons.h>

#include <furi.h>

#include <pokemon_icons.h>
#include <src/include/pokemon_table.h>
#include <src/include/stats.h>

/* NOTE: It seems like gen ii index is national pokedex order? */
/* Gen i and Gen ii are _almost_ the same with all stats. The big difference
* is that while most gen i pokemon's spc matches the same gen ii spc_atk,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <gui/modules/dialog_ex.h>

#include <pokemon_icons.h>
#include "pokemon_menu.h"
#include "../pokemon_app.h"
#include "../pokemon_data.h"
#include <src/scenes/pokemon_menu.h>
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>

#include "../views/select_pokemon.h"
#include "../views/trade.h"
#include <src/views/select_pokemon.h>
#include <src/views/trade.h>

static bool pokemon_exit_confirm_back_event_callback(void* context) {
UNUSED(context);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __POKEMON_EXIT_CONFIRM_H__
#define __POKEMON_EXIT_CONFIRM_H__
#ifndef POKEMON_EXIT_CONFIRM_H
#define POKEMON_EXIT_CONFIRM_H

#pragma once

Expand All @@ -12,4 +12,4 @@ void pokemon_exit_confirm_on_enter(void* context);

bool pokemon_exit_confirm_on_event(void* context, SceneManagerEvent event);

#endif // __POKEMON_EXIT_CONFIRM_H__
#endif // POKEMON_EXIT_CONFIRM_H
24 changes: 12 additions & 12 deletions scenes/pokemon_gen.c → src/scenes/pokemon_gen.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#include "../pokemon_app.h"
#include "../pokemon_data.h"
#include "../pokemon_char_encode.h"
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>
#include <src/include/pokemon_char_encode.h>

#include <named_list.h>
#include <src/include/named_list.h>

#include "../views/trade.h"
#include "../views/select_pokemon.h"
#include <src/views/trade.h>
#include <src/views/select_pokemon.h>

#include "pokemon_menu.h"
#include "pokemon_stats.h"
#include "pokemon_shiny.h"
#include "pokemon_gender.h"
#include "pokemon_pokerus.h"
#include "unown_form.h"
#include <src/scenes/pokemon_menu.h>
#include <src/scenes/pokemon_stats.h>
#include <src/scenes/pokemon_shiny.h>
#include <src/scenes/pokemon_gender.h>
#include <src/scenes/pokemon_pokerus.h>
#include <src/scenes/unown_form.h>

static void scene_change_from_main_cb(void* context, uint32_t index) {
PokemonFap* pokemon_fap = (PokemonFap*)context;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions scenes/pokemon_gender.c → src/scenes/pokemon_gender.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <gui/modules/submenu.h>

#include "../pokemon_app.h"
#include "../pokemon_data.h"
#include "pokemon_menu.h"
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>
#include <src/scenes/pokemon_menu.h>

static const char* gender_str[] = {
"Unknown",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions scenes/pokemon_item.c → src/scenes/pokemon_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#include <gui/scene_manager.h>
#include <stdio.h>

#include <named_list.h>
#include <src/include/named_list.h>

#include "../pokemon_app.h"
#include "../pokemon_data.h"
#include "pokemon_menu.h"
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>
#include <src/scenes/pokemon_menu.h>

static void select_item_selected_callback(void* context, uint32_t index) {
PokemonFap* pokemon_fap = (PokemonFap*)context;
Expand Down
File renamed without changes.
38 changes: 19 additions & 19 deletions scenes/pokemon_menu.c → src/scenes/pokemon_menu.c
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#include "../pokemon_app.h"
#include "../pokemon_data.h"
#include "../pokemon_char_encode.h"

#include "pokemon_menu.h"
#include "pokemon_gen.h"
#include "pokemon_select.h"
#include "pokemon_name_input.h"
#include "pokemon_number_input.h"
#include "pokemon_move.h"
#include "pokemon_item.h"
#include "pokemon_type.h"
#include "pokemon_stats.h"
#include "pokemon_shiny.h"
#include "pokemon_gender.h"
#include "pokemon_pokerus.h"
#include "pokemon_trade.h"
#include "pokemon_pins.h"
#include "pokemon_exit_confirm.h"
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>
#include <src/include/pokemon_char_encode.h>

#include <src/scenes/pokemon_menu.h>
#include <src/scenes/pokemon_gen.h>
#include <src/scenes/pokemon_select.h>
#include <src/scenes/pokemon_name_input.h>
#include <src/scenes/pokemon_number_input.h>
#include <src/scenes/pokemon_move.h>
#include <src/scenes/pokemon_item.h>
#include <src/scenes/pokemon_type.h>
#include <src/scenes/pokemon_stats.h>
#include <src/scenes/pokemon_shiny.h>
#include <src/scenes/pokemon_gender.h>
#include <src/scenes/pokemon_pokerus.h>
#include <src/scenes/pokemon_trade.h>
#include <src/scenes/pokemon_pins.h>
#include <src/scenes/pokemon_exit_confirm.h>

static void scene_change_from_main_cb(void* context, uint32_t index) {
PokemonFap* pokemon_fap = (PokemonFap*)context;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions scenes/pokemon_move.c → src/scenes/pokemon_move.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#include <gui/scene_manager.h>
#include <stdio.h>

#include <named_list.h>
#include <src/include/named_list.h>

#include "../pokemon_app.h"
#include "../pokemon_data.h"
#include "pokemon_menu.h"
#include <src/include/pokemon_app.h>
#include <src/include/pokemon_data.h>
#include <src/scenes/pokemon_menu.h>

static void select_move_selected_callback(void* context, uint32_t index) {
PokemonFap* pokemon_fap = (PokemonFap*)context;
Expand Down
File renamed without changes.
Loading

0 comments on commit 717f383

Please sign in to comment.