Skip to content

Commit

Permalink
d_a_movie_player start
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 10, 2024
1 parent 635a1fd commit 9489cd4
Show file tree
Hide file tree
Showing 7 changed files with 297 additions and 74 deletions.
10 changes: 10 additions & 0 deletions include/JSystem/JFramework/JFWDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ class JFWDisplay {
JUTFader * getFader() { return mpFader; }
void setClearColor(JUtility::TColor color) { mClearColor = color; }

u16 getFrameRate() const { return mFrameRate; }
void setFrameRate(u16 framerate) {
mFrameRate = framerate;
mTickRate = 0;
}

void getEfbHeight() const {}
void getEfbWidth() const {}
void getXfbManager() const {}

static JFWDisplay* sManager;

private:
Expand Down
46 changes: 35 additions & 11 deletions include/d/actor/d_a_movie_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@

#include "f_op/f_op_actor.h"
#include "d/d_drawlist.h"
#include "dolphin/dvd/dvd.h"

class daMP_c : public fopAc_ac_c {
public:
void daMP_c_Get_arg_data();
void daMP_c_Init();
void daMP_c_Finish();
void daMP_c_Main();
void daMP_c_Draw();
u32 daMP_c_Get_arg_data();
int daMP_c_Init();
BOOL daMP_c_Finish();
BOOL daMP_c_Main();
BOOL daMP_c_Draw();
static int daMP_c_Callback_Init(fopAc_ac_c*);
static int daMP_c_Callback_Finish(daMP_c*);
static int daMP_c_Callback_Main(daMP_c*);
static int daMP_c_Callback_Draw(daMP_c*);
static BOOL daMP_c_Callback_Finish(daMP_c*);
static BOOL daMP_c_Callback_Main(daMP_c*);
static BOOL daMP_c_Callback_Draw(daMP_c*);

public:
/* 0x290 */ u32 (*mpCallBack1)();
Expand All @@ -26,15 +27,38 @@ class daMP_Dlst_base_c : public dDlst_base_c {
};

struct daMP_THPReadBuffer {

/* 0x00 */ void* m00;
/* 0x04 */ s32 m04;
};

struct daMP_Player_c { // Fake name
/* 0x00 */ DVDFileInfo mFileInfo;
/* 0x3C */ u8 m3C[0x50 - 0x3C];
/* 0x50 */ u32 m50;
/* 0x54 */ u8 m54[0x64 - 0x54];
/* 0x64 */ s32 m64;
/* 0x68 */ u8 m68[0xA6 - 0x68];
/* 0xA6 */ u8 mA6;
/* 0xA7 */ u8 mA7[0xA8 - 0xA7];
/* 0xA8 */ s32 mA8;
/* 0xAC */ u8 mAC[0xB8 - 0xAC];
/* 0xB8 */ s32 mB8;
/* 0xBC */ s32 mBC;
/* 0xC0 */ s32 mC0;
};

struct THPVideoInfo {

/* 0x00 */ u8 m00[0x0C - 0x00];
};

struct THPAudioInfo {

/* 0x00 */ u8 m00[0x10 - 0x00];
};

inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
return *(s32*)readBuf->m00;
}

void daMP_PrepareReady(int);

#endif /* D_A_MOVIE_PLAYER_H */
2 changes: 1 addition & 1 deletion include/dolphin/dvd/dvd.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ typedef void (*DVDOptionalCommandChecker)(DVDCommandBlock* block, void (*cb)(u32
void DVDInit(void);
BOOL DVDOpen(const char* filename, DVDFileInfo* fileinfo);
BOOL DVDClose(DVDFileInfo* fileinfo);
BOOL DVDReadPrio(DVDFileInfo* fileinfo, void*, s32, s32, s32);
int DVDReadPrio(DVDFileInfo* fileinfo, void*, s32, s32, s32);
DVDDiskID* DVDGetCurrentDiskID(void);
BOOL DVDFastOpen(long, DVDFileInfo* fileinfo);
s32 DVDGetCommandBlockStatus(const DVDCommandBlock* block);
Expand Down
2 changes: 1 addition & 1 deletion include/f_op/f_op_actor_mng.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ inline csXyz* fopAcM_GetShapeAngle_p(fopAc_ac_c* pActor) {
return &pActor->shape_angle;
}

inline bool fopAcM_CheckCondition(fopAc_ac_c* p_actor, u32 flag) {
inline u32 fopAcM_CheckCondition(fopAc_ac_c* p_actor, u32 flag) {
return p_actor->actor_condition & flag;
}

Expand Down
4 changes: 2 additions & 2 deletions include/m_Do/m_Do_graphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class mDoGph_gInf_c {
static void onMonotone();
static void offMonotone();
static void calcMonotone();
static void getFrameRate();

static void setFader(JUTFader* fader) {
JFWDisplay::getManager()->setFader(fader);
Expand Down Expand Up @@ -58,14 +57,15 @@ class mDoGph_gInf_c {
static GXTexObj* getZbufferTexObj() { return &mZbufferTexObj; }
static GXTexObj* getFrameBufferTexObj() { return &mFrameBufferTexObj; }
static void fadeIn(f32 rate, GXColor& color) { fadeOut(-rate, color); }
static u16 getFrameRate() { return JFWDisplay::getManager()->getFrameRate(); }
static void setFrameRate(u16 framerate) { JFWDisplay::getManager()->setFrameRate(framerate); }

static void alloc32(u32) {}
static void getFrameBufferMemory() {}
static void getFrameBufferSize() {}
static void getMonotoneRate() {}
static void setBlureMtx(const Mtx) {}
static void setBlureRate(u8) {}
static void setFrameRate(u16) {}
static void setMonotoneRate(s16 rate) { mMonotoneRate = rate; }
static void setMonotoneRateSpeed(s16 speed) { mMonotoneRateSpeed = speed; }

Expand Down
Loading

0 comments on commit 9489cd4

Please sign in to comment.