本文整理汇总了C++中CheatConsoleT类的典型用法代码示例。如果您正苦于以下问题:C++ CheatConsoleT类的具体用法?C++ CheatConsoleT怎么用?C++ CheatConsoleT使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CheatConsoleT类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheatIF_MT_Draw
void CheatIF_MT_Draw(MDFN_Surface *surface, const MDFN_Rect *src_rect)
{
if(!isactive)
return;
if(src_rect->w < 342 || src_rect->h < 342)
CheatConsole.SetFont(MDFN_FONT_5x7);
else if(src_rect->w < 512 || src_rect->h < 480)
CheatConsole.SetFont(MDFN_FONT_6x13_12x13);
else
CheatConsole.SetFont(MDFN_FONT_9x18_18x18);
CheatConsole.Draw(surface, src_rect);
}
示例2: CHEAT_gets
static void CHEAT_gets(char *s, int size)
{
char* lpt = NULL;
//
//
//
MDFND_LockMutex(CheatMutex);
while(!pending_text && !need_thread_exit)
{
MDFND_WaitCond(CheatCond, CheatMutex);
}
lpt = pending_text;
pending_text = NULL;
MDFND_UnlockMutex(CheatMutex);
//
//
//
if(lpt)
{
strncpy(s, lpt, size - 1);
s[size - 1] = 0;
free(lpt);
CheatConsole.AppendLastLine(s);
}
if(need_thread_exit)
{
puts("WHEEE");
throw(0); // Sloppy laziness, but it works! SWEAT PANTS OF PRAGMATISM.
}
}
示例3: CHEAT_printf
static void CHEAT_printf(const char *format, ...)
{
char temp[2048];
va_list ap;
va_start(ap, format);
trio_vsnprintf(temp, 2048, format, ap);
va_end(ap);
CheatConsole.WriteLine(temp);
}
示例4: CHEAT_gets
static void CHEAT_gets(char *s, int size)
{
SDL_mutexP(CheatMutex);
while(!pending_text)
{
SDL_mutexV(CheatMutex);
SDL_Delay(5);
SDL_mutexP(CheatMutex);
}
strncpy(s, pending_text, size - 1);
s[size - 1] = 0;
free(pending_text);
pending_text = NULL;
CheatConsole.AppendLastLine((UTF8*)s);
SDL_mutexV(CheatMutex);
}
示例5: CHEAT_puts
static void CHEAT_puts(const char *string)
{
CheatConsole.WriteLine(string);
}
示例6: CheatIF_MT_EventHook
int CheatIF_MT_EventHook(const SDL_Event *event)
{
if(!isactive) return(1);
return(CheatConsole.Event(event));
}
示例7: DrawCheatConsole
void DrawCheatConsole(SDL_Surface *surface, const SDL_Rect *src_rect)
{
if(!isactive) return;
CheatConsole.Draw(surface, src_rect);
}