mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-24 23:01:23 -04:00
dfa8efa97b
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
36 lines
819 B
C++
36 lines
819 B
C++
#include "d/dolzel.h" // IWYU pragma: keep
|
|
|
|
#include "d/d_bg_plc.h"
|
|
#include "JSystem/JUtility/JUTAssert.h"
|
|
|
|
dBgPlc::dBgPlc() {
|
|
m_base = NULL;
|
|
}
|
|
|
|
dBgPlc::~dBgPlc() {}
|
|
|
|
void dBgPlc::setBase(void* pbase) {
|
|
m_base = (sBgPlc*)pbase;
|
|
}
|
|
|
|
sBgPc* dBgPlc::getCode(int index, sBgPc** ppcode) const {
|
|
JUT_ASSERT(45, m_base != NULL);
|
|
JUT_ASSERT(46, m_base->m_code_size == ZELDA_CODE_SIZE);
|
|
JUT_ASSERT(47, index >= 0 && index< m_base->m_num);
|
|
sBgPc* code = m_base->m_code;
|
|
code += index;
|
|
|
|
*ppcode = code;
|
|
return code;
|
|
}
|
|
|
|
u32 dBgPlc::getGrpCode(int index) const {
|
|
JUT_ASSERT(62, m_base != NULL);
|
|
JUT_ASSERT(63, m_base->m_code_size == ZELDA_CODE_SIZE);
|
|
JUT_ASSERT(64, 0 <= index && index < m_base->m_num);
|
|
sBgPc* code = m_base->m_code;
|
|
code += index;
|
|
|
|
return code->code4;
|
|
}
|