mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Move enum to bg.h
This commit is contained in:
parent
998900bd1b
commit
1a33187bad
25
gflib/bg.c
25
gflib/bg.c
@ -776,17 +776,6 @@ void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dis
|
||||
SetBgAffineInternal(bg, srcCenterX, srcCenterY, dispCenterX, dispCenterY, scaleX, scaleY, rotationAngle);
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
MOSAIC_SET_HV,
|
||||
MOSAIC_SET_H,
|
||||
MOSAIC_ADD_H,
|
||||
MOSAIC_SUB_H,
|
||||
MOSAIC_SET_V,
|
||||
MOSAIC_ADD_V,
|
||||
MOSAIC_SUB_V,
|
||||
};
|
||||
|
||||
u8 Unused_AdjustBgMosaic(u8 val, u8 mode)
|
||||
{
|
||||
u16 mosaic = GetGpuReg(REG_OFFSET_MOSAIC);
|
||||
@ -797,15 +786,15 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode)
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case MOSAIC_SET_HV:
|
||||
case BG_MOSAIC_SET_HV:
|
||||
default:
|
||||
bgH = val & 0xF;
|
||||
bgV = val >> 0x4;
|
||||
break;
|
||||
case MOSAIC_SET_H:
|
||||
case BG_MOSAIC_SET_H:
|
||||
bgH = val & 0xF;
|
||||
break;
|
||||
case MOSAIC_ADD_H:
|
||||
case BG_MOSAIC_ADD_H:
|
||||
if ((bgH + val) > 0xF)
|
||||
{
|
||||
bgH = 0xF;
|
||||
@ -815,7 +804,7 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode)
|
||||
bgH += val;
|
||||
}
|
||||
break;
|
||||
case MOSAIC_SUB_H:
|
||||
case BG_MOSAIC_SUB_H:
|
||||
if ((bgH - val) < 0)
|
||||
{
|
||||
bgH = 0x0;
|
||||
@ -825,10 +814,10 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode)
|
||||
bgH -= val;
|
||||
}
|
||||
break;
|
||||
case MOSAIC_SET_V:
|
||||
case BG_MOSAIC_SET_V:
|
||||
bgV = val & 0xF;
|
||||
break;
|
||||
case MOSAIC_ADD_V:
|
||||
case BG_MOSAIC_ADD_V:
|
||||
if ((bgV + val) > 0xF)
|
||||
{
|
||||
bgV = 0xF;
|
||||
@ -838,7 +827,7 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode)
|
||||
bgV += val;
|
||||
}
|
||||
break;
|
||||
case MOSAIC_SUB_V:
|
||||
case BG_MOSAIC_SUB_V:
|
||||
if ((bgV - val) < 0)
|
||||
{
|
||||
bgV = 0x0;
|
||||
|
11
gflib/bg.h
11
gflib/bg.h
@ -28,6 +28,17 @@ enum {
|
||||
BG_COORD_SUB,
|
||||
};
|
||||
|
||||
// Modes for Unused_AdjustBgMosaic
|
||||
enum {
|
||||
BG_MOSAIC_SET_HV,
|
||||
BG_MOSAIC_SET_H,
|
||||
BG_MOSAIC_ADD_H,
|
||||
BG_MOSAIC_SUB_H,
|
||||
BG_MOSAIC_SET_V,
|
||||
BG_MOSAIC_ADD_V,
|
||||
BG_MOSAIC_SUB_V,
|
||||
};
|
||||
|
||||
struct BgTemplate
|
||||
{
|
||||
u16 bg:2; // 0x1, 0x2 -> 0x3
|
||||
|
Loading…
Reference in New Issue
Block a user