Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sectionful refactor #631

Closed
wants to merge 74 commits into from
Closed

Sectionful refactor #631

wants to merge 74 commits into from

Commits on May 25, 2019

  1. Initial section split

    This splits all of the sections into completely self-contained parts.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    d3b41cd View commit details
    Browse the repository at this point in the history
  2. Split phone callees

    This section was bound together by a single reference from
    TiffanyFamilyMembers to the end of the bank. Probably caused by the
    translators.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    181b4c5 View commit details
    Browse the repository at this point in the history
  3. Split BlankScreen

    It isn't related to the player object at all.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    14cae16 View commit details
    Browse the repository at this point in the history
  4. Merge objects.asm

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    1b4777e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7001436 View commit details
    Browse the repository at this point in the history
  6. Further split bank $01

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    0857f70 View commit details
    Browse the repository at this point in the history
  7. Further split bank $03

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    d014052 View commit details
    Browse the repository at this point in the history
  8. Further split bank $04

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    e17aba2 View commit details
    Browse the repository at this point in the history
  9. Further split bank $09

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    7e88727 View commit details
    Browse the repository at this point in the history
  10. Further split bank $0e

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    01f9150 View commit details
    Browse the repository at this point in the history
  11. Further split bank $14

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    0bc1e17 View commit details
    Browse the repository at this point in the history
  12. Further split bank $22

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    ae1e8bb View commit details
    Browse the repository at this point in the history
  13. Forther split bank $23

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    979cca5 View commit details
    Browse the repository at this point in the history
  14. Further split bank $38

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    35fba04 View commit details
    Browse the repository at this point in the history
  15. Split some questionable things

    Want to ask people what the best course of action for these would be.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    2b8bb5a View commit details
    Browse the repository at this point in the history
  16. Final splitting pass

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    c29a263 View commit details
    Browse the repository at this point in the history
  17. Reorganize INCLUDEs to reduce the amount of top-level files

    This will make the `.o` file splitting easier later down the line.
    
    Some more splitting is required to finish making main.asm INCLUDE-only, however.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    973e617 View commit details
    Browse the repository at this point in the history
  18. Restructure the battle animation core file

    Moved the core part of anim_commands out to core, and included the
    entire battle anim engine there.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    4e77dd3 View commit details
    Browse the repository at this point in the history
  19. Giving up on start menu

    This is a rather small and inconsequential part of the (spaghetti)
    codebase, and I want to move on to the rest of this mess.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    f2c5503 View commit details
    Browse the repository at this point in the history
  20. Split intertwined map scripts

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    87552dd View commit details
    Browse the repository at this point in the history
  21. "split" battle tower map scripts

    These can't really be split. The only reason they're being made separate
    sections is to maintain consistency with the rest of the map scripts.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    28bf848 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    5072712 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    af83b94 View commit details
    Browse the repository at this point in the history
  24. Add constants for BANK[] statements

    This will help people move them around, if need be.
    This should be removed as soon as rgbds supports this.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    c44dc76 View commit details
    Browse the repository at this point in the history
  25. Do the obvious reorganizations

    Things like split some "generic" files into multiple specific files, or
    some big files into multiple, or join some sections.
    Thing is, splitting the sections like this gives us great insight into
    what goes where, and what is or isn't related.
    This commit doesn't yet throw away strict ROM order, however.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    e57ed43 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    21a6233 View commit details
    Browse the repository at this point in the history
  27. Split out KrisBackpic

    ChrisBackpic is split away as well, and it makes sense they're somewhere
    together.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    8707481 View commit details
    Browse the repository at this point in the history
  28. Make engine/pokemon/evolve.asm the main file

    Data is always secondary, unless independent somehow.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    4fafcc9 View commit details
    Browse the repository at this point in the history
  29. Split everything into separate .o files

    This commit is the start of what I call "the `.o` split".
    Sadly, this split has made the entire build system _magnitudes_ slower.
    As such, I will try to make it less slow, and hopefully improve the
    incremental build times, and later the build time overall.
    
    But, if it doesn't work out, this can always be reverted.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    0072977 View commit details
    Browse the repository at this point in the history
  30. Don't export every single label

    Exported all necessary cross-file labels, and unexported the unnecessary
    exports. This makes the linker much, much faster.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    ba6c472 View commit details
    Browse the repository at this point in the history
  31. Cache scan_includes output

    This makes incremental builds really, really fast!
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    b57cd1a View commit details
    Browse the repository at this point in the history
  32. Add travis support for checking unused globals

    This will make sure only necessary symbols are ever exported, except for
    everything in the ram sections, of course, which doesn't make sense to
    not be exported.
    
    engine/predef.asm and engine/events/specials.asm are ignored because the
    arrays generate a bunch of symbols that are unused, but we can't really
    not export some of them since we use a macro.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    63f6649 View commit details
    Browse the repository at this point in the history
  33. First draft of optimizing includes

    I'm not entirely sure where I'm going with this yet.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    1000418 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    d5b3b79 View commit details
    Browse the repository at this point in the history
  35. Create constants/maps_common.inc

    This noticeably increases rebuild times by 10 seconds and causes every
    single map to be rebuilt when certain constants change, even if they're
    unnecessary, but such is life.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    c6abcec View commit details
    Browse the repository at this point in the history
  36. Rewrite Makefile to support i18n

    This new makefile introduces the following features:
    - A build/ directory
    - A version/ directory where all the differences between each version
    will be kept
    And this while hopefully keeping all features we used to have.
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    af31496 View commit details
    Browse the repository at this point in the history
  37. Implement makefile improvements

    As suggested by @Rangi42:
    - Add `tidy` target
    - Additional comment for the `else` case in the main Makefile
    - Add `version/crystal.mk` for consistency
    - Use `.mkdir` as file-creation marker
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    8695545 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    e4126c6 View commit details
    Browse the repository at this point in the history
  39. Misc changes

    - Moved main.asm to gfx/misc.asm
    - Created constant for the two pics sections
    - Moved the stadium bins into version/
    - Move some graphics rules into gfx/gfx.mk
    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    fcfb431 View commit details
    Browse the repository at this point in the history
  40. Make ram directory

    mid-kid committed May 25, 2019
    Configuration menu
    Copy the full SHA
    17b07a7 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2019

  1. Configuration menu
    Copy the full SHA
    3840b87 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f2d8f0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d3948e7 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2019

  1. Configuration menu
    Copy the full SHA
    7355ec4 View commit details
    Browse the repository at this point in the history
  2. Remove top-level ram.asm

    mid-kid committed May 27, 2019
    Configuration menu
    Copy the full SHA
    709087c View commit details
    Browse the repository at this point in the history
  3. Update travis stuff

    With the new Makefile, some changes are required...
    mid-kid committed May 27, 2019
    Configuration menu
    Copy the full SHA
    51cfa80 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3915519 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7583b7f View commit details
    Browse the repository at this point in the history

