diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2013-02-22 02:19:59 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2013-02-22 02:19:59 -0600 |
| commit | d3f1bb93f2454ab1e1daf4c2b75d18269719c9b3 (patch) | |
| tree | 3f2df8f32fedc09d893aa875b18d626e41f61e85 /Source/Core/VideoCommon/Src/VertexLoader.cpp | |
| parent | db1be085c2d0a359e5ee561bbbad8e8428a72552 (diff) | |
Use DataWrite in a few more places.
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexLoader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/VertexLoader.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp index 5e1490e020..7d1b9d99a5 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp @@ -97,10 +97,10 @@ void LOADERDECL PosMtx_ReadDirect_UByte() void LOADERDECL PosMtx_Write() { - *VertexManager::s_pCurBufferPointer++ = s_curposmtx; - *VertexManager::s_pCurBufferPointer++ = 0; - *VertexManager::s_pCurBufferPointer++ = 0; - *VertexManager::s_pCurBufferPointer++ = 0; + DataWrite<u8>(s_curposmtx); + DataWrite<u8>(0); + DataWrite<u8>(0); + DataWrite<u8>(0); } void LOADERDECL UpdateBoundingBoxPrepare() @@ -166,24 +166,22 @@ void LOADERDECL TexMtx_ReadDirect_UByte() void LOADERDECL TexMtx_Write_Float() { - *(float*)VertexManager::s_pCurBufferPointer = (float)s_curtexmtx[s_texmtxwrite++]; - VertexManager::s_pCurBufferPointer += 4; + DataWrite(float(s_curtexmtx[s_texmtxwrite++])); } void LOADERDECL TexMtx_Write_Float2() { - ((float*)VertexManager::s_pCurBufferPointer)[0] = 0; - ((float*)VertexManager::s_pCurBufferPointer)[1] = (float)s_curtexmtx[s_texmtxwrite++]; - VertexManager::s_pCurBufferPointer += 8; + DataWrite(0.f); + DataWrite(float(s_curtexmtx[s_texmtxwrite++])); } void LOADERDECL TexMtx_Write_Float4() { - ((float*)VertexManager::s_pCurBufferPointer)[0] = 0; - ((float*)VertexManager::s_pCurBufferPointer)[1] = 0; - ((float*)VertexManager::s_pCurBufferPointer)[2] = s_curtexmtx[s_texmtxwrite++]; - ((float*)VertexManager::s_pCurBufferPointer)[3] = 0; // Just to fill out with 0. - VertexManager::s_pCurBufferPointer += 16; + DataWrite(0.f); + DataWrite(0.f); + DataWrite(float(s_curtexmtx[s_texmtxwrite++])); + // Just to fill out with 0. + DataWrite(0.f); } VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr) |
