Skip to content

Commit

Permalink
Comment out some strange and unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Jan 24, 2018
1 parent 409733a commit 9f41ddc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/utils/xrDXT/DXT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
#include "dxtlib.h"
#include <nvtt/nvtt.h>
#include "ETextureParams.h"
#include "dds.h"
//#include "dds.h"

BOOL APIENTRY DllMain(HANDLE hModule, u32 ul_reason_for_call, LPVOID lpReserved) { return TRUE; }
//BOOL APIENTRY DllMain(HANDLE hModule, u32 ul_reason_for_call, LPVOID lpReserved) { return TRUE; }
static HFILE gFileOut;
static HFILE gFileIn;

const u32 fcc_DXT1 = MAKEFOURCC('D', 'X', 'T', '1');
/*const u32 fcc_DXT1 = MAKEFOURCC('D', 'X', 'T', '1');
const u32 fcc_DXT2 = MAKEFOURCC('D', 'X', 'T', '2');
const u32 fcc_DXT3 = MAKEFOURCC('D', 'X', 'T', '3');
const u32 fcc_DXT4 = MAKEFOURCC('D', 'X', 'T', '4');
const u32 fcc_DXT5 = MAKEFOURCC('D', 'X', 'T', '5');
const u32 fcc_DXT5 = MAKEFOURCC('D', 'X', 'T', '5');*/

void __cdecl WriteDTXnFile(DWORD count, void* buffer, void* userData)
/*void __cdecl WriteDTXnFile(DWORD count, void* buffer, void* userData)
{
if (count == sizeof(DDS_HEADER))
{
Expand All @@ -32,7 +32,7 @@ void __cdecl WriteDTXnFile(DWORD count, void* buffer, void* userData)
}
}
_write(gFileOut, buffer, count);
}
}*/

class DDSWriter : public nvtt::OutputHandler
{
Expand All @@ -48,7 +48,7 @@ DDSWriter::DDSWriter(HFILE& file) : file(file) {}
void DDSWriter::beginImage(int size, int width, int height, int depth, int face, int miplevel) {}
bool DDSWriter::writeData(const void* data, int size)
{
if (size == sizeof(DDS_HEADER))
/*if (size == sizeof(DDS_HEADER))
{
DDS_HEADER* hdr = (DDS_HEADER*)data;
if (hdr->dwSize == size)
Expand All @@ -62,7 +62,7 @@ bool DDSWriter::writeData(const void* data, int size)
case fcc_DXT5: hdr->ddspf.dwRGBBitCount = 0; break;
}
}
}
}*/
_write(file, data, size);
return true;
}
Expand All @@ -89,15 +89,15 @@ void DDSErrorHandler::error(nvtt::Error e)
MessageBox(0, msg, "DXT compress error", MB_ICONERROR | MB_OK);
}

void __cdecl ReadDTXnFile(DWORD count, void* buffer, void* userData) { _read(gFileIn, buffer, count); }
/*void __cdecl ReadDTXnFile(DWORD count, void* buffer, void* userData) { _read(gFileIn, buffer, count); }
HRESULT WriteCompressedData(void* data, int miplevel, u32 size)
{
_write(gFileOut, data, size);
FillMemory(data, size, 0xff);
return 0;
}
}*/

ENGINE_API u32* Build32MipLevel(u32& _w, u32& _h, u32& _p, u32* pdwPixelSrc, STextureParams* fmt, float blend)
/*ENGINE_API*/ u32* Build32MipLevel(u32& _w, u32& _h, u32& _p, u32* pdwPixelSrc, STextureParams* fmt, float blend)
{
R_ASSERT(pdwPixelSrc);
R_ASSERT(_w % 2 == 0);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/xrDXT/StdAfx.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#define ENGINE_API
#define XR_EPROPS_API
//#define ENGINE_API
//#define XR_EPROPS_API
#define ECORE_API

#include "Common/Common.hpp"
Expand Down

0 comments on commit 9f41ddc

Please sign in to comment.