Commits on May 28, 2019

  1. Fix build using make 3.81

    I wonder when we'll just start forcing Mac users to switch to a more
    recent version of GNU Make. This version is only 5 years younger than
    the ROM we're reversing...
    mid-kid committed May 28, 2019
    Configuration menu
    Copy the full SHA
    f15ad02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    334e46f View commit details
    Browse the repository at this point in the history
  3. Fix build for Mac OSX

    mid-kid committed May 28, 2019
    Configuration menu
    Copy the full SHA
    a8ab122 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2a27be0 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2019

  1. Include some constants inside of maps

    floating_constants.inc was moved out of maps_common.inc because it's not
    something that is necessary for new maps - it's supposed to be the
    exception, not the norm.
    
    Since there's only four maps that use BattleTowerAction, and the
    battle_tower_constants.inc aren't otherwise used anywhere, they're now
    only included where required.
    mid-kid committed May 30, 2019
    Configuration menu
    Copy the full SHA
    3b5c710 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2019

  1. Forgot to fix TODOs after the fact...

    TODO comments are the worst thing invented by mankind, yet I love using
    them for some reason...
    mid-kid committed Jun 1, 2019
    Configuration menu
    Copy the full SHA
    d35b0a2 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2019

  1. Configuration menu
    Copy the full SHA
    bd4abff View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2019

  1. Configuration menu
    Copy the full SHA
    0f24d29 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2020

  1. Configuration menu
    Copy the full SHA
    e16ad2f View commit details
    Browse the repository at this point in the history
  2. Remove ASCII-related bank constants

    An RGBDS update has made it possible to remove these, by adding proper
    multicharmap support.
    mid-kid committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    f3d3376 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2020

  1. Sort includes

    mid-kid committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    1cc46f3 View commit details
    Browse the repository at this point in the history
  2. Export vram labels

    mid-kid committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    ccb0505 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2020

  1. Split home/

    mid-kid committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    a3d6968 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary includes

    mid-kid committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    6eb368a View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2020

  1. Document Makefile

    Add documentation for the usage of the new makefile, as I'm sure it'll
    confuse some people.
    mid-kid committed Feb 24, 2020
    Configuration menu
    Copy the full SHA
    2761e5a View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2020

  1. Configuration menu
    Copy the full SHA
    d51fd40 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2020

  1. Configuration menu
    Copy the full SHA
    7e5aa33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5bd33d5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    307e1c7 View commit details
    Browse the repository at this point in the history
  4. Fix Makefile

    - Copy the files when running `make` without arguments
    - Clean topdir files when running `make tidy`
    - Remove `-march=native` as this doesn't work with `clang`
    mid-kid committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    ca456b5 View commit details
    Browse the repository at this point in the history
  5. Remove .asm suffix from every section name

    They're arbitrary names, and the .asm part is redundant
    mid-kid committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    75e1424 View commit details
    Browse the repository at this point in the history
  6. Move charmap.inc to constants/charmap.inc

    🕯️
    mid-kid committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    1a910fd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cedf137 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2020

  1. Include data/items/marts in engine/items/mart

    Apparently there's a very sneaky non-banked reference between these,
    that will cause the game to crash if these are not in the same bank.
    mid-kid committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    6cc3ca3 View commit details
    Browse the repository at this point in the history
  2. Split pokedex_3 further

    Unneccessarily "generic" file, also didn't make sense now pokedex_2 is
    gone.
    mid-kid committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    064c721 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2020

  1. Move tiffany's family out

    These strings are right at the end of generic_callee, but for
    convenience I'll move them out to a separate file, for now at least.
    mid-kid committed Mar 1, 2020
    Configuration menu
    Copy the full SHA
    786c3c0 View commit details
    Browse the repository at this point in the history