mirror of https://github.com/pret/pokeemerald.git
Rename contest_painting_effects to image_processing_effects
This commit is contained in:
parent
1ed3af66eb
commit
8e65f0188f
|
@ -1,4 +1,4 @@
|
|||
gContestMonPixels
|
||||
gContestPaintingContext
|
||||
gImageProcessingContext
|
||||
gContestPaintingWinner
|
||||
gContestPaintingMonPalette
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef GUARD_CONTEST_PAINTING_EFFECTS_H
|
||||
#define GUARD_CONTEST_PAINTING_EFFECTS_H
|
||||
#ifndef GUARD_IMAGE_PROCESSING_EFFECTS_H
|
||||
#define GUARD_IMAGE_PROCESSING_EFFECTS_H
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ enum
|
|||
QUANTIZE_EFFECT_BLACK_WHITE,
|
||||
};
|
||||
|
||||
struct ContestPaintingContext
|
||||
struct ImageProcessingContext
|
||||
{
|
||||
u8 effect;
|
||||
void *canvasPixels;
|
||||
|
@ -46,8 +46,8 @@ struct ContestPaintingContext
|
|||
u8 personality;
|
||||
};
|
||||
|
||||
void ApplyImageProcessingEffects(struct ContestPaintingContext *);
|
||||
void ApplyImageProcessingQuantization(struct ContestPaintingContext *);
|
||||
void ConvertImageProcessingToGBA(struct ContestPaintingContext *);
|
||||
void ApplyImageProcessingEffects(struct ImageProcessingContext *);
|
||||
void ApplyImageProcessingQuantization(struct ImageProcessingContext *);
|
||||
void ConvertImageProcessingToGBA(struct ImageProcessingContext *);
|
||||
|
||||
#endif
|
|
@ -204,7 +204,7 @@ SECTIONS {
|
|||
src/dewford_trend.o(.text);
|
||||
src/heal_location.o(.text);
|
||||
src/region_map.o(.text);
|
||||
src/contest_painting_effects.o(.text);
|
||||
src/image_processing_effects.o(.text);
|
||||
src/decoration.o(.text);
|
||||
src/slot_machine.o(.text);
|
||||
src/contest_painting.o(.text);
|
||||
|
@ -575,8 +575,8 @@ SECTIONS {
|
|||
src/menu_helpers.o(.rodata);
|
||||
src/heal_location.o(.rodata);
|
||||
src/region_map.o(.rodata);
|
||||
src/contest_painting_effects.o(.rodata);
|
||||
data/contest_painting_effects.o(.rodata);
|
||||
src/image_processing_effects.o(.rodata);
|
||||
data/image_processing_effects.o(.rodata);
|
||||
src/decoration.o(.rodata);
|
||||
src/slot_machine.o(.rodata);
|
||||
data/slot_machine.o(.rodata);
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include "bg.h"
|
||||
#include "contest.h"
|
||||
#include "contest_painting.h"
|
||||
#include "contest_painting_effects.h"
|
||||
#include "data.h"
|
||||
#include "decompress.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "image_processing_effects.h"
|
||||
#include "international_string_util.h"
|
||||
#include "main.h"
|
||||
#include "lilycove_lady.h"
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
// IWRAM common
|
||||
u16 (*gContestMonPixels)[][32];
|
||||
struct ContestPaintingContext gContestPaintingContext;
|
||||
struct ImageProcessingContext gImageProcessingContext;
|
||||
struct ContestWinner *gContestPaintingWinner;
|
||||
u16 *gContestPaintingMonPalette;
|
||||
|
||||
|
@ -657,38 +657,38 @@ static void AllocPaintingResources(void)
|
|||
|
||||
static void DoContestPaintingImageProcessing(u8 imageEffect)
|
||||
{
|
||||
gContestPaintingContext.canvasPixels = gContestMonPixels;
|
||||
gContestPaintingContext.canvasPalette = gContestPaintingMonPalette;
|
||||
gContestPaintingContext.paletteStart = 0;
|
||||
gContestPaintingContext.personality = gContestPaintingWinner->personality % 256;
|
||||
gContestPaintingContext.columnStart = 0;
|
||||
gContestPaintingContext.rowStart = 0;
|
||||
gContestPaintingContext.columnEnd = 64;
|
||||
gContestPaintingContext.rowEnd = 64;
|
||||
gContestPaintingContext.canvasWidth = 64;
|
||||
gContestPaintingContext.canvasHeight = 64;
|
||||
gImageProcessingContext.canvasPixels = gContestMonPixels;
|
||||
gImageProcessingContext.canvasPalette = gContestPaintingMonPalette;
|
||||
gImageProcessingContext.paletteStart = 0;
|
||||
gImageProcessingContext.personality = gContestPaintingWinner->personality % 256;
|
||||
gImageProcessingContext.columnStart = 0;
|
||||
gImageProcessingContext.rowStart = 0;
|
||||
gImageProcessingContext.columnEnd = 64;
|
||||
gImageProcessingContext.rowEnd = 64;
|
||||
gImageProcessingContext.canvasWidth = 64;
|
||||
gImageProcessingContext.canvasHeight = 64;
|
||||
|
||||
switch (imageEffect)
|
||||
{
|
||||
case IMAGE_EFFECT_CHARCOAL:
|
||||
case IMAGE_EFFECT_GRAYSCALE_LIGHT:
|
||||
gContestPaintingContext.quantizeEffect = QUANTIZE_EFFECT_GRAYSCALE;
|
||||
gImageProcessingContext.quantizeEffect = QUANTIZE_EFFECT_GRAYSCALE;
|
||||
break;
|
||||
case IMAGE_EFFECT_OUTLINE_COLORED:
|
||||
case IMAGE_EFFECT_SHIMMER:
|
||||
case IMAGE_EFFECT_POINTILLISM:
|
||||
default:
|
||||
gContestPaintingContext.quantizeEffect = QUANTIZE_EFFECT_STANDARD_LIMITED_COLORS;
|
||||
gImageProcessingContext.quantizeEffect = QUANTIZE_EFFECT_STANDARD_LIMITED_COLORS;
|
||||
break;
|
||||
}
|
||||
|
||||
gContestPaintingContext.var_16 = 2;
|
||||
gContestPaintingContext.effect = imageEffect;
|
||||
gContestPaintingContext.dest = OBJ_VRAM0;
|
||||
gImageProcessingContext.var_16 = 2;
|
||||
gImageProcessingContext.effect = imageEffect;
|
||||
gImageProcessingContext.dest = OBJ_VRAM0;
|
||||
|
||||
ApplyImageProcessingEffects(&gContestPaintingContext);
|
||||
ApplyImageProcessingQuantization(&gContestPaintingContext);
|
||||
ConvertImageProcessingToGBA(&gContestPaintingContext);
|
||||
ApplyImageProcessingEffects(&gImageProcessingContext);
|
||||
ApplyImageProcessingQuantization(&gImageProcessingContext);
|
||||
ConvertImageProcessingToGBA(&gImageProcessingContext);
|
||||
LoadPalette(gContestPaintingMonPalette, 0x100, 0x200);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "contest_painting_effects.h"
|
||||
#include "image_processing_effects.h"
|
||||
#include "contest_painting.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
|
@ -53,7 +53,7 @@ static u16 QuantizePixel_PrimaryColors(u16*);
|
|||
|
||||
extern const u8 gPointillismPoints[][3];
|
||||
|
||||
void ApplyImageProcessingEffects(struct ContestPaintingContext *context)
|
||||
void ApplyImageProcessingEffects(struct ImageProcessingContext *context)
|
||||
{
|
||||
gCanvasPixels = context->canvasPixels;
|
||||
gCanvasMonPersonality = context->personality;
|
||||
|
@ -762,7 +762,7 @@ static u16 QuantizePixel_BlurHard(u16 *prevPixel, u16 *curPixel, u16 *nextPixel)
|
|||
}
|
||||
|
||||
/*
|
||||
void ConvertImageProcessingToGBA(struct ContestPaintingContext *arg0)
|
||||
void ConvertImageProcessingToGBA(struct ImageProcessingContext *arg0)
|
||||
{
|
||||
u16 i, j, k;
|
||||
u8 r5 = arg0->canvasWidth >> 3;
|
||||
|
@ -787,7 +787,7 @@ void ConvertImageProcessingToGBA(struct ContestPaintingContext *arg0)
|
|||
*/
|
||||
|
||||
NAKED
|
||||
void ConvertImageProcessingToGBA(struct ContestPaintingContext *arg0)
|
||||
void ConvertImageProcessingToGBA(struct ImageProcessingContext *arg0)
|
||||
{
|
||||
asm_unified("\n\
|
||||
push {r4-r7,lr}\n\
|
||||
|
@ -968,7 +968,7 @@ _08126194:\n\
|
|||
bx r0");
|
||||
}
|
||||
|
||||
void ApplyImageProcessingQuantization(struct ContestPaintingContext *context)
|
||||
void ApplyImageProcessingQuantization(struct ImageProcessingContext *context)
|
||||
{
|
||||
gCanvasPaletteStart = context->paletteStart * 16;
|
||||
gCanvasPalette = &context->canvasPalette[gCanvasPaletteStart];
|
|
@ -51,7 +51,7 @@ gReservedSpritePaletteCount:
|
|||
.include "contest.o"
|
||||
.include "tv.o"
|
||||
.include "mauville_old_man.o"
|
||||
.include "contest_painting_effects.o"
|
||||
.include "image_processing_effects.o"
|
||||
|
||||
.space 0x4
|
||||
|
||||
|
|
Loading…
Reference in New Issue