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

Consistent unused content references, and predef and special label names #459

Closed
wants to merge 13 commits into from

Conversation

xCrystal
Copy link
Member

@xCrystal xCrystal commented Jan 2, 2018

Ready to merge. However, it's going to conflict somewhere with #456, so feel free to merge that one first and then I could look at merging and resolving conflicts. There shouldn't be too many though.

Addresses issue #453. Gets rid of the mobile string, consolidates unused content with Unreferenced_ or Stubbed_ label prefixes, or with an ; unused comment. These are mostly consistent and should be easy to locate with a simple search, even though words like unused and dummy are still scattered in many labels and comments of unused content, particularly for constants, text and scripts.

As for predef and specials, I added Predef_ and Special_ and a prefix in function labels (for consistency with most current specials), using also the word Dummy or Unused when appropriate. Unecessary bank 0 specials were not renamed and instead commented with ; bank 0.

Also took out leftover unused data from main.asm and changed some UnknownText_xxx that are unreferenced to UnusedText_xxx.

@xCrystal
Copy link
Member Author

xCrystal commented Jan 2, 2018

I'm done with this PR

Unknown_e00ed: ; e00ed (38:40ed)
; Graphics for an unused Game Corner
; game were meant to be here.
Ret_e00ed: ; e00ed (38:40ed)
Copy link
Contributor

@roukaour roukaour Jan 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Stubbed_DummyGameAskPlay?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the name of Unknown_e00ed could reflect that it was some 4-tile image for the dummy game. (Most likely a cursor, given that SPRITE_ANIM_INDEX_DUMMY_GAME uses 4 tiles at $00 just like other cursors.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left empty functions with generic names, and only used meaningful names when there is actual code (even if unreferenced or dummied out after a ret) to back it up. If this one's so evident though, I guess it could be changed to something to reflect what it was supposed to be there, but I feel it's enough if reflected in a comment.

@@ -70,7 +70,7 @@ Copycat:
.Default_Merge_3a:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
special MapCallbackSprites_LoadUsedSpritesGFX
special Special_MapCallbackSprites_LoadUsedSpritesGFX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this have a shorter name, like Special_LoadUsedSpritesGFX?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, will do it tomorrow along with anything else that might come up. Assuming #456 gets merged first, I'll also try to do the merge myself

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -92,7 +92,7 @@ AIChooseMove: ; 440ce

push bc
ld d, BANK(TrainerClassAttributes)
predef FlagPredef
predef Predef_Flag
Copy link
Contributor

@roukaour roukaour Jan 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Predef_FlagAction would be more clear, and matches FlagAction and EventFlagAction.

@@ -1,5 +1,5 @@
Predef_FlagAction: ; 4d7c1
; Perform action b on flag c in flag array hl.
Predef_SmallFarFlagAction: ; 4d7c1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not always far, only when d = 1.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know... it's kinda like the FarCopyBytes kinda functions. You can use them to copy a byte from the current bank. I know, there's always a bankswitch in those regardless, but you are still forced to set d to the bank argument here as well (even if it's just setting it to 0 to avoid bankswitch).
I mean, I don't really care. I can rename it again if wanted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, it's fine. Come to think of it, FlagAction does not support bank switching, so "SmallFar" accurately describes this one's differences.

I would, however, either rename the file to predef_smallfarflagaction.asm (ugly) or find a better place for it than engine/routines/lowercaselabelname.asm (which was never meant to be permanent anyway).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the file should be renamed (along with many others), but I don't think it's a good idea to do more in this PR until the current open ones are merged. I know it's just a single file that won't cause any conflict, but it would probably become renamed/moved again when that stuff is dealt with in another PR anyway.

@roukaour
Copy link
Contributor

roukaour commented Jan 9, 2018

The conflict with #456 is very minor: my copy of data/sprite_anims/framesets.asm subsumes your changes; and there's a one-line manual merge needed in engine/item_effects.asm.

@xCrystal
Copy link
Member Author

xCrystal commented Jan 9, 2018

Good to hear, feel free to merge this PR into your repo, as I'm not going to push any more commits to it.

As far as I know, #386 is obsolete, #446 and #448 aren't settled yet, #457 is not a problem, and #452 isn't finished yet. If #460 is finished too, it could be merged as well to get a head start fixing potential conflicts.

@roukaour
Copy link
Contributor

roukaour commented Jan 12, 2018

Yeah, #456, #457, #459, and #460 can be merged, and #386 can be closed.

roukaour added a commit to Rangi42/pokecrystal that referenced this pull request Jan 15, 2018
…olve PR pret#459)

# Conflicts:
#	data/items/descriptions.asm
#	data/sprite_anims/framesets.asm
#	engine/crystal_colors.asm
#	engine/events/kurt.asm
#	engine/events/special.asm
#	engine/events/std_scripts.asm
#	engine/events_3.asm
#	engine/item_effects.asm
#	engine/namingscreen.asm
#	engine/scripting.asm
#	engine/stats_screen.asm
#	engine/trade_animation.asm
#	home/audio.asm
#	main.asm
#	maps/BattleTower1F.asm
#	maps/BattleTowerBattleRoom.asm
#	maps/BurnedTowerB1F.asm
#	maps/ElmsLab.asm
#	maps/GoldenrodDeptStore5F.asm
#	maps/GoldenrodUnderground.asm
#	maps/HallOfFame.asm
#	maps/MahoganyTown.asm
#	maps/ManiasHouse.asm
#	maps/MobileBattleRoom.asm
#	maps/MobileTradeRoomMobile.asm
#	maps/RadioTower2F.asm
#	maps/Route35NationalParkGate.asm
#	maps/Route36NationalParkGate.asm
#	maps/Route39Farmhouse.asm
#	tilesets/palette_maps.asm
@xCrystal xCrystal closed this Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants