Browse Source

prepare for merge

SBird1337 7 years ago
parent
commit
a8c2f62262

+ 90
- 0
.clang-format View File

@@ -0,0 +1,90 @@
1
+---
2
+Language:        Cpp
3
+# BasedOnStyle:  LLVM
4
+AccessModifierOffset: -2
5
+AlignAfterOpenBracket: Align
6
+AlignConsecutiveAssignments: false
7
+AlignConsecutiveDeclarations: false
8
+AlignEscapedNewlinesLeft: false
9
+AlignOperands:   true
10
+AlignTrailingComments: true
11
+AllowAllParametersOfDeclarationOnNextLine: true
12
+AllowShortBlocksOnASingleLine: false
13
+AllowShortCaseLabelsOnASingleLine: false
14
+AllowShortFunctionsOnASingleLine: All
15
+AllowShortIfStatementsOnASingleLine: false
16
+AllowShortLoopsOnASingleLine: false
17
+AlwaysBreakAfterDefinitionReturnType: None
18
+AlwaysBreakAfterReturnType: None
19
+AlwaysBreakBeforeMultilineStrings: false
20
+AlwaysBreakTemplateDeclarations: false
21
+BinPackArguments: true
22
+BinPackParameters: true
23
+BraceWrapping:   
24
+  AfterClass:      false
25
+  AfterControlStatement: false
26
+  AfterEnum:       false
27
+  AfterFunction:   false
28
+  AfterNamespace:  false
29
+  AfterObjCDeclaration: false
30
+  AfterStruct:     false
31
+  AfterUnion:      false
32
+  BeforeCatch:     false
33
+  BeforeElse:      false
34
+  IndentBraces:    false
35
+BreakBeforeBinaryOperators: None
36
+BreakBeforeBraces: Attach
37
+BreakBeforeTernaryOperators: true
38
+BreakConstructorInitializersBeforeComma: false
39
+ColumnLimit:     120
40
+CommentPragmas:  '^ IWYU pragma:'
41
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
42
+ConstructorInitializerIndentWidth: 4
43
+ContinuationIndentWidth: 4
44
+Cpp11BracedListStyle: true
45
+DerivePointerAlignment: false
46
+DisableFormat:   false
47
+ExperimentalAutoDetectBinPacking: false
48
+ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
49
+IncludeCategories: 
50
+  - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
51
+    Priority:        2
52
+  - Regex:           '^(<|"(gtest|isl|json)/)'
53
+    Priority:        3
54
+  - Regex:           '.*'
55
+    Priority:        1
56
+IndentCaseLabels: false
57
+IndentWidth:     4
58
+IndentWrappedFunctionNames: false
59
+KeepEmptyLinesAtTheStartOfBlocks: true
60
+MacroBlockBegin: ''
61
+MacroBlockEnd:   ''
62
+MaxEmptyLinesToKeep: 1
63
+NamespaceIndentation: None
64
+ObjCBlockIndentWidth: 2
65
+ObjCSpaceAfterProperty: false
66
+ObjCSpaceBeforeProtocolList: true
67
+PenaltyBreakBeforeFirstCallParameter: 19
68
+PenaltyBreakComment: 300
69
+PenaltyBreakFirstLessLess: 120
70
+PenaltyBreakString: 1000
71
+PenaltyExcessCharacter: 1000000
72
+PenaltyReturnTypeOnItsOwnLine: 60
73
+PointerAlignment: Right
74
+ReflowComments:  true
75
+SortIncludes:    true
76
+SpaceAfterCStyleCast: false
77
+SpaceBeforeAssignmentOperators: true
78
+SpaceBeforeParens: ControlStatements
79
+SpaceInEmptyParentheses: false
80
+SpacesBeforeTrailingComments: 1
81
+SpacesInAngles:  false
82
+SpacesInContainerLiterals: true
83
+SpacesInCStyleCastParentheses: false
84
+SpacesInParentheses: false
85
+SpacesInSquareBrackets: false
86
+Standard:        Cpp11
87
+TabWidth:        8
88
+UseTab:          Never
89
+...
90
+

+ 76
- 69
.vscode/c_cpp_properties.json View File

