Untabify.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
64e329c054
commit
fec69e1f72
11 changed files with 55 additions and 55 deletions
|
@ -51,7 +51,7 @@ namespace
|
|||
const std::string resourcePath = path + "/resource/";
|
||||
if (dirExists(resourcePath))
|
||||
{
|
||||
return resourcePath;
|
||||
return resourcePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@ namespace
|
|||
const size_t groups = m.size();
|
||||
if (groups == 6)
|
||||
{
|
||||
geometry.width = std::stoi(m.str(1));
|
||||
geometry.height = std::stoi(m.str(2));
|
||||
if (!m.str(3).empty())
|
||||
{
|
||||
geometry.x = std::stoi(m.str(4));
|
||||
geometry.y = std::stoi(m.str(5));
|
||||
}
|
||||
return;
|
||||
geometry.width = std::stoi(m.str(1));
|
||||
geometry.height = std::stoi(m.str(2));
|
||||
if (!m.str(3).empty())
|
||||
{
|
||||
geometry.x = std::stoi(m.str(4));
|
||||
geometry.y = std::stoi(m.str(5));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw std::runtime_error("Invalid sizes: " + s);
|
||||
|
|
|
@ -33,8 +33,8 @@ namespace
|
|||
|
||||
const double fUsecPerSec = 1.e6;
|
||||
#if 1
|
||||
const UINT nExecutionPeriodUsec = 1000000 / 60; // 60 FPS
|
||||
// const UINT nExecutionPeriodUsec = 100; // 0.1ms
|
||||
const UINT nExecutionPeriodUsec = 1000000 / 60; // 60 FPS
|
||||
// const UINT nExecutionPeriodUsec = 100; // 0.1ms
|
||||
const double fExecutionPeriodClks = g_fCurrentCLK6502 * ((double)nExecutionPeriodUsec / fUsecPerSec);
|
||||
#else
|
||||
const double fExecutionPeriodClks = 1800.0;
|
||||
|
@ -100,7 +100,7 @@ namespace
|
|||
g_dwCyclesThisFrame = g_dwCyclesThisFrame % dwClksPerFrame;
|
||||
if (!options.headless)
|
||||
{
|
||||
frame->VideoPresentScreen();
|
||||
frame->VideoPresentScreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,11 +116,11 @@ namespace
|
|||
|
||||
if (!cardManager.GetDisk2CardMgr().IsConditionForFullSpeed())
|
||||
{
|
||||
if (us < nExecutionPeriodUsec)
|
||||
{
|
||||
const auto duration = std::chrono::microseconds(nExecutionPeriodUsec - us);
|
||||
std::this_thread::sleep_for(duration);
|
||||
}
|
||||
if (us < nExecutionPeriodUsec)
|
||||
{
|
||||
const auto duration = std::chrono::microseconds(nExecutionPeriodUsec - us);
|
||||
std::this_thread::sleep_for(duration);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -165,11 +165,11 @@ namespace
|
|||
|
||||
if (lpvAudioPtr1 && dwAudioBytes1)
|
||||
{
|
||||
mixBuffer(lpvAudioPtr1, dwAudioBytes1);
|
||||
mixBuffer(lpvAudioPtr1, dwAudioBytes1);
|
||||
}
|
||||
if (lpvAudioPtr2 && dwAudioBytes2)
|
||||
{
|
||||
mixBuffer(lpvAudioPtr2, dwAudioBytes2);
|
||||
mixBuffer(lpvAudioPtr2, dwAudioBytes2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,13 +111,13 @@ HRESULT IDirectSoundBuffer::Lock( DWORD dwWriteCursor, DWORD dwWriteBytes, LPVOI
|
|||
{
|
||||
if (*lpdwAudioBytes1 < dwWriteBytes)
|
||||
{
|
||||
*lplpvAudioPtr2 = this->mySoundBuffer.data();
|
||||
*lpdwAudioBytes2 = std::min(dwWriteCursor, dwWriteBytes - *lpdwAudioBytes1);
|
||||
*lplpvAudioPtr2 = this->mySoundBuffer.data();
|
||||
*lpdwAudioBytes2 = std::min(dwWriteCursor, dwWriteBytes - *lpdwAudioBytes1);
|
||||
}
|
||||
else
|
||||
{
|
||||
*lplpvAudioPtr2 = nullptr;
|
||||
*lpdwAudioBytes2 = 0;
|
||||
*lplpvAudioPtr2 = nullptr;
|
||||
*lpdwAudioBytes2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace
|
|||
{
|
||||
if (f)
|
||||
{
|
||||
fclose(f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ DWORD SetFilePointer(HANDLE hFile, LONG lDistanceToMove,
|
|||
}
|
||||
|
||||
BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped) {
|
||||
LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped) {
|
||||
const FILE_HANDLE & file_handle = dynamic_cast<FILE_HANDLE &>(*hFile);
|
||||
|
||||
/* read something from file */
|
||||
|
@ -48,7 +48,7 @@ BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
|||
}
|
||||
|
||||
BOOL WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
|
||||
LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped) {
|
||||
LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped) {
|
||||
|
||||
const FILE_HANDLE & file_handle = dynamic_cast<FILE_HANDLE &>(*hFile);
|
||||
|
||||
|
@ -70,19 +70,19 @@ DWORD GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh) {
|
|||
/* what is the size of the specified file??? Hmmm, really I donna. ^_^ */
|
||||
long lcurset = ftell(file_handle.f); // remember current file position
|
||||
|
||||
fseek(file_handle.f, 0, FILE_END); // go to the end of file
|
||||
fseek(file_handle.f, 0, FILE_END); // go to the end of file
|
||||
DWORD lfilesize = ftell(file_handle.f); // that is the real size of file, isn't it??
|
||||
fseek(file_handle.f, lcurset, FILE_BEGIN); // let the file position be the same as before
|
||||
return lfilesize;
|
||||
}
|
||||
|
||||
HANDLE CreateFile(LPCTSTR lpFileName,
|
||||
DWORD dwDesiredAccess,
|
||||
DWORD dwShareMode,
|
||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
DWORD dwCreationDisposition,
|
||||
DWORD dwFlagsAndAttributes,
|
||||
HANDLE hTemplateFile)
|
||||
DWORD dwDesiredAccess,
|
||||
DWORD dwShareMode,
|
||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
DWORD dwCreationDisposition,
|
||||
DWORD dwFlagsAndAttributes,
|
||||
HANDLE hTemplateFile)
|
||||
{
|
||||
FILE * f = nullptr;
|
||||
if (dwCreationDisposition == CREATE_NEW || dwCreationDisposition == CREATE_ALWAYS)
|
||||
|
|
|
@ -17,12 +17,12 @@ typedef struct tagOFN {
|
|||
LPCTSTR lpstrTitle;
|
||||
DWORD Flags;
|
||||
WORD nFileExtension;
|
||||
WORD nFileOffset;
|
||||
WORD nFileOffset;
|
||||
} OPENFILENAME, *LPOPENFILENAME;
|
||||
|
||||
#define FILE_BEGIN SEEK_SET
|
||||
#define FILE_CURRENT SEEK_CUR
|
||||
#define FILE_END SEEK_END
|
||||
#define FILE_BEGIN SEEK_SET
|
||||
#define FILE_CURRENT SEEK_CUR
|
||||
#define FILE_END SEEK_END
|
||||
|
||||
#define FILE_ATTRIBUTE_READONLY 0x00000001
|
||||
#define FILE_ATTRIBUTE_NORMAL 0
|
||||
|
@ -48,10 +48,10 @@ DWORD SetFilePointer(HANDLE hFile,
|
|||
DWORD dwMoveMethod);
|
||||
|
||||
BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
|
||||
LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
BOOL WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
|
||||
LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped);
|
||||
LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
BOOL DeleteFile(LPCTSTR lpFileName);
|
||||
|
||||
|
@ -61,12 +61,12 @@ BOOL GetOpenFileName(LPOPENFILENAME lpofn);
|
|||
BOOL GetSaveFileName(LPOPENFILENAME lpofn);
|
||||
|
||||
HANDLE CreateFile(LPCTSTR lpFileName,
|
||||
DWORD dwDesiredAccess,
|
||||
DWORD dwShareMode,
|
||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
DWORD dwCreationDisposition,
|
||||
DWORD dwFlagsAndAttributes,
|
||||
HANDLE hTemplateFile
|
||||
DWORD dwDesiredAccess,
|
||||
DWORD dwShareMode,
|
||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
DWORD dwCreationDisposition,
|
||||
DWORD dwFlagsAndAttributes,
|
||||
HANDLE hTemplateFile
|
||||
);
|
||||
|
||||
DWORD GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh);
|
||||
|
|
|
@ -39,11 +39,11 @@ int vsnprintf_s(
|
|||
#define sscanf_s sscanf
|
||||
|
||||
inline bool IsCharLower(char ch) {
|
||||
return isascii(ch) && islower(ch);
|
||||
return isascii(ch) && islower(ch);
|
||||
}
|
||||
|
||||
inline bool IsCharUpper(char ch) {
|
||||
return isascii(ch) && isupper(ch);
|
||||
return isascii(ch) && isupper(ch);
|
||||
}
|
||||
|
||||
DWORD CharLowerBuff(LPTSTR lpsz, DWORD cchLength);
|
||||
|
|
|
@ -14,8 +14,8 @@ void OutputDebugString(const char * str);
|
|||
BOOL WINAPI SetCurrentDirectory(LPCSTR path);
|
||||
|
||||
#define INFINITE 0xFFFFFFFF
|
||||
#define WAIT_OBJECT_0 0
|
||||
#define WAIT_FAILED 0xffffffff
|
||||
#define WAIT_OBJECT_0 0
|
||||
#define WAIT_FAILED 0xffffffff
|
||||
#define STATUS_PENDING 0x00000103
|
||||
#define STILL_ACTIVE STATUS_PENDING
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
****************************************************************************/
|
||||
|
||||
/*
|
||||
Please note all long types (save for pointers) were replaced by int types
|
||||
for x64 systems support!
|
||||
Please note all long types (save for pointers) were replaced by int types
|
||||
for x64 systems support!
|
||||
|
||||
On x32 long type takes 4 bytes, on x64 long type tekes 8 bytes)
|
||||
-- Krez beotiger
|
||||
On x32 long type takes 4 bytes, on x64 long type tekes 8 bytes)
|
||||
-- Krez beotiger
|
||||
*/
|
||||
|
||||
#ifndef _WINDEF_
|
||||
|
@ -184,7 +184,7 @@ typedef unsigned char TBYTE , *PTBYTE ;
|
|||
#define CALLBACK
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define _ASSERT(expr) assert(expr)
|
||||
#define _ASSERT(expr) assert(expr)
|
||||
#else
|
||||
#define _ASSERT(expr)
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define SEVERITY_SUCCESS 0
|
||||
#define SEVERITY_ERROR 1
|
||||
|
||||
#define MAKE_HRESULT(sev,fac,code) \
|
||||
#define MAKE_HRESULT(sev,fac,code) \
|
||||
((HRESULT) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) | ((unsigned int)(code))) )
|
||||
#define MAKE_SCODE(sev,fac,code) \
|
||||
((SCODE) (((unsigned int)(sev)<<31) | ((unsigned int)(fac)<<16) | ((unsigned int)(code))) )
|
||||
|
|
Loading…
Add table
Reference in a new issue