clean up files

This commit is contained in:
DizzyEggg
2018-02-28 13:07:58 +01:00
parent edf9f706c4
commit 85a959f321
7 changed files with 23 additions and 853 deletions

View File

@@ -1,7 +1,5 @@
#include "global.h"
// this file's functions
void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey);
#include "blit.h"
void BlitBitmapRect4BitWithoutColorKey(struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
{

View File

@@ -4,18 +4,15 @@
#include "m4a.h"
#include "palette.h"
#include "sound.h"
#include "constants/songs.h"
#include "string_util.h"
#include "window.h"
#include "text.h"
#include "blit.h"
extern void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
extern void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
extern void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight);
extern u8 GetKeypadIconWidth(u8 keypadIconId);
extern void CopyWindowToVram(u8 windowId, u8 mode);
extern u16 Font6Func(struct TextPrinter *textPrinter);
extern u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese);
extern void PlaySE(u16 songNum);
extern u8* UnkTextUtil_GetPtrI(u8 a1);
extern int sub_8197964();
@@ -27,7 +24,6 @@ static u16 gLastTextBgColor;
static u16 gLastTextFgColor;
static u16 gLastTextShadowColor;
extern struct Main gMain;
extern struct MusicPlayerInfo gMPlayInfo_BGM;
const struct FontInfo *gFonts;
@@ -1986,7 +1982,7 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
result = TRUE;
PlaySE(5);
PlaySE(SE_SELECT);
}
}
return result;
@@ -2004,7 +2000,7 @@ bool16 TextPrinterWait(struct TextPrinter *textPrinter)
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
result = TRUE;
PlaySE(5);
PlaySE(SE_SELECT);
}
}
return result;

View File

@@ -1,6 +1,8 @@
#include "global.h"
#include "window.h"
#include "malloc.h"
#include "bg.h"
#include "blit.h"
u32 filler_03002F58;
u32 filler_03002F5C;
@@ -15,19 +17,6 @@ EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0};
EWRAM_DATA static struct Window* sWindowPtr = NULL;
EWRAM_DATA static u16 sWindowSize = 0;
extern void* GetBgTilemapBuffer(u8 bg);
extern int DummiedOutFireRedLeafGreenTileAllocFunc(int, int, int, int);
extern u16 GetBgAttribute(u8 bg, u8 attributeId);
extern void SetBgTilemapBuffer(u8 bg, void *tilemap);
extern void CopyBgTilemapBufferToVram(u8 bg);
extern u8 LoadBgTiles(u8 bg, void *src, u16 size, u16 destOffset);
extern void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot, u16 tileNumDelta);
extern void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette);
extern void BlitBitmapRect4Bit(struct Bitmap *src, struct Bitmap *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u8 colorKey);
extern void BlitBitmapRect4BitTo8Bit(struct Bitmap *src, struct Bitmap *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u8 colorKey, u8 paletteNum);
extern void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
extern void FillBitmapRect8Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
static u8 GetNumActiveWindowsOnBg(u8 bgId);
static u8 GetNumActiveWindowsOnBg8Bit(u8 bgId);
@@ -130,13 +119,13 @@ u16 AddWindow(const struct WindowTemplate *template)
u8 *allocatedTilemapBuffer;
int i;
for (win = 0; win < 0x20; ++win)
for (win = 0; win < WINDOWS_MAX; ++win)
{
if ((bgLayer = gWindows[win].window.priority) == 0xFF)
break;
}
if (win == 0x20)
if (win == WINDOWS_MAX)
return 0xFF;
bgLayer = template->priority;
@@ -199,13 +188,13 @@ int AddWindowWithoutTileMap(const struct WindowTemplate *template)
u8 bgLayer;
int allocatedBaseBlock;
for (win = 0; win < 0x20; ++win)
for (win = 0; win < WINDOWS_MAX; ++win)
{
if (gWindows[win].window.priority == 0xFF)
break;
}
if (win == 0x20)
if (win == WINDOWS_MAX)
return 0xFF;
bgLayer = template->priority;