@@ -1,70 +1,77 @@
1
-{
2
-    "configurations": [
3
-        {
4
-            "name": "Mac",
5
-            "includePath": [
6
-                "${workspaceRoot}",
7
-                "/usr/include",
8
-                "/usr/local/include",
9
-                "src/include"
10
-            ],
11
-            "defines": [],
12
-            "browse": {
13
-                "path": [
14
-                    "/usr/include",
15
-                    "/usr/local/include",
16
-                    "src/include"
17
-                ],
18
-                "limitSymbolsToIncludedHeaders": true,
19
-                "databaseFilename": ""
20
-            }
21
-        },
22
-        {
23
-            "name": "Linux",
24
-            "includePath": [
25
-                "${workspaceRoot}",
26
-                "/usr/include",
27
-                "/usr/local/include",
28
-                "src/include"
29
-            ],
30
-            "defines": [],
31
-            "browse": {
32
-                "path": [
33
-                    "/usr/include",
34
-                    "/usr/local/include",
35
-                    "src/include"
36
-                ],
37
-                "limitSymbolsToIncludedHeaders": true,
38
-                "databaseFilename": ""
39
-            }
40
-        },
41
-        {
42
-            "name": "Win32",
43
-            "includePath": [
44
-                "${workspaceRoot}",
45
-                "E:/Visual Studio 2015/VC/include/*",
46
-                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um",
47
-                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt",
48
-                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared",
49
-                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt",
50
-                "src/include"
51
-            ],
52
-            "defines": [
53
-                "_DEBUG",
54
-                "UNICODE"
55
-            ],
56
-            "browse": {
57
-                "path": [
58
-                    "E:/Visual Studio 2015/VC/include/*",
59
-                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um",
60
-                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt",
61
-                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared",
62
-                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt",
63
-                    "src/include"
64
-                ],
65
-                "limitSymbolsToIncludedHeaders": true,
66
-                "databaseFilename": ""
67
-            }
68
-        }
69
-    ]
1
+{
2
+    "configurations": [
3
+        {
4
+            "name": "Mac",
5
+            "includePath": [
6
+                "${workspaceRoot}",
7
+                "/usr/include",
8
+                "/usr/local/include",
9
+                "src/include"
10
+            ],
11
+            "defines": [],
12
+            "browse": {
13
+                "path": [
14
+                    "/usr/include",
15
+                    "/usr/local/include",
16
+                    "src/include",
17
+                    "${workspaceRoot}"
18
+                ],
19
+                "limitSymbolsToIncludedHeaders": true,
20
+                "databaseFilename": ""
21
+            },
22
+            "intelliSenseMode": "clang-x64"
23
+        },
24
+        {
25
+            "name": "Linux",
26
+            "includePath": [
27
+                "${workspaceRoot}",
28
+                "/usr/include",
29
+                "/usr/local/include",
30
+                "src/include"
31
+            ],
32
+            "defines": [],
33
+            "browse": {
34
+                "path": [
35
+                    "/usr/include",
36
+                    "/usr/local/include",
37
+                    "src/include",
38
+                    "${workspaceRoot}"
39
+                ],
40
+                "limitSymbolsToIncludedHeaders": true,
41
+                "databaseFilename": ""
42
+            },
43
+            "intelliSenseMode": "clang-x64"
44
+        },
45
+        {
46
+            "name": "Win32",
47
+            "includePath": [
48
+                "${workspaceRoot}",
49
+                "E:/Visual Studio 2015/VC/include/*",
50
+                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um",
51
+                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt",
52
+                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared",
53
+                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt",
54
+                "src/include"
55
+            ],
56
+            "defines": [
57
+                "_DEBUG",
58
+                "UNICODE"
59
+            ],
60
+            "browse": {
61
+                "path": [
62
+                    "E:/Visual Studio 2015/VC/include/*",
63
+                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um",
64
+                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt",
65
+                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared",
66
+                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt",
67
+                    "src/include",
68
+                    "${workspaceRoot}"
69
+                ],
70
+                "limitSymbolsToIncludedHeaders": true,
71
+                "databaseFilename": ""
72
+            },
73
+            "intelliSenseMode": "msvc-x64"
74
+        }
75
+    ],
76
+    "version": 2
70 77
 }

+ 10
- 4
.vscode/launch.json View File

@@ -2,11 +2,17 @@
2 2
     "version": "0.2.0",
3 3
     "configurations": [
4 4
         {
5
-            "name": "Debug",
6 5
             "type": "gdb",
7
-            "request": "launch",
8
-            "target": "./bin/executable",
9
-            "cwd": "${workspaceRoot}"
6
+            "request": "attach",
7
+            "name": "Debug",
8
+            "preLaunchTask": "start",
9
+            "executable": "object/linked.o",
10
+            "gdbpath": "arm-none-eabi-gdb",
11
+            "target": "localhost:2345",
12
+            "remote": true,
13
+            "cwd": "${workspaceRoot}",
14
+            "autorun": [
15
+            ]
10 16
         }
11 17
     ]
12 18
 }

+ 115
- 1
.vscode/settings.json View File

@@ -41,6 +41,120 @@
41 41
         "xstring": "cpp",
42 42
         "xtree": "cpp",
43 43
         "xiosbase": "cpp",
44
-        "xfunctional": "cpp"
44
+        "xfunctional": "cpp",
45
+        "streambuf": "cpp",
46
+        "xlocmes": "cpp",
47
+        "memory": "cpp",
48
+        "xlocbuf": "cpp",
49
+        "atomic": "cpp",
50
+        "valarray": "cpp",
51
+        "locale": "cpp",
52
+        "thread": "cpp",
53
+        "xlocnum": "cpp",
54
+        "xloctime": "cpp",
55
+        "corecrt_io.h": "c",
56
+        "corecrt_wio.h": "c",
57
+        "ocidl.h": "c",
58
+        "wingdi.h": "c",
59
+        "m4a.h": "c",
60
+        "background.h": "c",
61
+        "sprites.h": "c",
62
+        "berry.h": "c",
63
+        "fieldmap.h": "c",
64
+        "flash_internal.h": "c",
65
+        "m4a_internal.h": "c",
66
+        "types.h": "c",
67
+        "sprite.h": "c",
68
+        "lcd.h": "c",
69
+        "objects.h": "c",
70
+        "map.h": "c",
71
+        "dns_core.h": "c",
72
+        "task.h": "c",
73
+        "xkeycheck.h": "c",
74
+        "pkmn_bank.h": "c",
75
+        "bios.h": "c",
76
+        "gba_video.h": "c",
77
+        "compression.h": "c",
78
+        "switch_bg.h": "c",
79
+        "flags.h": "c",
80
+        "battle_structs.h": "c",
81
+        "palette.h": "c",
82
+        "string.h": "c",
83
+        "callback.h": "c",
84
+        "gba_types.h": "c",
85
+        "text.h": "c",
86
+        "base.h": "c",
87
+        "oam_types.h": "c",
88
+        "debug.h": "c",
89
+        "common.h": "c",
90
+        "ole.h": "c",
91
+        "oleidl.h": "c",
92
+        "battle_state.h": "c",
93
+        "crtdbg.h": "c",
94
+        "useful-bped.h": "c",
95
+        "pokeagb.h": "c",
96
+        "graphics.h": "c",
97
+        "version.h": "c",
98
+        "core.h": "c",
99
+        "pokemon.h": "c",
100
+        "save.h": "c",
101
+        "battle.h": "c",
102
+        "overworld.h": "c",
103
+        "audio.h": "c",
104
+        "memory.h": "c",
105
+        "io.h": "c",
106
+        "battle_pick_message.h": "c",
107
+        "battle_abilities.h": "c",
108
+        "moves.h": "c",
109
+        "pkmn_bank_stats.h": "c",
110
+        "constants.h": "c",
111
+        "math.h": "c",
112
+        "objidl.h": "c",
113
+        "objidlbase.h": "c",
114
+        "winuser.h": "c",
115
+        "winnt.h": "c",
116
+        "internal.h": "c",
117
+        "item.h": "c",
118
+        "evolution.h": "c",
119
+        "move.h": "c",
120
+        "game_engine.h": "c",
121
+        "agile.h": "c",
122
+        "xtgmath.h": "c",
123
+        "stdbool.h": "c",
124
+        "stdint.h": "c",
125
+        "grass_bg.h": "c",
126
+        "fade.h": "c",
127
+        "block.h": "c",
128
+        "gba_keys.h": "c",
129
+        "data.h": "c",
130
+        "ability.h": "c",
131
+        "battle_common.h": "c",
132
+        "nb30.h": "c",
133
+        "trainer.h": "c",
134
+        "decoration.h": "c",
135
+        "link.h": "c",
136
+        "vcruntime_typeinfo.h": "c",
137
+        "msxml.h": "c",
138
+        "wmp.h": "c",
139
+        "minwindef.h": "c",
140
+        "corecrt.h": "c",
141
+        "vcruntime.h": "c",
142
+        "virtual_map.h": "c",
143
+        "wincrypt.h": "c",
144
+        "gba_compress.h": "c",
145
+        "windef.h": "c",
146
+        "wtypes.h": "c",
147
+        "effects.h": "c",
148
+        "npc.h": "c",
149
+        "global.h": "c",
150
+        "save_one.h": "c",
151
+        "type.h": "c",
152
+        "pkmn_types.h": "c",
153
+        "type_icons.h": "c",
154
+        "ppltasks.h": "c",
155
+        "stat.h": "c",
156
+        "pokedex.h": "c",
157
+        "config.h": "c",
158
+        "agb_debug.h": "c"
45 159
     }
46 160
 }

+ 17
- 10
.vscode/tasks.json View File

@@ -1,20 +1,27 @@
1 1
 {
2
-    "version": "0.1.0",
3
-    "command": "make",
4
-    "isShellCommand": true,
5
-    "args": [],
6
-    "showOutput": "always",
7
-    "echoCommand": true,
2
+    "version": "2.0.0",
3
+    "command": "C:/cygwin64/bin/bash",
4
+    "args": ["-lc", "make"],
8 5
     "suppressTaskName": true,
9 6
     "tasks": [
10 7
         {
11
-            "isBuildCommand": true,
8
+            "type": "shell",
9
+            "group": "build",
12 10
             "taskName": "build",
13
-            "args": ["-j4", "all"]
11
+            "args": [],
12
+            "problemMatcher": [],
13
+            "presentation": {
14
+                "reveal": "always",
15
+                "echo": true
16
+            }
14 17
         },
15 18
         {
16
-            "taskName": "clean",
17
-            "args": ["clean"]
19
+            "type": "shell",
20
+            "group": "none",
21
+            "taskName": "start",
22
+            "command": "~/sots/source_of_the_sovereign/debug.sh",
23
+            "args":[],
24
+            "problemMatcher": []
18 25
         }
19 26
     ]
20 27
 }

+ 1
- 1
battle_engine

@@ -1 +1 @@
1
-Subproject commit 781351a52a4f4b118ddf09c9b27f4f8ffdf4f520
1
+Subproject commit a0eee6f4ba5baee875f4f283c1f2b093d08b0564

+ 1
- 0
bpre.sym View File

@@ -81,6 +81,7 @@ execute_battle_script = 0x0801BC24;
81 81
 dp_01_prepare_buffer = 0x0800D8B1;
82 82
 wram_decompress = 0x081E3B70|1;
83 83
 battle_script_push = 0x08017544|1;
84
+objects = 0x0202063C;
84 85
 
85 86
 fade_screen = 0x08070589;
86 87
 fade_update = 0x080704D1;

+ 2
- 2
data/pkmn_tables/pokemon_stats.S View File

@@ -1,7 +1,7 @@
1 1
 .text
2 2
 .align 2
3
-.global pokemon_stats
4
-pokemon_stats:
3
+.global pokemon_base_stats
4
+pokemon_base_stats:
5 5
 
6 6
 .byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7 7
 .hword 0, 0

+ 7
- 0
debug.sh View File

@@ -0,0 +1,7 @@
1
+EMULATOR=E:/OneDrive/Hacking/Romhacking/Emulator/mGBA-0.5.2-2016-12-31-win32/mgba.exe
2
+
3
+# Start mGBA in the background
4
+pwd
5
+cygstart $EMULATOR -g sots/source_of_the_sovereign/build/pkmn_sots.gba
6
+sleep 4
7
+exit

+ 2
- 8
main.asm View File

@@ -42,7 +42,7 @@
42 42
 .include "patches/pokemon_data/pokemon_habitats.asm"
43 43
 .include "patches/pokemon_data/pokemon_evolution.asm"
44 44
 
45
-//.include "patches/overworlds/pkm_wild.asm"
45
+.include "patches/overworlds/pkm_wild.asm"
46 46
 //.include "patches/dns/core.asm"
47 47
 
48 48
 .include "patches/overworlds/overworld.asm"
@@ -59,17 +59,11 @@
59 59
 
60 60
 .include "patches/game_engine/quick_hacks.asm"
61 61
 
62
-.include "battle_engine/patches/menutest.s"
62
+//.include "battle_engine/patches/battle_hooks.s"
63 63
 
64 64
 .org 0x0815F9B8
65 65
     .word 0x08069ED5 // fix nop1 for now...
66 66
 
67
-.org 0x083522F4
68
-    //.word mapheader_alabastia
69
-
70
-.org 0x0834ECC0
71
-    //.word mapfooter_alabastia
72
-
73 67
 .org 0x09000000
74 68
 .importobj "object/linked.o"
75 69
 .close

+ 7
- 4
makefile View File

@@ -12,9 +12,13 @@ STRAGB	:= string2agb
12 12
 
13 13
 export PATH := $(realpath ../tools):$(PATH)
14 14
 
15
+PAGB_MAIN := battle_engine/deps/pokeagb
16
+PAGB_INCLUDE := $(PAGB_MAIN)/build/include/
17
+PAGB_LINK := $(PAGB_MAIN)/build/linker/BPRE.ld
18
+
15 19
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
16 20
 ASFLAGS   := -mthumb
17
-CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -O0 -std=c99 -Wall -Wextra -Wunreachable-code -Isrc/include $(DEFINES)
21
+CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -Og -std=c11 -Wall -Wextra -Wunreachable-code -I$(PAGB_INCLUDE) -Isrc/include -fdiagnostics-color $(DEFINES)
18 22
 GRITFLAGS := -ftc -fa
19 23
 LDFLAGS   := -z muldefs
20 24
 BLDPATH   := object
@@ -79,14 +83,13 @@ rom: main.asm $(MAIN_OBJ)
79 83
 		sed -e '{s/^/0x/g};{/.*\sA\s.*/d};{s/\sT\s/ /g}' > $(OUTPATH)/__symbols.sym
80 84
 	@echo "*** SUCCESSFULLY BUILT PROJECT ***"
81 85
 	
82
-$(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $(STRING_OBJ) $(B_ENGINE)#$(DYN_OVER) 
86
+$(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $(STRING_OBJ)#$(B_ENGINE)
83 87
 	$(MAKE) -f assets.makefile
84 88
 	$(LD) $(LDFLAGS) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group $^ --end-group
85
-	$(LD) $(LDFLAGS) -T linker.ld -T bpre.sym -o object/debug.o object/linked.o
86 89
 
87 90
 .PHONY: $(B_ENGINE)
88 91
 $(B_ENGINE):
89
-	$(MAKE) -C $(dir $@)/.. build/linked.o
92
+	$(MAKE) -C battle_engine build/linked.o
90 93
 
91 94
 .PHONY: clean
92 95
 clean:

+ 58
- 58
patches/pokemon_data/pokemon_stats.asm View File

@@ -1,174 +1,174 @@
1 1
 .org 0x080001BC
2
-.word pokemon_stats
2
+.word pokemon_base_stats
3 3
 
4 4
 .org 0x08012754
5
-.word pokemon_stats
5
+.word pokemon_base_stats
6 6
 
7 7
 .org 0x08012FA8
8
-.word pokemon_stats
8
+.word pokemon_base_stats
9 9
 
10 10
 .org 0x08013230
11
-.word pokemon_stats
11
+.word pokemon_base_stats
12 12
 
13 13
 .org 0x08016A60
14
-.word pokemon_stats
14
+.word pokemon_base_stats
15 15
 
16 16
 .org 0x0801F008
17
-.word pokemon_stats
17
+.word pokemon_base_stats
18 18
 
19 19
 .org 0x08021C28
20
-.word pokemon_stats
20
+.word pokemon_base_stats
21 21
 
22 22
 .org 0x080240B4
23
-.word pokemon_stats
23
+.word pokemon_base_stats
24 24
 
25 25
 .org 0x0802BABC
26
-.word pokemon_stats
26
+.word pokemon_base_stats
27 27
 
28 28
 .org 0x0802CE90
29
-.word pokemon_stats
29
+.word pokemon_base_stats
30 30
 
31 31
 .org 0x0802D53C
32
-.word pokemon_stats
32
+.word pokemon_base_stats
33 33
 
34 34
 .org 0x0802FFBC
35
-.word pokemon_stats
35
+.word pokemon_base_stats
36 36
 
37 37
 .org 0x080300E8
38
-.word pokemon_stats
38
+.word pokemon_base_stats
39 39
 
40 40
 .org 0x080301F8
41
-.word pokemon_stats
41
+.word pokemon_base_stats
42 42
 
43 43
 .org 0x08039558
44
-.word pokemon_stats
44
+.word pokemon_base_stats
45 45
 
46 46
 .org 0x080399BC
47
-.word pokemon_stats
47
+.word pokemon_base_stats
48 48
 
49 49
 .org 0x08039A68
50
-.word pokemon_stats
50
+.word pokemon_base_stats
51 51
 
52 52
 .org 0x08039FE8
53
-.word pokemon_stats
53
+.word pokemon_base_stats
54 54
 
55 55
 .org 0x0803DCC4
56
-.word pokemon_stats
56
+.word pokemon_base_stats
57 57
 
58 58
 .org 0x0803DD94
59
-.word pokemon_stats
59
+.word pokemon_base_stats
60 60
 
61 61
 .org 0x0803E734
62
-.word pokemon_stats
62
+.word pokemon_base_stats
63 63
 
64 64
 .org 0x0803E82C
65
-.word pokemon_stats
65
+.word pokemon_base_stats
66 66
 
67 67
 .org 0x0803E898
68
-.word pokemon_stats
68
+.word pokemon_base_stats
69 69
 
70 70
 .org 0x0803F780
71
-.word pokemon_stats
71
+.word pokemon_base_stats
72 72
 
73 73
 .org 0x0803F7C8
74
-.word pokemon_stats
74
+.word pokemon_base_stats
75 75
 
76 76
 .org 0x08040D58
77
-.word pokemon_stats
77
+.word pokemon_base_stats
78 78
 
79 79
 .org 0x08040D78
80
-.word pokemon_stats
80
+.word pokemon_base_stats
81 81
 
82 82
 .org 0x080413B8
83
-.word pokemon_stats
83
+.word pokemon_base_stats
84 84
 
85 85
 .org 0x080419A0
86
-.word pokemon_stats
86
+.word pokemon_base_stats
87 87
 
88 88
 .org 0x08043914
89
-.word pokemon_stats
89
+.word pokemon_base_stats
90 90
 
91 91
 .org 0x08043928
92
-.word pokemon_stats
92
+.word pokemon_base_stats
93 93
 
94 94
 .org 0x0804393C
95
-.word pokemon_stats
95
+.word pokemon_base_stats
96 96
 
97 97
 .org 0x08043950
98
-.word pokemon_stats
98
+.word pokemon_base_stats
99 99
 
100 100
 .org 0x08043964
101
-.word pokemon_stats
101
+.word pokemon_base_stats
102 102
 
103 103
 .org 0x080439A4
104
-.word pokemon_stats
104
+.word pokemon_base_stats
105 105
 
106 106
 .org 0x08043B8C
107
-.word pokemon_stats
107
+.word pokemon_base_stats
108 108
 
109 109
 .org 0x08043C10
110
-.word pokemon_stats
110
+.word pokemon_base_stats
111 111
 
112 112
 .org 0x08044208
113
-.word pokemon_stats
113
+.word pokemon_base_stats
114 114
 
115 115
 .org 0x08044458
116
-.word pokemon_stats
116
+.word pokemon_base_stats
117 117
 
118 118
 .org 0x08046600
119
-.word pokemon_stats
119
+.word pokemon_base_stats
120 120
 
121 121
 .org 0x08049F4C
122
-.word pokemon_stats
122
+.word pokemon_base_stats
123 123
 
124 124
 .org 0x0804FC88
125
-.word pokemon_stats
125
+.word pokemon_base_stats
126 126
 
127 127
 .org 0x080C84E0
128
-.word pokemon_stats
128
+.word pokemon_base_stats
129 129
 
130 130
 .org 0x080CA850
131
-.word pokemon_stats
131
+.word pokemon_base_stats
132 132
 
133 133
 .org 0x080E7F14
134
-.word pokemon_stats
134
+.word pokemon_base_stats
135 135
 
136 136
 .org 0x080E8040
137
-.word pokemon_stats
137
+.word pokemon_base_stats
138 138
 
139 139
 .org 0x080E8150
140
-.word pokemon_stats
140
+.word pokemon_base_stats
141 141
 
142 142
 .org 0x08103AC4
143
-.word pokemon_stats
143
+.word pokemon_base_stats
144 144
 
145 145
 .org 0x081066B4
146
-.word pokemon_stats
146
+.word pokemon_base_stats
147 147
 
148 148
 .org 0x0811AE48
149
-.word pokemon_stats
149
+.word pokemon_base_stats
150 150
 
151 151
 .org 0x081361F8
152
-.word pokemon_stats
152
+.word pokemon_base_stats
153 153
 
154 154
 .org 0x08136794
155
-.word pokemon_stats
155
+.word pokemon_base_stats
156 156
 
157 157
 .org 0x0813AAE0
158
-.word pokemon_stats
158
+.word pokemon_base_stats
159 159
 
160 160
 .org 0x081569EC
161
-.word pokemon_stats
161
+.word pokemon_base_stats
162 162
 
163 163
 .org 0x08156B18
164
-.word pokemon_stats
164
+.word pokemon_base_stats
165 165
 
166 166
 .org 0x08156C28
167
-.word pokemon_stats
167
+.word pokemon_base_stats
168 168
 
169 169
 //EGG HATCHING TIME
170 170
 .org 0x08046204
171
-.word pokemon_stats + 0x11
171
+.word pokemon_base_stats + 0x11
172 172
 
173 173
 .org 0x080462A8
174
-.word pokemon_stats + 0x11
174
+.word pokemon_base_stats + 0x11

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 6b628d4d5ffc83d20296c181681feb35c93857c3
1
+Subproject commit 81f4381ae57d57a70520296de8a09a469b5b1f5c

+ 2
- 2
src/evolution/evolution_methods.c View File

@@ -291,8 +291,8 @@ struct evo_result evolve_by_type(struct evo_call_arguments arguments)
291 291
         u16 current_species = pokemon_get_attribute(&(pokemon_party_player[i]), ATTR_SPECIES, NULL);
292 292
         if (current_species == 0)
293 293
             continue;
294
-        u8 type_one = pokemon_stats[current_species].type_one;
295
-        u8 type_two = pokemon_stats[current_species].type_two;
294
+        u8 type_one = pokemon_base_stats[current_species].type_one;
295
+        u8 type_two = pokemon_base_stats[current_species].type_two;
296 296
         dprintf("Found type: %d/%d\n", type_one, type_two);
297 297
         if (type_one == type_required || type_two == type_required)
298 298
         {

+ 1
- 1
src/include/pokemon.h View File

@@ -51,6 +51,6 @@ struct pokemon_data
51 51
     u16 padding;
52 52
 };
53 53
 
54
-extern struct pokemon_data pokemon_stats[1300];
54
+extern struct pokemon_data pokemon_base_stats[1300];
55 55
 
56 56
 #endif /* POKE_INDICES_H */

+ 6
- 0
src/overworld/dynamic_overworld.c View File

@@ -0,0 +1,6 @@
1
+#include <pokeagb/pokeagb.h>
2
+
3
+void npc_spawn()
4
+{
5
+    //placeholder for now
6
+}

+ 2
- 1
src/savefile/flag_manipulation.c View File

@@ -34,6 +34,7 @@
34 34
 #include <stdbool.h>
35 35
 #include <game_engine.h>
36 36
 #include <battle_structs.h>
37
+#include <config.h>
37 38
 
38 39
 u16 trainerflag_fix_difficulty(u16 flag_id);
39 40
 
@@ -48,7 +49,7 @@ u16 load_hword(void* ptr)
48 49
 u16 trainerflag_fix_difficulty(u16 flag_id)
49 50
 {
50 51
     u16 new_flag = ((flag_id - TRAINER_FLAG_SPACE_START + 1) / 3) + TRAINER_FLAG_SPACE_START;
51
-    dprintf("trainerflag_fix_difficulty;; flag_id: 0x%x, reduced: 0x%x\n", flag_id, new_flag);
52
+    dprintf("trainerflag_fix_difficulty;; flag_id: 0x%x, reduced: 0x%x, status: %s\n", flag_id, new_flag, flag_check(new_flag) ? "true" : "false");
52 53
     return new_flag;
53 54
 }
54 55