Skip to content

Commit

Permalink
removed include and struct member from migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
cawtds committed Jun 1, 2024
1 parent db19352 commit a2ca59a
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions migration_scripts/battle_anim_moves_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def IsCommaMissing(line: str):

moves_info_lines.append(line)

moves_info_lines.insert(1, '#include "battle_anim_scripts.h"\n')

output_file_mi = open('./src/data/moves_info.h', 'w')
output_file_mi.writelines(moves_info_lines)
output_file_mi.close()
Expand All @@ -63,29 +61,3 @@ def IsCommaMissing(line: str):
b_anim_scripts_s = open('./data/battle_anim_scripts.s', 'w')
b_anim_scripts_s.write(lines)
b_anim_scripts_s.close()


pokemon_h = open('./include/pokemon.h', 'r')
lines = pokemon_h.readlines()
pokemon_h.close()

pokemon_h_lines = []
isMoveInfo = False
bracketCount = 0
for line in lines:
if re.search(r'struct MoveInfo\n', line):
isMoveInfo = True

if isMoveInfo and re.search(r'\{', line):
bracketCount = bracketCount + 1

if isMoveInfo and re.search(r'\}', line):
if (bracketCount == 1):
pokemon_h_lines.append(4 * ' ' + 'const u8 *battleAnimScript;\n')
isMoveInfo = False
bracketCount = bracketCount - 1
pokemon_h_lines.append(line)

pokemon_h = open('./include/pokemon.h', 'w')
pokemon_h.writelines(pokemon_h_lines)
pokemon_h.close()

0 comments on commit a2ca59a

Please sign in to comment.