Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 |
//============================================================================= // Object: The base class all objects. // This is a built-in Unreal class and it shouldn't be modified. //============================================================================= class Object native noexport; //============================================================================= // UObject variables. // Internal variables. var native private const int ObjectInternal[6]; var native const object Outer; var native const int ObjectFlags; var(Object) native const editconst name Name; var(Object) native const editconst class Class; //============================================================================= // Unreal base structures. // Object flags. const RF_Transactional = 0x00000001; // Supports editor undo/redo. const RF_Public = 0x00000004; // Can be referenced by external package files. const RF_Transient = 0x00004000; // Can't be saved or loaded. const RF_NotForClient = 0x00100000; // Don't load for game client. const RF_NotForServer = 0x00200000; // Don't load for game server. const RF_NotForEdit = 0x00400000; // Don't load for editor. // A globally unique identifier. struct Guid { var int A, B, C, D; }; // A point or direction vector in 3d space. struct Vector { var() config float X, Y, Z; }; // A plane definition in 3d space. struct Plane extends Vector { var() config float W; }; // An orthogonal rotation in 3d space. struct Rotator { var() config int Pitch, Yaw, Roll; }; // An arbitrary coordinate system in 3d space. struct Coords { var() config vector Origin, XAxis, YAxis, ZAxis; }; // A scale and sheering. struct Scale { var() config vector Scale; var() config float SheerRate; var() config enum ESheerAxis { SHEER_None, SHEER_XY, SHEER_XZ, SHEER_YX, SHEER_YZ, SHEER_ZX, SHEER_ZY, } SheerAxis; }; // A color. struct Color { var() config byte R, G, B, A; }; // A bounding box. struct BoundingBox { var vector Min, Max; var byte IsValid; }; // A bounding box sphere together. struct BoundingVolume extends boundingbox { var plane Sphere; }; //============================================================================= // Constants. const MaxInt = 0x7fffffff; const Pi = 3.1415926535897932; //============================================================================= // Basic native operators and functions. // Bool operators. native(129) static final preoperator bool ! ( bool A ); native(242) static final operator(24) bool == ( bool A, bool B ); native(243) static final operator(26) bool != ( bool A, bool B ); native(130) static final operator(30) bool && ( bool A, skip bool B ); native(131) static final operator(30) bool ^^ ( bool A, bool B ); native(132) static final operator(32) bool || ( bool A, skip bool B ); // Byte operators. native(133) static final operator(34) byte *= ( out byte A, byte B ); native(134) static final operator(34) byte /= ( out byte A, byte B ); native(135) static final operator(34) byte += ( out byte A, byte B ); native(136) static final operator(34) byte -= ( out byte A, byte B ); native(137) static final preoperator byte ++ ( out byte A ); native(138) static final preoperator byte -- ( out byte A ); native(139) static final postoperator byte ++ ( out byte A ); native(140) static final postoperator byte -- ( out byte A ); // Integer operators. native(141) static final preoperator int ~ ( int A ); native(143) static final preoperator int - ( int A ); native(144) static final operator(16) int * ( int A, int B ); native(145) static final operator(16) int / ( int A, int B ); native(146) static final operator(20) int + ( int A, int B ); native(147) static final operator(20) int - ( int A, int B ); native(148) static final operator(22) int << ( int A, int B ); native(149) static final operator(22) int >> ( int A, int B ); native(196) static final operator(22) int >>>( int A, int B ); native(150) static final operator(24) bool < ( int A, int B ); native(151) static final operator(24) bool > ( int A, int B ); native(152) static final operator(24) bool <= ( int A, int B ); native(153) static final operator(24) bool >= ( int A, int B ); native(154) static final operator(24) bool == ( int A, int B ); native(155) static final operator(26) bool != ( int A, int B ); native(156) static final operator(28) int & ( int A, int B ); native(157) static final operator(28) int ^ ( int A, int B ); native(158) static final operator(28) int | ( int A, int B ); native(159) static final operator(34) int *= ( out int A, float B ); native(160) static final operator(34) int /= ( out int A, float B ); native(161) static final operator(34) int += ( out int A, int B ); native(162) static final operator(34) int -= ( out int A, int B ); native(163) static final preoperator int ++ ( out int A ); native(164) static final preoperator int -- ( out int A ); native(165) static final postoperator int ++ ( out int A ); native(166) static final postoperator int -- ( out int A ); // Integer functions. native(167) static final Function int Rand ( int Max ); native(249) static final function int Min ( int A, int B ); native(250) static final function int Max ( int A, int B ); native(251) static final function int Clamp ( int V, int A, int B ); // Float operators. native(169) static final preoperator float - ( float A ); native(170) static final operator(12) float ** ( float A, float B ); native(171) static final operator(16) float * ( float A, float B ); native(172) static final operator(16) float / ( float A, float B ); native(173) static final operator(18) float % ( float A, float B ); native(174) static final operator(20) float + ( float A, float B ); native(175) static final operator(20) float - ( float A, float B ); native(176) static final operator(24) bool < ( float A, float B ); native(177) static final operator(24) bool > ( float A, float B ); native(178) static final operator(24) bool <= ( float A, float B ); native(179) static final operator(24) bool >= ( float A, float B ); native(180) static final operator(24) bool == ( float A, float B ); native(210) static final operator(24) bool ~= ( float A, float B ); native(181) static final operator(26) bool != ( float A, float B ); native(182) static final operator(34) float *= ( out float A, float B ); native(183) static final operator(34) float /= ( out float A, float B ); native(184) static final operator(34) float += ( out float A, float B ); native(185) static final operator(34) float -= ( out float A, float B ); // Float functions. native(186) static final function float Abs ( float A ); native(187) static final function float Sin ( float A ); native(188) static final function float Cos ( float A ); native(189) static final function float Tan ( float A ); native(190) static final function float Atan ( float A ); native(191) static final function float Exp ( float A ); native(192) static final function float Loge ( float A ); native(193) static final function float Sqrt ( float A ); native(194) static final function float Square( float A ); native(195) static final function float FRand (); native(244) static final function float FMin ( float A, float B ); native(245) static final function float FMax ( float A, float B ); native(246) static final function float FClamp( float V, float A, float B ); native(247) static final function float Lerp ( float Alpha, float A, float B ); native(248) static final function float Smerp ( float Alpha, float A, float B ); // Vector operators. native(211) static final preoperator vector - ( vector A ); native(212) static final operator(16) vector * ( vector A, float B ); native(213) static final operator(16) vector * ( float A, vector B ); native(296) static final operator(16) vector * ( vector A, vector B ); native(214) static final operator(16) vector / ( vector A, float B ); native(215) static final operator(20) vector + ( vector A, vector B ); native(216) static final operator(20) vector - ( vector A, vector B ); native(275) static final operator(22) vector << ( vector A, rotator B ); native(276) static final operator(22) vector >> ( vector A, rotator B ); native(217) static final operator(24) bool == ( vector A, vector B ); native(218) static final operator(26) bool != ( vector A, vector B ); native(219) static final operator(16) float Dot ( vector A, vector B ); native(220) static final operator(16) vector Cross ( vector A, vector B ); native(221) static final operator(34) vector *= ( out vector A, float B ); native(297) static final operator(34) vector *= ( out vector A, vector B ); native(222) static final operator(34) vector /= ( out vector A, float B ); native(223) static final operator(34) vector += ( out vector A, vector B ); native(224) static final operator(34) vector -= ( out vector A, vector B ); // Vector functions. native(225) static final function float VSize ( vector A ); native(226) static final function vector Normal ( vector A ); native(227) static final function Invert ( out vector X, out vector Y, out vector Z ); native(252) static final function vector VRand ( ); native(300) static final function vector MirrorVectorByNormal( vector Vect, vector Normal ); // Rotator operators and functions. native(142) static final operator(24) bool == ( rotator A, rotator B ); native(203) static final operator(26) bool != ( rotator A, rotator B ); native(287) static final operator(16) rotator * ( rotator A, float B ); native(288) static final operator(16) rotator * ( float A, rotator B ); native(289) static final operator(16) rotator / ( rotator A, float B ); native(290) static final operator(34) rotator *= ( out rotator A, float B ); native(291) static final operator(34) rotator /= ( out rotator A, float B ); native(316) static final operator(20) rotator + ( rotator A, rotator B ); native(317) static final operator(20) rotator - ( rotator A, rotator B ); native(318) static final operator(34) rotator += ( out rotator A, rotator B ); native(319) static final operator(34) rotator -= ( out rotator A, rotator B ); native(229) static final function GetAxes ( rotator A, out vector X, out vector Y, out vector Z ); native(230) static final function GetUnAxes ( rotator A, out vector X, out vector Y, out vector Z ); native(320) static final function rotator RotRand ( optional bool bRoll ); native static final function rotator OrthoRotation( vector X, vector Y, vector Z ); native static final function rotator Normalize( rotator Rot ); // String operators. native(112) static final operator(40) string $ ( coerce string A, coerce string B ); native(168) static final operator(40) string @ ( coerce string A, coerce string B ); native(115) static final operator(24) bool < ( string A, string B ); native(116) static final operator(24) bool > ( string A, string B ); native(120) static final operator(24) bool <= ( string A, string B ); native(121) static final operator(24) bool >= ( string A, string B ); native(122) static final operator(24) bool == ( string A, string B ); native(123) static final operator(26) bool != ( string A, string B ); native(124) static final operator(24) bool ~= ( string A, string B ); // String functions. native(125) static final function int Len ( coerce string S ); native(126) static final function int InStr ( coerce string S, coerce string t ); native(127) static final function string Mid ( coerce string S, int i, optional int j ); native(128) static final function string Left ( coerce string S, int i ); native(234) static final function string Right ( coerce string S, int i ); native(235) static final function string Caps ( coerce string S ); native(236) static final function string Chr ( int i ); native(237) static final function int Asc ( string S ); // Object operators. native(114) static final operator(24) bool == ( Object A, Object B ); native(119) static final operator(26) bool != ( Object A, Object B ); // Name operators. native(254) static final operator(24) bool == ( name A, name B ); native(255) static final operator(26) bool != ( name A, name B ); //============================================================================= // General functions. // Logging. native(231) final static function Log( coerce string S, optional name Tag ); native(232) final static function Warn( coerce string S ); native static function string Localize( string SectionName, string KeyName, string PackageName ); // Goto state and label. native(113) final function GotoState( optional name NewState, optional name Label ); native(281) final function bool IsInState( name TestState ); native(284) final function name GetStateName(); // Objects. native(258) static final function bool ClassIsChildOf( class TestClass, class ParentClass ); native(751) static final function int CriticalDelete (Object myObject); // DEUS_EX AJY native(303) final function bool IsA( name ClassName ); // Probe messages. native(117) final function Enable( name ProbeFunc ); native(118) final function Disable( name ProbeFunc ); // Properties. native final function string GetPropertyText( string PropName ); native final function SetPropertyText( string PropName, string PropValue ); native static final function name GetEnum( object E, int i ); native static final function object DynamicLoadObject( string ObjectName, class ObjectClass, optional bool MayFail ); // Configuration. native static final function string GetConfig( string ConfigSection, string ConfigKey); // DEUS_EX CAC native(536) final function SaveConfig(); native static final function StaticSaveConfig(); native static final function ResetConfig(); // DEUS_EX CNN - Iterators native(1001) final iterator function AllObjects(class<object> BaseClass, out object Object); // DEUS_EX STM - Clock/unclock for optimization testing native(1005) final function clock(out int cycles); native(1006) final function unclock(out int cycles); native(1007) final function float CyclesToSeconds(int cycles); // Return a random number within the given range. final function float RandRange( float Min, float Max ) { return Min + (Max - Min) * FRand(); } //============================================================================= // Engine notification functions. // // Called immediately when entering a state, while within // the GotoState call that caused the state change. // event BeginState(); // // Called immediately before going out of the current state, // while within the GotoState call that caused the state change. // event EndState(); // // DEUS_EX CNN - Sprintf function for simple string formatting // mostly useful for localized strings // // Format specifiers are - %s for string and %d for integer // (Though, really, %any_single_character will work) // Use %% to actually print the percent sign // final function string Sprintf (string fmt, optional coerce string s0, optional coerce string s1, optional coerce string s2, optional coerce string s3) { local string str, s[4]; local int pos, index; // init the parameters since we can't pass in parms in arrays s[0] = s0; s[1] = s1; s[2] = s2; s[3] = s3; // init the counters index = 0; pos = 0; str = ""; // parse the string do { pos = InStr(fmt, "%"); // end of string? if (pos == -1) { str = str $ fmt; fmt = ""; } else // else, parse the parameter { str = str $ Left(fmt, pos); // check for %% special case if ((pos < Len(fmt)) && (Mid(fmt, pos+1, 1) == "%")) str = str $ "%"; else str = str $ s[index++]; // trim the format string including the parameter fmt = Right(fmt, Len(fmt) - pos - 2); } } until ((pos == -1) || (index == 4)); // if there's anything left if (fmt != "") str = str $ fmt; return str; } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |