-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yury Klushin
committed
Nov 6, 2024
1 parent
4b12796
commit d183bad
Showing
5 changed files
with
131 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(util LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(UTIL_SOURCES | ||
WavPcmFile.cpp | ||
) | ||
|
||
set(UTIL_HEADERS | ||
stdafx.h | ||
WavPcmFile.h | ||
) | ||
|
||
add_library(util STATIC | ||
${UTIL_SOURCES} | ||
${UTIL_HEADERS} | ||
) | ||
|
||
target_compile_definitions(util PRIVATE EMUBASE_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// stdafx.h : include file for standard system include files, | ||
// or project specific include files that are used frequently, but | ||
// are changed infrequently | ||
// | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <cassert> | ||
#include <cstdlib> | ||
#include <cstdio> | ||
#include <cstring> | ||
|
||
#ifndef CALLBACK | ||
# define CALLBACK | ||
#endif // CALLBACK | ||
|
||
#ifndef TCHAR | ||
typedef char TCHAR; | ||
#define _tfopen fopen | ||
#define _tcscpy strcpy | ||
#define _tstat _stat | ||
#define _tcsrchr strrchr | ||
#define _tcsicmp strcasecmp | ||
#define _tcscmp strcmp | ||
#define _tcslen strlen | ||
#define _sntprintf _snprintf | ||
#define _snprintf snprintf | ||
#endif // TCHAR | ||
|
||
#ifndef _T | ||
# define _T(str) (str) | ||
#endif // _T | ||
|
||
#ifndef LPTSTR | ||
typedef TCHAR* LPTSTR; | ||
#endif // LCTSTR | ||
|
||
#ifndef LPCTSTR | ||
typedef const TCHAR* LPCTSTR; | ||
#endif // LPCTSTR | ||
|
||
#ifndef ASSERT | ||
# define ASSERT(expr) assert(expr) | ||
#endif // ASSERT | ||
|
||
#ifndef MAKEWORD | ||
# define MAKEWORD(a, b) ((uint16_t)(((uint8_t)(((uint32_t)(a)) & 0xff)) | ((uint16_t)((uint8_t)(((uint32_t)(b)) & 0xff))) << 8)) | ||
#endif // MAKEWORD | ||
|
||
#ifndef HANDLE | ||
typedef void *HANDLE; | ||
#endif // HANDLE | ||
|
||
#ifndef DECLARE_HANDLE | ||
# define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name | ||
#endif // DECLARE_HANDLE | ||
|
||
#ifndef INVALID_HANDLE_VALUE | ||
# define INVALID_HANDLE_VALUE ((HANDLE)(int32_t)-1) | ||
#endif // INVALID_HANDLE_VALUE | ||
|
||
////////////////////////////////////////////////////////////////////// | ||
// DebugPrint | ||
|
||
void DebugPrint(const char* message); | ||
void DebugPrintFormat(const char* pszFormat, ...); | ||
void DebugLog(const char* message); | ||
void DebugLogFormat(const char* pszFormat, ...); | ||
|
||
void PrintOctalValue(char* buffer, uint16_t value); |