mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-08-22 05:49:04 -04:00
implement fade and wipe transitions
This commit is contained in:
@@ -19,6 +19,13 @@ typedef union {
|
||||
rgba8888_t c;
|
||||
} rgba8888;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u8 r, g, b, a;
|
||||
};
|
||||
u32 rgba;
|
||||
} Color_RGBA8_u32;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include "dolphin/os/OSCache.h"
|
||||
|
||||
#define N64_SCREEN_HEIGHT 240
|
||||
#define N64_SCREEN_WIDTH 320
|
||||
|
||||
int bcmp (void *v1, void *v2, u32 size);
|
||||
void bcopy(void *src, void *dst, size_t n);
|
||||
void bzero(void *ptr, size_t size);
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
typedef struct {
|
||||
float m[4][4];
|
||||
} Mtx;
|
||||
*/
|
||||
|
||||
typedef float MtxF_t[4][4];
|
||||
|
||||
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
|
||||
|
||||
@@ -110,7 +110,10 @@ typedef struct common_data_s {
|
||||
/* 0x026110 */ Time_c time;
|
||||
/* 0x02613C */ Private_c* now_private;
|
||||
/* 0x026140 */ mHm_hs_c* now_home;
|
||||
/* 0x026144 */ u8 tmp0[0x23E8];
|
||||
/* 0x026144 */ u8 tmp0[0x2614D - 0x26144];
|
||||
/* 0x02614D */ u8 transFadeDuration;
|
||||
/* 0x02614E */ u8 transWipeSpeed;
|
||||
/* 0x02614F */ u8 tmp34[0x2852C - 0x2614F];
|
||||
/* 0x02852C */ s16 money_power;
|
||||
/* 0x02852E */ s16 goods_power;
|
||||
/* 0x028530 */ u8 tmp1[0x5680];
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef M_FBDEMO_FADE_H
|
||||
#define M_FBDEMO_FADE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "PR/mbi.h"
|
||||
#include "libu64/u64types.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 type;
|
||||
/* 0x001 */ u8 isDone;
|
||||
/* 0x002 */ u8 direction;
|
||||
/* 0x004 */ Color_RGBA8_u32 color;
|
||||
/* 0x008 */ s16 frame;
|
||||
/* 0x00A */ u16 unkA;
|
||||
/* 0x00C */ u16 timer;
|
||||
} TransitionFade; // size = 0x10
|
||||
|
||||
|
||||
extern TransitionFade* fbdemo_fade_init(TransitionFade*);
|
||||
extern void fbdemo_fade_move(TransitionFade*, int);
|
||||
extern void fbdemo_fade_startup(TransitionFade*);
|
||||
extern void fbdemo_fade_settype(TransitionFade*, int);
|
||||
extern void fbdemo_fade_setcolor_rgba8888(TransitionFade*, u32);
|
||||
extern void fbdemo_fade_is_finish(TransitionFade*);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef FBDEMO_WIPE_H
|
||||
#define FBDEMO_WIPE_H
|
||||
#include "types.h"
|
||||
#include "PR/mbi.h"
|
||||
#include "libu64/u64types.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Color_RGBA8_u32 color;
|
||||
/* 0x004 */ Color_RGBA8_u32 unkColor;
|
||||
/* 0x008 */ u8 direction;
|
||||
/* 0x009 */ u8 frame;
|
||||
/* 0x00A */ u8 finished;
|
||||
/* 0x00C */ u16 texX;
|
||||
/* 0x00E */ u16 texY;
|
||||
/* 0x010 */ u16 normal;
|
||||
/* 0x018 */ Mtx projection;
|
||||
/* 0x058 */ Mtx lookAt;
|
||||
/* 0x098 */ Mtx modelView[2][3];
|
||||
} TransitionWipe; // size = 0x218
|
||||
|
||||
|
||||
extern TransitionWipe* fbdemo_wipe1_init(TransitionWipe*);
|
||||
extern void fbdemo_wipe1_move(TransitionWipe*, int);
|
||||
extern void fbdemo_wipe1_draw(TransitionWipe* Gfx**);
|
||||
extern void fbdemo_wipe1_startup(TransitionWipe*);
|
||||
extern void fbdemo_wipe1_settype(TransitionWipe*, int);
|
||||
extern void fbdemo_wipe1_setcolor_rgba8888(TransitionWipe*, u32);
|
||||
extern void fbdemo_wipe1_is_finish(TransitionWipe*);
|
||||
#endif
|
||||
@@ -11,6 +11,8 @@ extern "C" {
|
||||
extern Gfx* gfx_gSPTextureRectangle1(Gfx* gfx, u32 ulx, u32 uly, u32 lrx, u32 lry, int tile, int s, int t, int dsdx, int dtdy);
|
||||
extern Gfx* gfx_gDPFillRectangle1(Gfx* gfx, u32 ulx, u32 uly, u32 lrx, u32 lry);
|
||||
extern Gfx* gfx_gDPFillRectangleF(Gfx* gfx, u32 ulx, u32 uly, u32 lrx, u32 lry);
|
||||
extern Gfx* gfx_tex_scroll2(Gfx** gfxpp, u32 x, u32 y, s32 width, s32 height);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user