mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
GBI: Move command flushing to a private function
Gets rid of redundancy
This commit is contained in:
parent
b3d0fc9113
commit
c98dd06b95
11
src/GBI.cpp
11
src/GBI.cpp
|
@ -119,8 +119,7 @@ void GBI_Unknown( u32 w0, u32 w1 )
|
|||
void GBIInfo::init()
|
||||
{
|
||||
m_pCurrent = NULL;
|
||||
for (u32 i = 0; i <= 0xFF; ++i)
|
||||
cmd[i] = GBI_Unknown;
|
||||
_flushCommands();
|
||||
}
|
||||
|
||||
void GBIInfo::destroy()
|
||||
|
@ -144,6 +143,11 @@ bool GBIInfo::isHWLSupported() const
|
|||
return true;
|
||||
}
|
||||
|
||||
void GBIInfo::_flushCommands()
|
||||
{
|
||||
std::fill(std::begin(cmd), std::end(cmd), GBI_Unknown);
|
||||
}
|
||||
|
||||
void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
|
||||
{
|
||||
if (_pCurrent->type == NONE) {
|
||||
|
@ -153,8 +157,7 @@ void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
|
|||
|
||||
if (m_pCurrent == NULL || (m_pCurrent->type != _pCurrent->type)) {
|
||||
m_pCurrent = _pCurrent;
|
||||
for (int i = 0; i <= 0xFF; ++i)
|
||||
cmd[i] = GBI_Unknown;
|
||||
_flushCommands();
|
||||
|
||||
RDP_Init();
|
||||
|
||||
|
|
|
@ -698,6 +698,8 @@ struct GBIInfo
|
|||
bool isBranchLessZ() const { return m_pCurrent != NULL ? m_pCurrent->branchLessZ : true; }
|
||||
|
||||
private:
|
||||
void _flushCommands();
|
||||
|
||||
void _makeCurrent(MicrocodeInfo * _pCurrent);
|
||||
bool _makeExistingMicrocodeCurrent(u32 uc_start, u32 uc_dstart, u32 uc_dsize);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user