Files
tww/src/m_Do/m_Do_hostIO.cpp
T
2023-12-27 21:07:21 -08:00

49 lines
1.7 KiB
C++

//
// Generated by dtk
// Translation Unit: m_Do_hostIO.cpp
//
#include "m_Do/m_Do_hostIO.h"
#include "string.h"
#include "m_Do/m_Do_printf.h"
mDoHIO_root_c mDoHIO_root;
/* 80017A4C-80017A50 .text update__13mDoHIO_root_cFv */
void mDoHIO_root_c::update() {}
/* 80017A50-80017B20 .text createChild__16mDoHIO_subRoot_cFPCcP13JORReflexible */
s8 mDoHIO_subRoot_c::createChild(const char* i_name, JORReflexible* i_reflexible) {
for (int i = 0; i < 64; i++) {
if (mChild[i].mReflexible == i_reflexible) {
// "Danger: Trying to register an already registered HostIO<%s>\n"
OSReport_Error("危険:既に登録されているホストIOをふたたび登録しようとしています<%s>\n", i_name);
return -1;
}
}
for (int i = 0; i < 64; i++) {
if (mChild[i].mReflexible == NULL) {
strncpy(mChild[i].mName, i_name, sizeof(mChild[i].mName));
mChild[i].mReflexible = i_reflexible;
return i;
}
}
// "No free HostIO entries. Could not register. \n"
OSReport_Error("ホストIOの空きエントリがありません。登録できませんでした。\n");
return -1;
}
/* 80017B20-80017B88 .text deleteChild__16mDoHIO_subRoot_cFSc */
void mDoHIO_subRoot_c::deleteChild(s8 i_childID) {
if (i_childID >= 0) {
if (mChild[i_childID].mReflexible == NULL) {
// "Danger: Trying to delete HostIO that has already been deleted<%s>\n"
OSReport_Error("危険:すでに削除されているホストIOをさらに削除しようとしています<%s>\n", mChild[i_childID].mName);
} else {
mChild[i_childID].mReflexible = NULL;
}
}
}