Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run: python configure.py && ninja

- name: Run progress script
run: python progress.py --verify-obj --verify-bin --progress-summary
run: python progress.py --verify-bin --progress-summary

- name: Run DTK and objdiff to generate progress file for decomp.dev
run: |
Expand Down
2 changes: 2 additions & 0 deletions include/constants/sjis_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
// [Translation: Animation switching allocator (m3d::banm_c::m_heap)]
#define M3D_BANM_HEAP_NAME "�A�j���؂�ւ��p�A���P�[�^(m3d::banm_c::m_heap)"

// [Translation: 2D resource heap (d2d::ResAccMultLoader_c::create)]
#define D2D_HEAP_NAME "�Q�c���\\�[�X�p�q�[�v(d2d::ResAccMultLoader_c::create)"
52 changes: 3 additions & 49 deletions include/game/bases/d_2d.hpp
Original file line number Diff line number Diff line change
@@ -1,51 +1,5 @@
#pragma once
#include <game/bases/d_resource.hpp>
#include <game/mLib/m_2d/base.hpp>
#include <game/mLib/m_vec.hpp>
#include <nw4r/lyt.h>
#include <nw4r/math.h>

namespace d2d {

/// @unofficial
struct ClipSettings {
ClipSettings() : mPos(0.0f, 0.0f), mSize(0.0f, 0.0f), mEnabled(false) {}

ClipSettings &operator=(const ClipSettings &other) {
mPos = other.mPos;
mSize = other.mSize;
mEnabled = other.mEnabled;
return *this;
}

mVec2_c mPos;
mVec2_c mSize;
bool mEnabled;
};

class Multi_c : public m2d::Base_c {
public:
virtual ~Multi_c();
virtual void draw();
virtual void calc();
virtual bool build(const char *, ResAccMult_c *);

void entry();
nw4r::lyt::Pane *getRootPane();

private:
nw4r::lyt::Layout mLayout;
nw4r::lyt::DrawInfo mDrawInfo;

public:
ResAccMult_c *mpResAccessor;
mVec2_c mPos;

ClipSettings mClipSettings;

private:
u32 mFlags;
u32 mUnknown_98;
};

} // namespace d2d
#include <game/bases/d_2d/global.hpp>
#include <game/bases/d_2d/multi.hpp>
#include <game/bases/d_2d/resource.hpp>
17 changes: 17 additions & 0 deletions include/game/bases/d_2d/global.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include <types.h>
#include <game/mLib/m_2d.hpp>
#include <nw4r/ut.h>
#include <nw4r/lyt.h>

namespace d2d {

void init();
void draw();
void drawBefore();
void drawAfter();
void drawBtween(u8, u8);
int setAlpha_patrolPane_patrol(nw4r::lyt::Pane *, void *);
void setAlpha(m2d::Simple_c *, u8);

} // namespace d2d
67 changes: 67 additions & 0 deletions include/game/bases/d_2d/multi.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#pragma once
#include <types.h>
#include <game/bases/d_2d/resource.hpp>
#include <game/mLib/m_2d.hpp>
#include <game/mLib/m_vec.hpp>

namespace d2d {

/// @unofficial
struct ClipSettings {
ClipSettings() {}
ClipSettings(const mVec2_c &pos, const mVec2_c &size) : mPos(pos), mSize(size) {
mEnabled = true;
}
void setPos(const mVec2_c &pos) { mPos = pos; }
void setSize(const mVec2_c &size) { mSize = size; }
void set(const mVec2_c &pos, const mVec2_c &size) {
mPos = pos;
mSize = size;
}
void enable() { mEnabled = true; }

ClipSettings &operator=(const ClipSettings &other) {
mPos = other.mPos;
mSize = other.mSize;
mEnabled = other.mEnabled;
return *this;
}

mVec2_c mPos;
mVec2_c mSize;
bool mEnabled;
};

class Multi_c : public m2d::Base_c {
public:
Multi_c();
virtual ~Multi_c();
virtual void draw();
virtual void calc();
virtual bool build(const char *name, ResAccMult_c *resAcc);

void entry();
void calcBefore();
void calcAfter();
nw4r::lyt::Pane *getRootPane();
nw4r::lyt::Pane *findPaneByName(const char *name);
nw4r::lyt::TextBox *findTextBoxByName(const char *name);
nw4r::lyt::Picture *findPictureByName(const char *name);
nw4r::lyt::Window *findWindowByName(const char *name);

protected:
m2d::Layout_c mLayout;
nw4r::lyt::DrawInfo mDrawInfo;

public:
ResAccMult_c *mpResAccessor;
mVec2_c mPos;

ClipSettings mClipSettings;

private:
u32 mFlags;
u32 mUnknown_98;
};

} // namespace d2d
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
#pragma once
#include <game/bases/d_dvd.hpp>
#include <game/mLib/m_2d/resource.hpp>
#include <game/mLib/m_allocator.hpp>
#include <lib/egg/core/eggHeap.h>
#include <nw4r/lyt.h>

