-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from lhearachel/party-gauge
Document party_gauge.c
- Loading branch information
Showing
284 changed files
with
4,813 additions
and
4,593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#ifndef POKEPLATINUM_BATTLE_PARTY_GAUGE_H | ||
#define POKEPLATINUM_BATTLE_PARTY_GAUGE_H | ||
|
||
#include "struct_decls/struct_02002F38_decl.h" | ||
#include "struct_decls/struct_0200C6E4_decl.h" | ||
#include "struct_decls/struct_0200C704_decl.h" | ||
#include "overlay016/struct_ov16_0226D160_decl.h" | ||
|
||
enum PartyGaugeSide { | ||
PARTY_GAUGE_OURS, | ||
PARTY_GAUGE_THEIRS, | ||
}; | ||
|
||
enum ShowPartyGaugeType { | ||
SHOW_PARTY_GAUGE_BATTLE_START, | ||
SHOW_PARTY_GAUGE_MID_BATTLE, | ||
}; | ||
|
||
enum HidePartyGaugeType { | ||
HIDE_PARTY_GAUGE_BATTLE_START, | ||
HIDE_PARTY_GAUGE_MID_BATTLE, | ||
}; | ||
|
||
enum PartyGaugePosition { | ||
PARTY_GAUGE_POSITION_HIGH, | ||
PARTY_GAUGE_POSITION_MIDDLE, | ||
PARTY_GAUGE_POSITION_LOW, | ||
}; | ||
|
||
enum HideArrowType { | ||
HIDE_ARROW_FADE_AND_SCROLL, | ||
HIDE_ARROW_FADE_IN_PLACE, | ||
}; | ||
|
||
/** | ||
* @brief Load the graphics resources needed for the Party Gauge into memory. | ||
* | ||
* @param renderer | ||
* @param gfxHandler | ||
* @param palette | ||
*/ | ||
void PartyGauge_LoadGraphics(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, PaletteData *palette); | ||
|
||
/** | ||
* @brief Free the graphics resources needed for the Party Gauge from memory. | ||
* | ||
* @param gfxHandler | ||
*/ | ||
void PartyGauge_FreeGraphics(SpriteGfxHandler *gfxHandler); | ||
|
||
/** | ||
* @brief Show the Party Gauge. | ||
* | ||
* @param ballStatus The status of each battler's, represented as a Pokeball with a particular | ||
* masking filter. Plain Pokeballs represent healthy battlers, gray represent | ||
* fainted, darkened represent those afflicted with a status condition. For | ||
* possible values, see enum PartyGaugeBallStatus. | ||
* | ||
* @param side The side of the battle for which the gauge should be displayed. | ||
* | ||
* @param showType How the gauge should be displayed, whether at the start of a battle (a slow | ||
* inward scroll) or mid-battle after a KO (a faster inward scroll). | ||
* | ||
* @param pos Vertical position of the gauge; only applicable for double battles, so that | ||
* the gauge does not overlap the HP bar. | ||
* @param renderer | ||
* @param gfxHandler | ||
* @return Pointer to the constructed PartyGauge struct, for tracking its progress | ||
* and eventually hiding it. | ||
*/ | ||
PartyGauge* PartyGauge_Show(u8 ballStatus[], enum PartyGaugeSide side, enum ShowPartyGaugeType showType, enum PartyGaugePosition pos, SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler); | ||
|
||
/** | ||
* @brief Check if the Party Gauge has finished the inward scrolling animation. | ||
* | ||
* @param gauge | ||
* @return TRUE if the Party Gauge has finished its animation, else FALSE. | ||
*/ | ||
BOOL PartyGauge_ShowIsDone(PartyGauge *gauge); | ||
|
||
/** | ||
* @brief Hide the Party Gauge. | ||
* | ||
* @param gauge Gauge to be hidden. | ||
* @param hideArrowType Method by which the arrow element should be hidden. | ||
* @param hideGaugeType Method by which the gauge Pokeballs should be hidden. | ||
*/ | ||
void PartyGauge_Hide(PartyGauge *gauge, enum HideArrowType hideArrowType, enum HidePartyGaugeType hideGaugeType); | ||
|
||
/** | ||
* @brief Check if the Party Gauge has finished the outward vanishing animation. | ||
* | ||
* @param gauge | ||
* @return TRUE if the Party Gauge has finished its animation, else FALSE. | ||
*/ | ||
BOOL PartyGauge_HideIsDone(PartyGauge *gauge); | ||
|
||
/** | ||
* @brief Free the Party Gauge and its resources back to the heap. | ||
* | ||
* @param gauge | ||
*/ | ||
void PartyGauge_Free(PartyGauge *gauge); | ||
|
||
#endif // POKEPLATINUM_BATTLE_PARTY_GAUGE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#ifndef POKEPLATINUM_CONSTANTS_PALETTE_H | ||
#define POKEPLATINUM_CONSTANTS_PALETTE_H | ||
|
||
enum PaletteBufferId { | ||
PLTTBUF_MAIN_BG = 0, | ||
PLTTBUF_SUB_BG, | ||
PLTTBUF_MAIN_OBJ, | ||
PLTTBUF_SUB_OBJ, | ||
PLTTBUF_EX_BEGIN, | ||
|
||
PLTTBUF_MAIN_EX_BG_0 = PLTTBUF_EX_BEGIN, | ||
PLTTBUF_MAIN_EX_BG_1, | ||
PLTTBUF_MAIN_EX_BG_2, | ||
PLTTBUF_MAIN_EX_BG_3, | ||
PLTTBUF_SUB_EX_BG_0, | ||
PLTTBUF_SUB_EX_BG_1, | ||
PLTTBUF_SUB_EX_BG_2, | ||
PLTTBUF_SUB_EX_BG_3, | ||
PLTTBUF_MAIN_EX_OBJ, | ||
PLTTBUF_SUB_EX_OBJ, | ||
|
||
PLTTBUF_MAX, | ||
}; | ||
|
||
#define PLTTBUF_MAIN_BG_F (1<<PLTTBUF_MAIN_BG) | ||
#define PLTTBUF_SUB_BG_F (1<<PLTTBUF_SUB_BG) | ||
#define PLTTBUF_MAIN_OBJ_F (1<<PLTTBUF_MAIN_OBJ) | ||
#define PLTTBUF_SUB_OBJ_F (1<<PLTTBUF_SUB_OBJ) | ||
#define PLTTBUF_MAIN_EX_BG_0_F (1<<PLTTBUF_MAIN_EX_BG_0) | ||
#define PLTTBUF_MAIN_EX_BG_1_F (1<<PLTTBUF_MAIN_EX_BG_1) | ||
#define PLTTBUF_MAIN_EX_BG_2_F (1<<PLTTBUF_MAIN_EX_BG_2) | ||
#define PLTTBUF_MAIN_EX_BG_3_F (1<<PLTTBUF_MAIN_EX_BG_3) | ||
#define PLTTBUF_SUB_EX_BG_0_F (1<<PLTTBUF_SUB_EX_BG_0) | ||
#define PLTTBUF_SUB_EX_BG_1_F (1<<PLTTBUF_SUB_EX_BG_1) | ||
#define PLTTBUF_SUB_EX_BG_2_F (1<<PLTTBUF_SUB_EX_BG_2) | ||
#define PLTTBUF_SUB_EX_BG_3_F (1<<PLTTBUF_SUB_EX_BG_3) | ||
#define PLTTBUF_MAIN_EX_OBJ_F (1<<PLTTBUF_MAIN_EX_OBJ) | ||
#define PLTTBUF_SUB_EX_OBJ_F (1<<PLTTBUF_SUB_EX_OBJ) | ||
#define PLTTBUF_ALL_F ((1<<PLTTBUF_MAX)-1) | ||
|
||
enum PaletteSelector { | ||
PLTTSEL_TRANSPARENT, | ||
PLTTSEL_OPAQUE, | ||
PLTTSEL_BOTH, | ||
}; | ||
|
||
#endif // POKEPLATINUM_CONSTANTS_PALETTE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.