|
YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
默认平台命名空间。 更多...
命名空间 | |
| namespace | ColorSpace |
| 系统默认颜色空间。 | |
| namespace | Consoles |
| 控制台接口。 | |
| namespace | KeyCodes |
| 本机按键编码。 | |
类 | |
| exception | HFileNode |
| 文件系统节点迭代器。 更多... | |
| struct | CursorInfo |
| 屏幕指针设备光标信息。 更多... | |
| class | MappedFile |
| 只读内存映射文件。 更多... | |
| class | Color |
| 颜色。 更多... | |
类型定义 | |
| typedef char | NativePathCharType |
| 本机路径字符类型。 | |
| typedef NativePathCharType | PATHSTR [256] |
| 本机路径字符串类型。 | |
| typedef NativePathCharType | FILENAMESTR [256] |
| 本机文件名类型。 | |
| typedef std::bitset < KeyBitsetWidth > | KeyInput |
| 本机输入类型。 | |
| typedef std::int16_t | SPos |
| 屏幕坐标度量。 | |
| typedef std::uint16_t | SDst |
| 屏幕坐标距离。 | |
| typedef std::uint16_t | PixelType |
| LibNDS 兼容像素。 | |
| typedef PixelType * | BitmapPtr |
| typedef const PixelType * | ConstBitmapPtr |
函数 | |
| void | YDebugSetStatus (bool=true) |
| 调试模式:设置状态。 | |
| bool | YDebugGetStatus () |
| 调试模式:取得状态。 | |
| void | YDebugBegin () |
| 调试模式:显示控制台。 | |
| void | YDebug () |
| 调试模式:按键继续。 | |
| void | YDebug (const char *) |
| 调试模式:显示控制台字符串,按键继续。 | |
| int | yprintf (const char *,...) |
| 调试模式 printf :显示控制台格式化输出 ,按键继续。 | |
| int | uopen (const char *filename, int oflag) ynothrow |
| 以 UTF-8 文件名无缓冲打开文件。 | |
| int | uopen (const char *filename, int oflag, int pmode) ynothrow |
| 以 UTF-8 文件名无缓冲打开文件。 | |
| int | uopen (const char16_t *filename, int oflag) ynothrow |
| 以 UCS-2LE 文件名无缓冲打开文件。 | |
| int | uopen (const char16_t *filename, int oflag, int pmode) ynothrow |
| 以 UCS-2LE 文件名无缓冲打开文件。 | |
| std::FILE * | ufopen (const char *filename, const char *mode) ynothrow |
| 以 UTF-8 文件名打开文件。 | |
| std::FILE * | ufopen (const char16_t *filename, const char16_t *mode) ynothrow |
| 以 UCS-2LE 文件名打开文件。 | |
| bool | ufexists (const char *) ynothrow |
| 判断指定 UTF-8 文件名的文件是否存在。 | |
| bool | ufexists (const char16_t *) ynothrow |
| 判断指定 UCS-2 文件名的文件是否存在。 | |
| template<class _tString > | |
| bool | ufexists (const _tString &str) ynothrow |
| 判断指定字符串为文件名的文件是否存在。 | |
| bool | direxists (const_path_t) ynothrow |
| 判断指定路径的目录是否存在。 | |
| bool | udirexists (const_path_t) ynothrow |
| 判断指定 UTF-8 路径的目录是否存在。 | |
| template<class _tString > | |
| bool | udirexists (const _tString &str) ynothrow |
| 判断指定字符串为文件名的文件是否存在。 | |
| char * | getcwd_n (char *buf, std::size_t size) ynothrow |
| 当第一参数非空时取当前工作目录复制至指定缓冲区中。 | |
| char16_t * | u16getcwd_n (char16_t *buf, std::size_t size) ynothrow |
| 当第一参数非空时取当前工作目录( UCS2-LE 编码)复制至指定缓冲区中。 | |
| int | uchdir (const_path_t) ynothrow |
| 切换当前工作路径至指定的 UTF-8 字符串。 | |
| bool | mkdirs (const_path_t) ynothrow |
| 按路径新建一个或多个目录。 | |
| bool | truncate (std::FILE *, std::size_t) ynothrow |
| 截断文件至指定长度。 | |
| bool | IsAbsolute (const_path_t) |
| 判断指定路径字符串是否表示一个绝对路径。 | |
| std::size_t | GetRootNameLength (const_path_t) |
| 取指定路径的文件系统根节点名称的长度。 | |
| void | WaitForInput () |
| 等待任意按键。 | |
| yconstexpr std::size_t | KeyBitsetWidth (32) |
| 按键并行位宽。 | |
| void | StartTicks () |
| 开始 tick 计时。 | |
| std::uint32_t | GetTicks () |
| 取 tick 数。 | |
| std::uint64_t | GetHighResolutionTicks () |
| 取高精度 tick 数。 | |
| yconstfn std::uint8_t | FetchAlpha (PixelType px) |
| 取像素 Alpha 值。 | |
| yconstfn PixelType | FetchOpaque (PixelType px) |
| 取不透明像素。 | |
| yconstfn PixelType | FetchPixel (std::uint8_t r, std::uint8_t g, std::uint8_t b) |
| void | YConsoleInit (std::uint8_t dspIndex, Color fc=ColorSpace::White, Color bc=ColorSpace::Black) |
| 启动控制台。 | |
| bool | InitVideo () |
| 初始化视频输出。 | |
| YB_NORETURN void | terminate () ynothrow |
| 异常终止函数。 | |
默认平台命名空间。
| typedef PixelType* platform::BitmapPtr |
| typedef const PixelType* platform::ConstBitmapPtr |
| typedef NativePathCharType platform::FILENAMESTR[256] |
| typedef std::bitset<KeyBitsetWidth> platform::KeyInput |
| typedef char platform::NativePathCharType |
| typedef NativePathCharType platform::PATHSTR[256] |
| typedef std::uint16_t platform::PixelType |
| typedef std::uint16_t platform::SDst |
| typedef std::int16_t platform::SPos |
| bool platform::direxists | ( | const_path_t | path | ) |
| yconstfn std::uint8_t platform::FetchAlpha | ( | PixelType | px | ) |
取像素 Alpha 值。
参考自 YSLib::Drawing::blitAlphaBlend() , 以及 YSLib::Drawing::BlitTransparentLoop< _bPositiveScan >::operator()().

取不透明像素。
参考自 YSLib::Drawing::blitAlphaBlend() , 以及 YSLib::Drawing::BlitTransparentLoop< _bPositiveScan >::operator()().

| char * platform::getcwd_n | ( | char * | buf, |
| std::size_t | size | ||
| ) |
当第一参数非空时取当前工作目录复制至指定缓冲区中。
| buf | 缓冲区起始指针。 |
| size | 缓冲区长。 |
在文件 FileSystem.cpp 第 294 行定义.
参考 YB_LIKELY.
| std::uint64_t platform::GetHighResolutionTicks | ( | ) |
取高精度 tick 数。
参考 StartTicks().
参考自 YSLib::Timers::HighResolutionClock::now() , 以及 FPSCounter::Refresh().


| std::size_t platform::GetRootNameLength | ( | const_path_t | path | ) |
| std::uint32_t platform::GetTicks | ( | ) |
取 tick 数。
参考 StartTicks().
参考自 YSL_BEGIN::GetTickPoint().


| bool platform::InitVideo | ( | ) |
| bool platform::IsAbsolute | ( | const_path_t | path | ) |
| yconstexpr std::size_t platform::KeyBitsetWidth | ( | 32 | ) |
| bool platform::mkdirs | ( | const_path_t | cpath | ) |
| void platform::StartTicks | ( | ) |
开始 tick 计时。
参考 yunseq().
参考自 GetHighResolutionTicks(),GetTicks() , 以及 YSL_BEGIN::Init().


| void platform::terminate | ( | ) |
异常终止函数。
在文件 ycommon.cpp 第 37 行定义.
参考自 HandleFatalError(),InitializeEnviornment() , 以及 ShowFatalError().

| bool platform::truncate | ( | std::FILE * | fp, |
| std::size_t | size | ||
| ) |
截断文件至指定长度。
若文件不足指定长度,扩展并使用空字节填充;否则保留起始指定长度的字节。
在文件 FileSystem.cpp 第 381 行定义.

| char16_t * platform::u16getcwd_n | ( | char16_t * | buf, |
| std::size_t | size | ||
| ) |
当第一参数非空时取当前工作目录( UCS2-LE 编码)复制至指定缓冲区中。
| buf | 缓冲区起始指针。 |
| size | 缓冲区长。 |
在文件 FileSystem.cpp 第 302 行定义.
参考 MBCSToUCS2() , 以及 YB_LIKELY.
参考自 GetNowDirectory().


| int platform::uchdir | ( | const_path_t | path | ) |
切换当前工作路径至指定的 UTF-8 字符串。
在文件 FileSystem.cpp 第 345 行定义.
参考自 YSLib::IO::ChangeDirectory().

