本文整理汇总了C++中CIN_PlayCinematic函数的典型用法代码示例。如果您正苦于以下问题:C++ CIN_PlayCinematic函数的具体用法?C++ CIN_PlayCinematic怎么用?C++ CIN_PlayCinematic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CIN_PlayCinematic函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CIN_PlayAllFrames
/*********
CIN_PlayAllFrames
arg - bink video filename
x - x origin for movie
y - y origin for movie
w - width of the movie
h - height of the movie
systemBits - bit rate for movie
keyBreakAllowed - if true, button press will end playback
Plays the target movie in full
*********/
bool CIN_PlayAllFrames( const char *arg, int x, int y, int w, int h, int systemBits, bool keyBreakAllowed )
{
bool retval;
Key_ClearStates();
// PC hack
qbInGameCinematicOnStandBy = qfalse;
#ifdef XBOX_DEMO
// When run from CDX, we can pause the timer during cutscenes:
extern void Demo_TimerPause( bool bPaused );
Demo_TimerPause( true );
#endif
int Handle = CIN_PlayCinematic(arg, x, y, w, h, systemBits, NULL);
if (Handle != -1)
{
while (CIN_RunCinematic(Handle) == FMV_PLAY && !(keyBreakAllowed && kg.anykeydown))
{
SCR_UpdateScreen ();
IN_Frame ();
Com_EventLoop ();
}
#ifdef _XBOX
// while (CIN_RunCinematic(Handle) == FMV_PLAY && !(keyBreakAllowed && !kg.anykeydown))
// {
// SCR_UpdateScreen ();
// IN_Frame ();
// Com_EventLoop ();
// }
#endif
CIN_StopCinematic(Handle);
}
#ifdef XBOX_DEMO
Demo_TimerPause( false );
#endif
retval =(keyBreakAllowed && kg.anykeydown);
Key_ClearStates();
// Soooper hack! Game ends up running for a couple frames after this cutscene. We don't want it to!
if( Q_stricmp(arg, "ja08") == 0 )
{
// Filth. Don't call Present until this gets cleared.
extern bool connectSwapOverride;
connectSwapOverride = true;
}
return retval;
}
示例2: CL_CgameSystemCalls
//.........这里部分代码省略.........
return Key_IsDown( args[1] );
case CG_KEY_GETCATCHER:
return Key_GetCatcher();
case CG_KEY_SETCATCHER:
// Don't allow the cgame module to close the console
Key_SetCatcher( args[1] | ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) );
return 0;
case CG_KEY_GETKEY:
return Key_GetKey( VMA(1) );
case CG_MEMSET:
Com_Memset( VMA(1), args[2], args[3] );
return 0;
case CG_MEMCPY:
Com_Memcpy( VMA(1), VMA(2), args[3] );
return 0;
case CG_STRNCPY:
strncpy( VMA(1), VMA(2), args[3] );
return args[1];
case CG_SIN:
return FloatAsInt( sin( VMF(1) ) );
case CG_COS:
return FloatAsInt( cos( VMF(1) ) );
case CG_ATAN2:
return FloatAsInt( atan2( VMF(1), VMF(2) ) );
case CG_SQRT:
return FloatAsInt( sqrt( VMF(1) ) );
case CG_FLOOR:
return FloatAsInt( floor( VMF(1) ) );
case CG_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
case CG_ACOS:
return FloatAsInt( Q_acos( VMF(1) ) );
case CG_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine( VMA(1) );
case CG_PC_LOAD_SOURCE:
return botlib_export->PC_LoadSourceHandle( VMA(1) );
case CG_PC_FREE_SOURCE:
return botlib_export->PC_FreeSourceHandle( args[1] );
case CG_PC_READ_TOKEN:
return botlib_export->PC_ReadTokenHandle( args[1], VMA(2) );
case CG_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine( args[1], VMA(2), VMA(3) );
case CG_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case CG_REAL_TIME:
return Com_RealTime( VMA(1) );
case CG_SNAPVECTOR:
Sys_SnapVector( VMA(1) );
return 0;
case CG_CIN_PLAYCINEMATIC:
return CIN_PlayCinematic(VMA(1), args[2], args[3], args[4], args[5], args[6]);
case CG_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case CG_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case CG_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case CG_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case CG_R_REMAP_SHADER:
re.RemapShader( VMA(1), VMA(2), VMA(3) );
return 0;
/*
case CG_LOADCAMERA:
return loadCamera(VMA(1));
case CG_STARTCAMERA:
startCamera(args[1]);
return 0;
case CG_GETCAMERAINFO:
return getCameraInfo(args[1], VMA(2), VMA(3));
*/
case CG_GET_ENTITY_TOKEN:
return re.GetEntityToken( VMA(1), args[2] );
case CG_R_INPVS:
return re.inPVS( VMA(1), VMA(2) );
default:
assert(0);
Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] );
}
return 0;
}
示例3: CL_CgameSystemCalls
//.........这里部分代码省略.........
return FloatAsInt(sqrt(VMF(1)));
case CG_FLOOR:
return FloatAsInt(floor(VMF(1)));
case CG_CEIL:
return FloatAsInt(ceil(VMF(1)));
case CG_ACOS:
return FloatAsInt(Q_acos(VMF(1)));
case CG_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine(VMA(1));
case CG_PC_LOAD_SOURCE:
return botlib_export->PC_LoadSourceHandle(VMA(1));
case CG_PC_FREE_SOURCE:
return botlib_export->PC_FreeSourceHandle(args[1]);
case CG_PC_READ_TOKEN:
return botlib_export->PC_ReadTokenHandle(args[1], VMA(2));
case CG_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine(args[1], VMA(2), VMA(3));
case CG_PC_UNREAD_TOKEN:
botlib_export->PC_UnreadLastTokenHandle(args[1]);
return 0;
case CG_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case CG_REAL_TIME:
return Com_RealTime(VMA(1));
case CG_SNAPVECTOR:
Sys_SnapVector(VMA(1));
return 0;
case CG_CIN_PLAYCINEMATIC:
return CIN_PlayCinematic(VMA(1), args[2], args[3], args[4], args[5], args[6]);
case CG_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case CG_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case CG_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case CG_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case CG_R_REMAP_SHADER:
re.RemapShader(VMA(1), VMA(2), VMA(3));
return 0;
case CG_TESTPRINTINT:
Com_Printf("%s%li\n", (char *)VMA(1), (long)args[2]);
return 0;
case CG_TESTPRINTFLOAT:
Com_Printf("%s%f\n", (char *)VMA(1), VMF(2));
return 0;
case CG_GET_ENTITY_TOKEN:
return re.GetEntityToken(VMA(1), args[2]);
case CG_INGAME_POPUP:
if (cls.state == CA_ACTIVE && !clc.demoplaying)
{
示例4: CL_UISystemCalls
//.........这里部分代码省略.........
case UI_GET_CDKEY:
CLUI_GetCDKey( VMA(1), args[2] );
return 0;
case UI_SET_CDKEY:
CLUI_SetCDKey( VMA(1) );
return 0;
case UI_SET_PBCLSTATUS:
return 0;
case UI_R_REGISTERFONT:
re.RegisterFont( VMA(1), args[2], VMA(3));
return 0;
case UI_MEMSET:
Com_Memset( VMA(1), args[2], args[3] );
return 0;
case UI_MEMCPY:
Com_Memcpy( VMA(1), VMA(2), args[3] );
return 0;
case UI_STRNCPY:
return (int)strncpy( VMA(1), VMA(2), args[3] );
case UI_SIN:
return FloatAsInt( sin( VMF(1) ) );
case UI_COS:
return FloatAsInt( cos( VMF(1) ) );
case UI_ATAN2:
return FloatAsInt( atan2( VMF(1), VMF(2) ) );
case UI_SQRT:
return FloatAsInt( sqrt( VMF(1) ) );
case UI_FLOOR:
return FloatAsInt( floor( VMF(1) ) );
case UI_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
case UI_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine( VMA(1) );
case UI_PC_LOAD_SOURCE:
return botlib_export->PC_LoadSourceHandle( VMA(1) );
case UI_PC_FREE_SOURCE:
return botlib_export->PC_FreeSourceHandle( args[1] );
case UI_PC_READ_TOKEN:
return botlib_export->PC_ReadTokenHandle( args[1], VMA(2) );
case UI_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine( args[1], VMA(2), VMA(3) );
case UI_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case UI_S_STARTBACKGROUNDTRACK:
S_StartBackgroundTrack( VMA(1), VMA(2));
return 0;
case UI_REAL_TIME:
return Com_RealTime( VMA(1) );
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf("UI_CIN_PlayCinematic\n");
return CIN_PlayCinematic(VMA(1), args[2], args[3], args[4], args[5], args[6]);
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case UI_R_REMAP_SHADER:
re.RemapShader( VMA(1), VMA(2), VMA(3) );
return 0;
case UI_VERIFY_CDKEY:
return CL_CDKeyValidate(VMA(1), VMA(2));
default:
Com_Error( ERR_DROP, "Bad UI system trap: %i", args[0] );
}
return 0;
}
示例5: CL_UISystemCalls
//.........这里部分代码省略.........
return Parse_LoadSourceHandle( (char*)VMA(1) );
case UI_PARSE_FREE_SOURCE:
return Parse_FreeSourceHandle( args[1] );
case UI_PARSE_READ_TOKEN:
return Parse_ReadTokenHandle( args[1], (pc_token_t*)VMA(2) );
case UI_PARSE_SOURCE_FILE_AND_LINE:
return Parse_SourceFileAndLine( args[1], (char*)VMA(2), (int*)VMA(3) );
case UI_PC_ADD_GLOBAL_DEFINE:
return Parse_AddGlobalDefine((char*)VMA(1));
case UI_PC_REMOVE_ALL_GLOBAL_DEFINES:
Parse_RemoveAllGlobalDefines();
return 0;
case UI_PC_LOAD_SOURCE:
return Parse_LoadSourceHandle((char*)VMA(1));
case UI_PC_FREE_SOURCE:
return Parse_FreeSourceHandle(args[1]);
case UI_PC_READ_TOKEN:
return Parse_ReadTokenHandle(args[1], (pc_token_t*)VMA(2));
case UI_PC_SOURCE_FILE_AND_LINE:
return Parse_SourceFileAndLine(args[1], (char*)VMA(2), (int*)VMA(3));
case UI_PC_UNREAD_TOKEN:
Parse_UnreadLastTokenHandle(args[1]);
return 0;
case UI_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case UI_S_STARTBACKGROUNDTRACK:
//S_StartBackgroundTrack(VMA(1), VMA(2), args[3]); //----(SA) added fadeup time
S_StartBackgroundTrack( (char*)VMA(1), (char*)VMA(2));
return 0;
case UI_REAL_TIME:
return Com_RealTime((qtime_t*)VMA(1));
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf("UI_CIN_PlayCinematic\n");
return CIN_PlayCinematic((char*)VMA(1), args[2], args[3], args[4], args[5], args[6]);
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case UI_R_REMAP_SHADER:
re.RemapShader((char*)VMA(1), (char*)VMA(2), (char*)VMA(3));
return 0;
case UI_CL_GETLIMBOSTRING:
return CL_GetLimboString(args[1], (char*)VMA(2));
case UI_CL_TRANSLATE_STRING:
CL_TranslateString((char*)VMA(1), (char*)VMA(2));
return 0;
case UI_CHECKAUTOUPDATE:
#if !defined(UPDATE_SERVER)
CL_CheckAutoUpdate();
#endif
return 0;
case UI_GET_AUTOUPDATE:
#if !defined(UPDATE_SERVER)
CL_GetAutoUpdate();
#endif
return 0;
case UI_OPENURL:
CL_OpenURL((char *)VMA(1));
return 0;
示例6: CL_CgameSystemCalls
//.........这里部分代码省略.........
case CG_KEY_ISDOWN:
return Key_IsDown( args[ 1 ] );
case CG_KEY_GETCATCHER:
return Key_GetCatcher();
case CG_KEY_SETCATCHER:
Key_SetCatcher( args[ 1 ] );
return 0;
case CG_KEY_GETKEY:
return Key_GetKey( VMA( 1 ) );
case CG_KEY_GETOVERSTRIKEMODE:
return Key_GetOverstrikeMode();
case CG_KEY_SETOVERSTRIKEMODE:
Key_SetOverstrikeMode( args[ 1 ] );
return 0;
case CG_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case CG_REAL_TIME:
return Com_RealTime( VMA( 1 ) );
case CG_SNAPVECTOR:
Q_SnapVector( VMA( 1 ) );
return 0;
case CG_CIN_PLAYCINEMATIC:
return CIN_PlayCinematic( VMA( 1 ), args[ 2 ], args[ 3 ], args[ 4 ], args[ 5 ], args[ 6 ] );
case CG_CIN_STOPCINEMATIC:
return CIN_StopCinematic( args[ 1 ] );
case CG_CIN_RUNCINEMATIC:
return CIN_RunCinematic( args[ 1 ] );
case CG_CIN_DRAWCINEMATIC:
CIN_DrawCinematic( args[ 1 ] );
return 0;
case CG_CIN_SETEXTENTS:
CIN_SetExtents( args[ 1 ], args[ 2 ], args[ 3 ], args[ 4 ], args[ 5 ] );
return 0;
case CG_R_REMAP_SHADER:
re.RemapShader( VMA( 1 ), VMA( 2 ), VMA( 3 ) );
return 0;
case CG_LOADCAMERA:
//return loadCamera(args[1], VMA(2));
return 0;
case CG_STARTCAMERA:
//if(args[1] == 0)
//{ // CAM_PRIMARY
// cl.cameraMode = qtrue;
//}
//startCamera(args[1], args[2]);
return 0;
case CG_STOPCAMERA:
示例7: CL_UISystemCalls
//.........这里部分代码省略.........
case UI_SIN:
return FloatAsInt( sin( VMF(1) ) );
case UI_COS:
return FloatAsInt( cos( VMF(1) ) );
case UI_ATAN2:
return FloatAsInt( atan2( VMF(1), VMF(2) ) );
case UI_SQRT:
return FloatAsInt( sqrt( VMF(1) ) );
case UI_FLOOR:
return FloatAsInt( floor( VMF(1) ) );
case UI_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
case UI_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine( (char *)VMA(1) );
case UI_PC_LOAD_SOURCE:
return botlib_export->PC_LoadSourceHandle( (const char *)VMA(1) );
case UI_PC_FREE_SOURCE:
return botlib_export->PC_FreeSourceHandle( args[1] );
case UI_PC_READ_TOKEN:
return botlib_export->PC_ReadTokenHandle( args[1], (struct pc_token_s *)VMA(2) );
case UI_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine( args[1], (char *)VMA(2), (int *)VMA(3) );
case UI_PC_LOAD_GLOBAL_DEFINES:
return botlib_export->PC_LoadGlobalDefines ( (char *)VMA(1) );
case UI_PC_REMOVE_ALL_GLOBAL_DEFINES:
botlib_export->PC_RemoveAllGlobalDefines ( );
return 0;
case UI_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case UI_S_STARTBACKGROUNDTRACK:
S_StartBackgroundTrack( (const char *)VMA(1), (const char *)VMA(2), qfalse);
return 0;
case UI_REAL_TIME:
return Com_RealTime( (struct qtime_s *)VMA(1) );
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf("UI_CIN_PlayCinematic\n");
return CIN_PlayCinematic((const char *)VMA(1), args[2], args[3], args[4], args[5], args[6]);
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case UI_R_REMAP_SHADER:
re.RemapShader( (const char *)VMA(1), (const char *)VMA(2), (const char *)VMA(3) );
return 0;
#ifdef USE_CD_KEY
case UI_VERIFY_CDKEY:
return CL_CDKeyValidate((const char *)VMA(1), (const char *)VMA(2));
#endif // USE_CD_KEY
case UI_SP_REGISTER:
return !!SP_Register((const char *)VMA(1),SP_REGISTER_MENU);
case UI_SP_GETSTRINGTEXTSTRING:
const char* text;
assert(VMA(1));
assert(VMA(2));
text = SP_GetStringTextString((const char *) VMA(1));
Q_strncpyz( (char *) VMA(2), text, args[3] );
return qtrue;
/*
Ghoul2 Insert Start
*/
case UI_G2_ANGLEOVERRIDE:
return G2API_SetBoneAngles(*((CGhoul2Info_v *)VMA(1)), args[2], (const char *)VMA(3), (float *)VMA(4), args[5],
(const Eorientations) args[6], (const Eorientations) args[7], (const Eorientations) args[8],
(qhandle_t *)VMA(9), args[10], args[11] );
/*
Ghoul2 Insert End
*/
default:
Com_Error( ERR_DROP, "Bad UI system trap: %i", args[0] );
}
return 0;
}
示例8: CL_UISystemCalls
//.........这里部分代码省略.........
case UI_R_REGISTERFONT:
re.RegisterFontVM( VMA( 1 ), VMA( 2 ), args[ 3 ], VMA( 4 ) );
return 0;
case UI_PARSE_ADD_GLOBAL_DEFINE:
return Parse_AddGlobalDefine( VMA( 1 ) );
case UI_PARSE_LOAD_SOURCE:
return Parse_LoadSourceHandle( VMA( 1 ) );
case UI_PARSE_FREE_SOURCE:
return Parse_FreeSourceHandle( args[ 1 ] );
case UI_PARSE_READ_TOKEN:
return Parse_ReadTokenHandle( args[ 1 ], VMA( 2 ) );
case UI_PARSE_SOURCE_FILE_AND_LINE:
return Parse_SourceFileAndLine( args[ 1 ], VMA( 2 ), VMA( 3 ) );
case UI_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case UI_S_STARTBACKGROUNDTRACK:
//S_StartBackgroundTrack(VMA(1), VMA(2), args[3]); //----(SA) added fadeup time
S_StartBackgroundTrack( VMA( 1 ), VMA( 2 ) );
return 0;
case UI_REAL_TIME:
return Com_RealTime( VMA( 1 ) );
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf( "UI_CIN_PlayCinematic\n" );
return CIN_PlayCinematic( VMA( 1 ), args[ 2 ], args[ 3 ], args[ 4 ], args[ 5 ], args[ 6 ] );
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic( args[ 1 ] );
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic( args[ 1 ] );
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic( args[ 1 ] );
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents( args[ 1 ], args[ 2 ], args[ 3 ], args[ 4 ], args[ 5 ] );
return 0;
case UI_R_REMAP_SHADER:
re.RemapShader( VMA( 1 ), VMA( 2 ), VMA( 3 ) );
return 0;
case UI_GETHUNKDATA:
Com_GetHunkInfo( VMA( 1 ), VMA( 2 ) );
return 0;
case UI_QUOTESTRING:
Cmd_QuoteStringBuffer( VMA( 1 ), VMA( 2 ), args[ 3 ] );
return 0;
#if defined( USE_REFENTITY_ANIMATIONSYSTEM )
case UI_R_REGISTERANIMATION:
return re.RegisterAnimation( VMA( 1 ) );
示例9: CL_UISystemCalls
//.........这里部分代码省略.........
return LAN_ServerIsVisible(args[1], args[2]);
case UI_LAN_UPDATEVISIBLEPINGS:
return LAN_UpdateVisiblePings(args[1]);
case UI_LAN_RESETPINGS:
LAN_ResetPings(args[1]);
return 0;
case UI_LAN_SERVERSTATUS:
return LAN_GetServerStatus(VMA(1), VMA(2), args[3]);
case UI_LAN_SERVERISINFAVORITELIST:
return LAN_ServerIsInFavoriteList(args[1], args[2]);
case UI_LAN_COMPARESERVERS:
return LAN_CompareServers(args[1], args[2], args[3], args[4], args[5]);
case UI_MEMORY_REMAINING:
return Hunk_MemoryRemaining();
case UI_R_REGISTERFONT:
re.RegisterFont(VMA(1), args[2], VMA(3), (args[4] == qtrue));
return 0;
case UI_MEMSET:
return (intptr_t)memset(VMA(1), args[2], args[3]);
case UI_MEMCPY:
return (intptr_t)memcpy(VMA(1), VMA(2), args[3]);
case UI_STRNCPY:
return (intptr_t)strncpy(VMA(1), VMA(2), args[3]);
case UI_SIN:
return FloatAsInt(sin(VMF(1)));
case UI_COS:
return FloatAsInt(cos(VMF(1)));
case UI_ATAN2:
return FloatAsInt(atan2(VMF(1), VMF(2)));
case UI_SQRT:
return FloatAsInt(sqrt(VMF(1)));
case UI_FLOOR:
return FloatAsInt(floor(VMF(1)));
case UI_CEIL:
return FloatAsInt(ceil(VMF(1)));
case UI_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine(VMA(1));
case UI_PC_REMOVE_ALL_GLOBAL_DEFINES:
botlib_export->PC_RemoveAllGlobalDefines();
return 0;
case UI_PC_LOAD_SOURCE:
return botlib_export->PC_LoadSourceHandle(VMA(1));
case UI_PC_FREE_SOURCE:
return botlib_export->PC_FreeSourceHandle(args[1]);
case UI_PC_READ_TOKEN:
return botlib_export->PC_ReadTokenHandle(args[1], VMA(2));
case UI_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine(args[1], VMA(2), VMA(3));
case UI_PC_UNREAD_TOKEN:
botlib_export->PC_UnreadLastTokenHandle(args[1]);
return 0;
case UI_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case UI_S_STARTBACKGROUNDTRACK:
S_StartBackgroundTrack(VMA(1), VMA(2), args[3]); // added fadeup time
return 0;
case UI_REAL_TIME:
return Com_RealTime(VMA(1));
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf("UI_CIN_PlayCinematic\n");
return CIN_PlayCinematic(VMA(1), args[2], args[3], args[4], args[5], args[6]);
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case UI_R_REMAP_SHADER:
re.RemapShader(VMA(1), VMA(2), VMA(3));
return 0;
case UI_CL_GETLIMBOSTRING:
return CL_GetLimboString(args[1], VMA(2));
case UI_CL_TRANSLATE_STRING:
CL_TranslateStringMod(VMA(1), VMA(2));
return 0;
case UI_CHECKAUTOUPDATE:
CL_RequestMasterData(qfalse);
return 0;
case UI_GET_AUTOUPDATE:
Com_GetAutoUpdate();
return 0;
case UI_OPENURL:
CL_OpenURL((const char *)VMA(1));
return 0;
case UI_GETHUNKDATA:
Com_GetHunkInfo(VMA(1), VMA(2));
return 0;
// obsolete
case UI_SET_PBCLSTATUS:
case UI_SET_PBSVSTATUS:
return 0;
default:
Com_Error(ERR_DROP, "Bad UI system trap: %ld", (long int) args[0]);
}
}
示例10: trap_CIN_PlayCinematic
// this returns a handle. arg0 is the name in the format "idlogo.roq", set arg1 to NULL, alteredstates to qfalse (do not alter gamestate)
int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits, const char *psAudioFile) {
// return syscall(UI_CIN_PLAYCINEMATIC, arg0, xpos, ypos, width, height, bits, psAudioFile);
return CIN_PlayCinematic( arg0, xpos, ypos, width, height, bits, psAudioFile );
}
示例11: CL_CgameSystemCalls
//.........这里部分代码省略.........
case CG_KEY_KEYNUMTOSTRINGBUF:
Key_KeynumToStringBuf( args[1], (char*)VMA(2), args[3] );
return 0;
case CG_KEY_GETBINDINGBUF:
Key_GetBindingBuf( args[1], (char*)VMA(2), args[3] );
return 0;
case CG_KEY_SETBINDING:
Key_SetBinding( args[1], (const char*)VMA(2) );
return 0;
case CG_PARSE_ADD_GLOBAL_DEFINE:
return Parse_AddGlobalDefine( (char*)VMA(1) );
case CG_PARSE_LOAD_SOURCE:
return Parse_LoadSourceHandle( (const char*)VMA(1) );
case CG_PARSE_FREE_SOURCE:
return Parse_FreeSourceHandle( args[1] );
case CG_PARSE_READ_TOKEN:
return Parse_ReadTokenHandle( args[1], (pc_token_t*)VMA(2) );
case CG_PARSE_SOURCE_FILE_AND_LINE:
return Parse_SourceFileAndLine( args[1], (char*)VMA(2), (int*)VMA(3) );
case CG_KEY_SETOVERSTRIKEMODE:
Key_SetOverstrikeMode( (bool)args[1] );
return 0;
case CG_KEY_GETOVERSTRIKEMODE:
return Key_GetOverstrikeMode( );
case CG_FIELD_COMPLETELIST:
Field_CompleteList( (char*)VMA(1) );
return 0;
case CG_MEMSET:
::memset( VMA(1), args[2], args[3] );
return 0;
case CG_MEMCPY:
::memcpy( VMA(1), VMA(2), args[3] );
return 0;
case CG_STRNCPY:
safe_strncpy( (char*)VMA(1), (const char*)VMA(2), args[3] );
return args[1];
case CG_SIN:
return FloatAsInt( sin( VMF(1) ) );
case CG_COS:
return FloatAsInt( cos( VMF(1) ) );
case CG_ATAN2:
return FloatAsInt( atan2( VMF(1), VMF(2) ) );
case CG_SQRT:
return FloatAsInt( sqrt( VMF(1) ) );
case CG_FLOOR:
return FloatAsInt( floor( VMF(1) ) );
case CG_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
case CG_ACOS:
return FloatAsInt( Q_acos( VMF(1) ) );
case CG_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case CG_REAL_TIME:
return Com_RealTime( (qtime_t*)VMA(1) );
case CG_SNAPVECTOR:
Q_SnapVector((float*)VMA(1));
return 0;
case CG_CIN_PLAYCINEMATIC:
return CIN_PlayCinematic((const char*)VMA(1), args[2], args[3], args[4], args[5], args[6]);
case CG_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case CG_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case CG_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case CG_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case CG_R_REMAP_SHADER:
re.RemapShader( (const char*)VMA(1), (const char*)VMA(2), (const char*)VMA(3) );
return 0;
case CG_GET_ENTITY_TOKEN:
return re.GetEntityToken( (char*)VMA(1), args[2] );
case CG_R_INPVS:
return re.inPVS( (const float*)VMA(1), (const float*)VMA(2) );
default:
assert(0);
Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] );
}
return 0;
}
示例12: CL_CgameSystemCalls
//.........这里部分代码省略.........
return 0;
case CG_G2_LISTBONES:
re.G2API_ListBones( (CGhoul2Info *) VMA(1), args[2]);
return 0;
case CG_G2_HAVEWEGHOULMODELS:
return re.G2API_HaveWeGhoul2Models( *((CGhoul2Info_v *)VMA(1)) );
case CG_G2_SETMODELS:
re.G2API_SetGhoul2ModelIndexes( *((CGhoul2Info_v *)VMA(1)),(qhandle_t *)VMA(2),(qhandle_t *)VMA(3));
return 0;
/*
Ghoul2 Insert End
*/
case CG_R_GET_LIGHT_STYLE:
re.GetLightStyle(args[1], (byte*) VMA(2) );
return 0;
case CG_R_SET_LIGHT_STYLE:
re.SetLightStyle(args[1], args[2] );
return 0;
case CG_R_GET_BMODEL_VERTS:
re.GetBModelVerts( args[1], (float (*)[3])VMA(2), (float *)VMA(3) );
return 0;
case CG_R_WORLD_EFFECT_COMMAND:
re.WorldEffectCommand( (const char *) VMA(1) );
return 0;
case CG_CIN_PLAYCINEMATIC:
return CIN_PlayCinematic( (const char *) VMA(1), args[2], args[3], args[4], args[5], args[6], (const char *) VMA(7));
case CG_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case CG_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case CG_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case CG_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case CG_Z_MALLOC:
return (intptr_t)Z_Malloc(args[1], (memtag_t) args[2], qfalse);
case CG_Z_FREE:
Z_Free((void *) VMA(1));
return 0;
case CG_UI_SETACTIVE_MENU:
UI_SetActiveMenu((const char *) VMA(1),NULL);
return 0;
case CG_UI_MENU_OPENBYNAME:
Menus_OpenByName((const char *) VMA(1));
return 0;
case CG_UI_MENU_RESET:
Menu_Reset();
示例13: CL_UISystemCalls
//.........这里部分代码省略.........
case UI_LAN_GETSERVERPING:
return LAN_GetServerPing( args[1], args[2] );
case UI_LAN_MARKSERVERVISIBLE:
LAN_MarkServerVisible( args[1], args[2], args[3] );
return 0;
case UI_LAN_SERVERISVISIBLE:
return LAN_ServerIsVisible( args[1], args[2] );
case UI_LAN_UPDATEVISIBLEPINGS:
return LAN_UpdateVisiblePings( args[1] );
case UI_LAN_RESETPINGS:
LAN_ResetPings( args[1] );
return 0;
case UI_LAN_SERVERSTATUS:
return LAN_GetServerStatus( VMA(1), VMA(2), args[3] );
case UI_LAN_COMPARESERVERS:
return LAN_CompareServers( args[1], args[2], args[3], args[4], args[5] );
case UI_MEMORY_REMAINING:
return Hunk_MemoryRemaining();
case UI_R_REGISTERFONT:
re.RegisterFont( VMA(1), args[2], VMA(3));
return 0;
case UI_MEMSET:
Com_Memset( VMA(1), args[2], args[3] );
return 0;
case UI_MEMCPY:
Com_Memcpy( VMA(1), VMA(2), args[3] );
return 0;
case UI_STRNCPY:
strncpy( VMA(1), VMA(2), args[3] );
return args[1];
case UI_SIN:
return FloatAsInt( sin( VMF(1) ) );
case UI_COS:
return FloatAsInt( cos( VMF(1) ) );
case UI_ATAN2:
return FloatAsInt( atan2( VMF(1), VMF(2) ) );
case UI_SQRT:
return FloatAsInt( sqrt( VMF(1) ) );
case UI_FLOOR:
return FloatAsInt( floor( VMF(1) ) );
case UI_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
case UI_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case UI_S_STARTBACKGROUNDTRACK:
S_StartBackgroundTrack( VMA(1), VMA(2));
return 0;
case UI_REAL_TIME:
return Com_RealTime( VMA(1) );
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf("UI_CIN_PlayCinematic\n");
return CIN_PlayCinematic(VMA(1), args[2], args[3], args[4], args[5], args[6]);
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case UI_R_REMAP_SHADER:
re.RemapShader( VMA(1), VMA(2), VMA(3) );
return 0;
default:
Com_Error( ERR_DROP, "Bad UI system trap: %ld", (long int) args[0] );
}
return 0;
}
示例14: CL_CgameSystemCalls
//.........这里部分代码省略.........
case CG_CEIL:
return FloatAsInt( ceil( VMF(1) ) );
case CG_ACOS: return FloatAsInt( Q_acos( VMF(1) ) );
case CG_FMOD: return FloatAsInt( fmod( VMF(1),VMF(2) ) );
case CG_POW: return FloatAsInt( pow( VMF(1),VMF(2) ) );
case CG_ATAN: return FloatAsInt( atan( VMF(1) ) );
case CG_TAN: return FloatAsInt( tan( VMF(1)) );
case CG_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine( VMA(1) );
case CG_PC_LOAD_SOURCE:
return botlib_export->PC_LoadSourceHandle( VMA(1) );
case CG_PC_FREE_SOURCE:
return botlib_export->PC_FreeSourceHandle( args[1] );
case CG_PC_READ_TOKEN:
return botlib_export->PC_ReadTokenHandle( args[1], VMA(2) );
case CG_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine( args[1], VMA(2), VMA(3) );
case CG_S_STOPBACKGROUNDTRACK:
S_StopBackgroundTrack();
return 0;
case CG_REAL_TIME:
return Com_RealTime( VMA(1) );
case CG_SNAPVECTOR:
Sys_SnapVector( VMA(1) );
return 0;
case CG_UPDATEGAMESTATE:
return CL_UpdateGameState( VMA(1) );
case CG_CIN_PLAYCINEMATIC:
return CIN_PlayCinematic(VMA(1), args[2], args[3], args[4], args[5], args[6]);
case CG_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case CG_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case CG_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case CG_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case CG_R_REMAP_SHADER:
//ToDo: remove this trap
return 0;
/*
case CG_LOADCAMERA:
return loadCamera(VMA(1));
case CG_STARTCAMERA:
startCamera(args[1]);
return 0;
case CG_GETCAMERAINFO:
return getCameraInfo(args[1], VMA(2), VMA(3));
*/
case CG_GET_ENTITY_TOKEN:
return re.GetEntityToken( VMA(1), args[2] );
示例15: CL_UISystemCalls
//.........这里部分代码省略.........
case UI_CVAR_VARIABLEVALUE:
return FloatAsInt( Cvar_VariableValue( (const char *) VMA(1) ) );
case UI_FS_GETFILELIST:
return FS_GetFileList( (const char *) VMA(1), (const char *) VMA(2), (char *) VMA(3), args[4] );
case UI_KEY_SETCATCHER:
Key_SetCatcher( args[1] );
return 0;
case UI_KEY_CLEARSTATES:
Key_ClearStates();
return 0;
case UI_R_SETCOLOR:
re.SetColor( (const float *) VMA(1) );
return 0;
case UI_R_DRAWSTRETCHPIC:
re.DrawStretchPic( VMF(1), VMF(2), VMF(3), VMF(4), VMF(5), VMF(6), VMF(7), VMF(8), args[9] );
return 0;
case UI_CVAR_VARIABLESTRINGBUFFER:
Cvar_VariableStringBuffer( (const char *) VMA(1), (char *) VMA(2), args[3] );
return 0;
case UI_R_MODELBOUNDS:
re.ModelBounds( args[1], (float *) VMA(2),(float *) VMA(3) );
return 0;
case UI_R_CLEARSCENE:
re.ClearScene();
return 0;
// case UI_KEY_GETOVERSTRIKEMODE:
// return Key_GetOverstrikeMode();
// return 0;
// case UI_PC_READ_TOKEN:
// return PC_ReadTokenHandle( args[1], VMA(2) );
// case UI_PC_SOURCE_FILE_AND_LINE:
// return PC_SourceFileAndLine( args[1], VMA(2), VMA(3) );
case UI_KEY_GETCATCHER:
return Key_GetCatcher();
case UI_MILLISECONDS:
return Sys_Milliseconds();
case UI_S_REGISTERSOUND:
return S_RegisterSound((const char *) VMA(1));
case UI_S_STARTLOCALSOUND:
S_StartLocalSound( args[1], args[2] );
return 0;
// case UI_R_REGISTERFONT:
// re.RegisterFont( VMA(1), args[2], VMA(3));
// return 0;
case UI_CIN_PLAYCINEMATIC:
Com_DPrintf("UI_CIN_PlayCinematic\n");
return CIN_PlayCinematic((const char *)VMA(1), args[2], args[3], args[4], args[5], args[6], (const char *)VMA(7));
case UI_CIN_STOPCINEMATIC:
return CIN_StopCinematic(args[1]);
case UI_CIN_RUNCINEMATIC:
return CIN_RunCinematic(args[1]);
case UI_CIN_DRAWCINEMATIC:
CIN_DrawCinematic(args[1]);
return 0;
case UI_KEY_SETBINDING:
Key_SetBinding( args[1], (const char *) VMA(2) );
return 0;
case UI_KEY_KEYNUMTOSTRINGBUF:
Key_KeynumToStringBuf( args[1],(char *) VMA(2), args[3] );
return 0;
case UI_CIN_SETEXTENTS:
CIN_SetExtents(args[1], args[2], args[3], args[4], args[5]);
return 0;
case UI_KEY_GETBINDINGBUF:
Key_GetBindingBuf( args[1], (char *) VMA(2), args[3] );
return 0;
default:
Com_Error( ERR_DROP, "Bad UI system trap: %i", args[0] );
}
return 0;
}