namespace d2d {

class ResAccMult_c : public m2d::ResAccIf_c {
class InternalAccessor : nw4r::lyt::ArcResourceAccessor {};
class InternalAccessor : public nw4r::lyt::ArcResourceAccessor {
public:
virtual void* GetResource(ulong type, const char *name, size_t *size);
virtual nw4r::ut::Font *GetFont(const char *name);
};

public:
ResAccMult_c();

virtual ~ResAccMult_c();
virtual void creater();

void *getResource(unsigned long, const char *);

InternalAccessor mInternalAccessor;
};

class ResAccMultLoader_c : public ResAccMult_c {
public:
ResAccMultLoader_c();
~ResAccMultLoader_c();

bool create(EGG::Heap *, unsigned long);
bool remove();
virtual ~ResAccMultLoader_c();

bool requestEx(const char *, int);
bool request(const char *);
bool remove();

static bool create(EGG::Heap *heap, ulong size);

private:
void *mpResource;
dDvd::loader_c mLoader;

static mAllocator_c *ms_res_allocator;
};

} // namespace d2d
2 changes: 1 addition & 1 deletion include/game/bases/d_SmallScore.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <game/bases/d_resource.hpp>
#include <game/bases/d_2d.hpp>
#include <game/bases/d_lytbase.hpp>
#include <game/mLib/m_vec.hpp>
#include <nw4r/lyt.h>
Expand Down
2 changes: 1 addition & 1 deletion include/game/bases/d_SmallScoreManager.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include <game/bases/d_base.hpp>
#include <game/bases/d_resource.hpp>
#include <game/bases/d_2d.hpp>
#include <game/bases/d_SmallScore.hpp>
#include <game/sLib/s_GlobalData.hpp>
#include <constants/game_constants.h>
Expand Down
2 changes: 2 additions & 0 deletions include/game/bases/d_a_player_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class daPyMng_c {
static int mNum;
static u8 mActPlayerInfo;

static int mScore;
static int mPlayerEntry[4];
static int mPlayerType[4];
static int mPlayerMode[4];
static int mRest[4];
Expand Down
1 change: 1 addition & 0 deletions include/game/bases/d_actor.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <game/bases/d_base_actor.hpp>
#include <game/mLib/m_bound_box.hpp>
#include <game/mLib/m_3d.hpp>
#include <game/bases/d_cc.hpp>
#include <game/bases/d_bc.hpp>
Expand Down
4 changes: 4 additions & 0 deletions include/game/bases/d_dvd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ namespace dDvd {

class loader_c {
public:
loader_c();
virtual ~loader_c();
virtual void freeHeap();

void *request(const char *, u8, EGG::Heap *);
bool remove();

private:
u32 mSize;
u32 mCommand;
Expand Down
11 changes: 11 additions & 0 deletions include/game/bases/d_font_manager.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include <types.h>
#include <nw4r/ut.h>

class dFontMng_c {
public:
static void *getResFontData(const char *name);
static u8 getResFontIndex(const char *name);
static nw4r::ut::Font *getFont(int index);
};
7 changes: 5 additions & 2 deletions include/game/bases/d_game_com.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <types.h>
#include <nw4r/lyt.h>
#include <game/mLib/m_3d.hpp>
#include <game/mLib/m_bound_box.hpp>
#include <game/mLib/m_vec.hpp>
#include <game/bases/d_lyttextBox.hpp>

Expand Down Expand Up @@ -97,9 +98,11 @@ namespace dGameCom {
void DispSizeScale(nw4r::math::VEC2 &scale);

void LayoutDispNumber(const int &value, const int &fillLeft, LytTextBox_c *textBox, bool fillWidth);

bool isNowCourseClear();
void SelectCursorSetup();
void SelectCursorSetup(nw4r::lyt::Pane *, int, bool);
void WindowPaneColorSet(nw4r::lyt::Window *, int);
bool isNowCourseClear();

void AreaLanguageFolder(const char *, char *);
void fn_800B37E0(mVec3_c &, bool);
}
Loading