| bool platform::udirexists | ( | const_path_t | path | ) |
判断指定 UTF-8 路径的目录是否存在。
在文件 FileSystem.cpp 第 272 行定义.
参考 direxists().
参考自 YSLib::IO::Path::IsDirectory() , 以及 udirexists().


|
inline |
判断指定字符串为文件名的文件是否存在。
在文件 FileSystem.h 第 238 行定义.
参考 udirexists().

| bool platform::ufexists | ( | const char * | filename | ) |
判断指定 UTF-8 文件名的文件是否存在。
在文件 FileSystem.cpp 第 232 行定义.
参考 ystdex::fexists(),ufopen() , 以及 yconstraint.
参考自 GetDesktopDownHandle(),LoadConfiguration() , 以及 ufexists().


| bool platform::ufexists | ( | const char16_t * | filename | ) |
判断指定 UCS-2 文件名的文件是否存在。
在文件 FileSystem.cpp 第 250 行定义.
参考 ufopen() , 以及 yconstraint.

|
inline |
判断指定字符串为文件名的文件是否存在。
在文件 FileSystem.h 第 212 行定义.
参考 ufexists().

| std::FILE * platform::ufopen | ( | const char * | filename, |
| const char * | mode | ||
| ) |
以 UTF-8 文件名打开文件。
| filename | 文件名,意义同 std::fopen 。 |
| mode | 打开模式,基本语义同 ISO C99 ,具体行为取决于实现。 |
filename && mode && *mode != 0 。 在文件 FileSystem.cpp 第 188 行定义.
参考 yconstraint.
参考自 ufexists().

| std::FILE * platform::ufopen | ( | const char16_t * | filename, |
| const char16_t * | mode | ||
| ) |
以 UCS-2LE 文件名打开文件。
| filename | 文件名,意义同 std::fopen 。 |
| mode | 打开模式,基本语义同 ISO C99 ,具体行为取决于实现。 |
filename && mode && *mode != 0 。 在文件 FileSystem.cpp 第 209 行定义.
参考 yconstraint.
| int platform::uopen | ( | const char * | filename, |
| int | oflag | ||
| ) |
以 UTF-8 文件名无缓冲打开文件。
| filename | 文件名,意义同 POSIX ::open 。 |
| oflag | 打开标识,基本语义同 POSIX 2003 ,具体行为取决于实现。 |
filename 。 在文件 FileSystem.cpp 第 111 行定义.
参考 yconstraint.
| int platform::uopen | ( | const char * | filename, |
| int | oflag, | ||
| int | pmode | ||
| ) |
以 UTF-8 文件名无缓冲打开文件。
| filename | 文件名,意义同 POSIX ::open 。 |
| oflag | 打开标识,基本语义同 POSIX 2003 ,具体行为取决于实现。 |
| pmode | 打开模式,基本语义同 POSIX 2003 ,具体行为取决于实现。 |
filename 。 在文件 FileSystem.cpp 第 130 行定义.
参考 yconstraint.
| int platform::uopen | ( | const char16_t * | filename, |
| int | oflag | ||
| ) |
以 UCS-2LE 文件名无缓冲打开文件。
| filename | 文件名,意义同 POSIX ::open 。 |
| oflag | 打开标识,基本语义同 POSIX 2003 ,具体行为取决于实现。 |
filename 。 在文件 FileSystem.cpp 第 149 行定义.
参考 yconstraint.
| int platform::uopen | ( | const char16_t * | filename, |
| int | oflag, | ||
| int | pmode | ||
| ) |
以 UCS-2LE 文件名无缓冲打开文件。
| filename | 文件名,意义同 POSIX ::open 。 |
| oflag | 打开标识,基本语义同 POSIX 2003 ,具体行为取决于实现。 |
| pmode | 打开模式,基本语义同 POSIX 2003 ,具体行为取决于实现。 |
filename 。 在文件 FileSystem.cpp 第 168 行定义.
参考 yconstraint.
| void platform::WaitForInput | ( | ) |
等待任意按键。
参考 platform_ex::FetchKeyDownState() , 以及 platform_ex::UpdateKeyStates().
参考自 YSLib::UI::Console::Pause(),YDebug() , 以及 yprintf().


| void platform::YConsoleInit | ( | std::uint8_t | dspIndex, |
| Color | fc = ColorSpace::White, |
||
| Color | bc = ColorSpace::Black |
||
| ) |