preproc assets, move config to overworld config, add some antialiasing to graphics, consistency in naming gens
This commit is contained in:
parent
86800d25dd
commit
afb66b4d2b
9 changed files with 60 additions and 58 deletions
|
@ -4,16 +4,16 @@ JASC-PAL
|
|||
0 0 0
|
||||
0 0 0
|
||||
255 255 255
|
||||
41 49 90
|
||||
84 85 89
|
||||
0 0 0
|
||||
238 230 238
|
||||
189 180 197
|
||||
139 139 164
|
||||
90 90 123
|
||||
41 49 90
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
27 27 27
|
||||
40 40 40
|
||||
51 51 51
|
||||
62 62 62
|
||||
0 0 0
|
||||
0 0 0
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9.1 KiB |
|
@ -11,9 +11,9 @@ JASC-PAL
|
|||
139 139 164
|
||||
90 90 123
|
||||
41 49 90
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
228 228 228
|
||||
215 215 215
|
||||
204 204 204
|
||||
193 193 193
|
||||
0 0 0
|
||||
0 0 0
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#ifndef GUARD_CONFIG_MAP_POPUP_H
|
||||
#define GUARD_CONFIG_MAP_POPUP_H
|
||||
|
||||
// General map pop-up config
|
||||
#define MAP_POPUP_GENERATION GEN_3 // Different generations display location names in overworld pop-ups differently
|
||||
// only current other choice is GEN_5, all others will default to gen 3 pop-ups
|
||||
|
||||
// Gen 5 specific pop-up config
|
||||
// Constants
|
||||
#define MAP_POPUP_BW_TIME_NONE 0 // don't show the time
|
||||
#define MAP_POPUP_BW_TIME_12_HR 1 // use 12 hour (AM/PM) time
|
||||
#define MAP_POPUP_BW_TIME_24_HR 2 // use 24 hour time
|
||||
|
||||
#define MAP_POPUP_BW_COLOR_BLACK 0
|
||||
#define MAP_POPUP_BW_COLOR_WHITE 1
|
||||
|
||||
// Configuration
|
||||
#define MAP_POPUP_BW_COLOR MAP_POPUP_BW_COLOR_BLACK // Black 2 and White 2 use different colors for their map pop-ups
|
||||
#define MAP_POPUP_BW_TIME_MODE MAP_POPUP_BW_TIME_NONE // determines what type of time is shown
|
||||
#define MAP_POPUP_BW_ALPHA_BLEND FALSE // enables alpha blending/transparency for the pop-ups
|
||||
// mostly intended to be used with the black color option
|
||||
|
||||
#endif // GUARD_CONFIG_MAP_POPUP_H
|
|
@ -53,4 +53,22 @@
|
|||
|
||||
#define BATTLE_PYRAMID_RANDOM_ENCOUNTERS FALSE // If set to TRUE, battle pyramid Pokemon will be generated randomly based on the round's challenge instead of hardcoded in src/data/battle_frontier/battle_pyramid_level_50_wild_mons.h (or open_level_wild_mons.h)
|
||||
|
||||
// Map pop-up config
|
||||
#define OW_POPUP_GENERATION GEN_3 // Different generations display location names in overworld pop-ups differently.
|
||||
// Only choies are currently GEN_3 and GEN_5, all others will default to Gen3 pop-ups.
|
||||
|
||||
// Gen5 map pop-up config
|
||||
// Constants
|
||||
#define OW_POPUP_BW_TIME_NONE 0 // Don't show the time
|
||||
#define OW_POPUP_BW_TIME_12_HR 1 // Use 12 hour (AM/PM) time
|
||||
#define OW_POPUP_BW_TIME_24_HR 2 // Use 24 hour time
|
||||
|
||||
#define OW_POPUP_BW_COLOR_BLACK 0 // Black pop-up from B2
|
||||
#define OW_POPUP_BW_COLOR_WHITE 1 // White pop-up from W2
|
||||
|
||||
// Configuration
|
||||
#define OW_POPUP_BW_COLOR OW_POPUP_BW_COLOR_BLACK // B2W2 use different colors for their map pop-ups.
|
||||
#define OW_POPUP_BW_TIME_MODE OW_POPUP_BW_TIME_NONE // Determines what type of time is shown.
|
||||
#define OW_POPUP_BW_ALPHA_BLEND FALSE // Enables alpha blending/transparency for the pop-ups. Mainly intended to be used with the black color option.
|
||||
|
||||
#endif // GUARD_CONFIG_OVERWORLD_H
|
||||
|
|
|
@ -1107,8 +1107,8 @@ void ResetPreservedPalettesInWeather(void)
|
|||
|
||||
bool8 IsWeatherAlphaBlend(void)
|
||||
{
|
||||
return gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL ||
|
||||
gWeatherPtr->currWeather == WEATHER_FOG_DIAGONAL ||
|
||||
gWeatherPtr->currWeather == WEATHER_UNDERWATER_BUBBLES ||
|
||||
gWeatherPtr->currWeather == WEATHER_UNDERWATER;
|
||||
return (gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL) ||
|
||||
(gWeatherPtr->currWeather == WEATHER_FOG_DIAGONAL) ||
|
||||
(gWeatherPtr->currWeather == WEATHER_UNDERWATER_BUBBLES) ||
|
||||
(gWeatherPtr->currWeather == WEATHER_UNDERWATER);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "constants/layouts.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/weather.h"
|
||||
#include "config/map_name_popup.h"
|
||||
#include "config/overworld.h"
|
||||
#include "config.h"
|
||||
|
||||
// enums
|
||||
|
@ -188,11 +188,18 @@ static const u8 sRegionMapSectionId_To_PopUpThemeIdMapping[] =
|
|||
[MAPSEC_TRAINER_HILL - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_MARBLE
|
||||
};
|
||||
|
||||
// gen 5 assets
|
||||
#if OW_POPUP_GENERATION == GEN_5
|
||||
// Gen5 assets
|
||||
static const u8 sMapPopUpTilesPrimary_BW[] = INCBIN_U8("graphics/map_popup/bw/bw_primary.4bpp");
|
||||
static const u8 sMapPopUpTilesSecondary_BW[] = INCBIN_U8("graphics/map_popup/bw/bw_secondary.4bpp");
|
||||
static const u16 sMapPopUpTilesPalette_BW_Black[16] = INCBIN_U16("graphics/map_popup/bw/black.gbapal");
|
||||
static const u16 sMapPopUpTilesPalette_BW_White[16] = INCBIN_U16("graphics/map_popup/bw/white.gbapal");
|
||||
#else
|
||||
static const u8 sMapPopUpTilesPrimary_BW[] = {0};
|
||||
static const u8 sMapPopUpTilesSecondary_BW[] = {0};
|
||||
static const u16 sMapPopUpTilesPalette_BW_Black[] = {0};
|
||||
static const u16 sMapPopUpTilesPalette_BW_White[] = {0};
|
||||
#endif
|
||||
|
||||
static const u8 sRegionMapSectionId_To_PopUpThemeIdMapping_BW[] =
|
||||
{
|
||||
|
@ -341,7 +348,7 @@ enum {
|
|||
STATE_PRINT, // For some reason the first state is numerically last.
|
||||
};
|
||||
|
||||
#define POPUP_OFFSCREEN_Y ((MAP_POPUP_GENERATION == GEN_5) ? 24 : 40)
|
||||
#define POPUP_OFFSCREEN_Y ((OW_POPUP_GENERATION == GEN_5) ? 24 : 40)
|
||||
#define POPUP_SLIDE_SPEED 2
|
||||
|
||||
#define tState data[0]
|
||||
|
@ -357,11 +364,11 @@ void ShowMapNamePopup(void)
|
|||
if (!FuncIsActiveTask(Task_MapNamePopUpWindow))
|
||||
{
|
||||
// New pop up window
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
{
|
||||
gPopupTaskId = CreateTask(Task_MapNamePopUpWindow, 100);
|
||||
|
||||
if (MAP_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
if (OW_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||
}
|
||||
else
|
||||
|
@ -397,7 +404,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
|
|||
task->tState = STATE_SLIDE_IN;
|
||||
task->tPrintTimer = 0;
|
||||
ShowMapNamePopUpWindow();
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
{
|
||||
EnableInterrupts(INTR_FLAG_HBLANK);
|
||||
SetHBlankCallback(HBlankCB_DoublePopupWindow);
|
||||
|
@ -445,7 +452,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
|
|||
break;
|
||||
case STATE_ERASE:
|
||||
ClearStdWindowAndFrame(GetMapNamePopUpWindowId(), TRUE);
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
ClearStdWindowAndFrame(GetSecondaryPopUpWindowId(), TRUE);
|
||||
task->tState = STATE_END;
|
||||
break;
|
||||
|
@ -453,7 +460,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
|
|||
HideMapNamePopUpWindow();
|
||||
return;
|
||||
}
|
||||
if (MAP_POPUP_GENERATION != GEN_5)
|
||||
if (OW_POPUP_GENERATION != GEN_5)
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, task->tYOffset);
|
||||
}
|
||||
|
||||
|
@ -469,7 +476,7 @@ void HideMapNamePopUpWindow(void)
|
|||
RemoveMapNamePopUpWindow();
|
||||
}
|
||||
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
{
|
||||
if (GetSecondaryPopUpWindowId() != WINDOW_NONE)
|
||||
{
|
||||
|
@ -480,7 +487,7 @@ void HideMapNamePopUpWindow(void)
|
|||
DisableInterrupts(INTR_FLAG_HBLANK);
|
||||
SetHBlankCallback(NULL);
|
||||
|
||||
if (MAP_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
if (OW_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND);
|
||||
|
@ -521,9 +528,9 @@ static void ShowMapNamePopUpWindow(void)
|
|||
GetMapName(withoutPrefixPtr, gMapHeader.regionMapSectionId, 0);
|
||||
}
|
||||
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
{
|
||||
if (MAP_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
if (OW_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
SetGpuRegBits(REG_OFFSET_WININ, WININ_WIN0_CLR);
|
||||
|
||||
mapNamePopUpWindowId = AddMapNamePopUpWindow();
|
||||
|
@ -540,14 +547,14 @@ static void ShowMapNamePopUpWindow(void)
|
|||
mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT;
|
||||
mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT;
|
||||
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
{
|
||||
AddTextPrinterParameterized(mapNamePopUpWindowId, FONT_SHORT, mapDisplayHeader, 8, 2, TEXT_SKIP_DRAW, NULL);
|
||||
|
||||
if (MAP_POPUP_BW_TIME_MODE != MAP_POPUP_BW_TIME_NONE)
|
||||
if (OW_POPUP_BW_TIME_MODE != OW_POPUP_BW_TIME_NONE)
|
||||
{
|
||||
RtcCalcLocalTime();
|
||||
FormatDecimalTimeWithoutSeconds(withoutPrefixPtr, gLocalTime.hours, gLocalTime.minutes, MAP_POPUP_BW_TIME_MODE == MAP_POPUP_BW_TIME_24_HR);
|
||||
FormatDecimalTimeWithoutSeconds(withoutPrefixPtr, gLocalTime.hours, gLocalTime.minutes, OW_POPUP_BW_TIME_MODE == OW_POPUP_BW_TIME_24_HR);
|
||||
AddTextPrinterParameterized(secondaryPopUpWindowId, FONT_SMALL, mapDisplayHeader, GetStringRightAlignXOffset(FONT_SMALL, mapDisplayHeader, DISPLAY_WIDTH) - 5, 8, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
|
@ -601,7 +608,7 @@ static void LoadMapNamePopUpWindowBg(void)
|
|||
u16 regionMapSectionId = gMapHeader.regionMapSectionId;
|
||||
u8 secondaryPopUpWindowId;
|
||||
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
secondaryPopUpWindowId = GetSecondaryPopUpWindowId();
|
||||
|
||||
if (regionMapSectionId >= KANTO_MAPSEC_START)
|
||||
|
@ -612,14 +619,14 @@ static void LoadMapNamePopUpWindowBg(void)
|
|||
regionMapSectionId = 0; // Discard kanto region sections;
|
||||
}
|
||||
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
{
|
||||
popUpThemeId = sRegionMapSectionId_To_PopUpThemeIdMapping_BW[regionMapSectionId];
|
||||
switch (popUpThemeId)
|
||||
{
|
||||
// add additional gen 5-style pop-up themes as cases here
|
||||
case MAPPOPUP_THEME_BW_DEFAULT:
|
||||
if (MAP_POPUP_BW_COLOR == MAP_POPUP_BW_COLOR_WHITE)
|
||||
if (OW_POPUP_BW_COLOR == OW_POPUP_BW_COLOR_WHITE)
|
||||
LoadPalette(sMapPopUpTilesPalette_BW_White, BG_PLTT_ID(14), sizeof(sMapPopUpTilesPalette_BW_White));
|
||||
else
|
||||
LoadPalette(sMapPopUpTilesPalette_BW_Black, BG_PLTT_ID(14), sizeof(sMapPopUpTilesPalette_BW_Black));
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "task.h"
|
||||
#include "text_window.h"
|
||||
#include "window.h"
|
||||
#include "config/map_name_popup.h"
|
||||
#include "config/overworld.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
#define DLG_WINDOW_PALETTE_NUM 15
|
||||
|
@ -149,7 +149,7 @@ void InitStandardTextBoxWindows(void)
|
|||
InitWindows(sStandardTextBox_WindowTemplates);
|
||||
sStartMenuWindowId = WINDOW_NONE;
|
||||
sMapNamePopupWindowId = WINDOW_NONE;
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
sSecondaryPopupWindowId = WINDOW_NONE;
|
||||
}
|
||||
|
||||
|
@ -528,7 +528,7 @@ u8 AddMapNamePopUpWindow(void)
|
|||
{
|
||||
if (sMapNamePopupWindowId == WINDOW_NONE)
|
||||
{
|
||||
if (MAP_POPUP_GENERATION == GEN_5)
|
||||
if (OW_POPUP_GENERATION == GEN_5)
|
||||
sMapNamePopupWindowId = AddWindowParameterized(0, 0, 0, 30, 3, 14, 0x107);
|
||||
else
|
||||
sMapNamePopupWindowId = AddWindowParameterized(0, 1, 1, 10, 3, 14, 0x107);
|
||||
|
@ -2187,7 +2187,7 @@ void HBlankCB_DoublePopupWindow(void)
|
|||
if (scanline < 80 || scanline > 160)
|
||||
{
|
||||
REG_BG0VOFS = offset;
|
||||
if(MAP_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
if(OW_POPUP_BW_ALPHA_BLEND && !IsWeatherAlphaBlend())
|
||||
REG_BLDALPHA = BLDALPHA_BLEND(15, 5);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue