Go to the source code of this file.
Compounds | |
| struct | Stack |
Defines | |
| #define | M_PI (3.14159f) |
| #define | PI_2 (M_PI*2.0f) |
| #define | M_PI2 (PI_2) |
Typedefs | |
| typedef Stack | Stack |
Functions | |
| int32 | krand (void) |
| int32 | RandomRange (int32 range) |
| void | VectorRotateY (geVec3d *vec, float delta_ang, geVec3d *result) |
| void | StackInit (Stack *s) |
| void | StackReset (Stack *s) |
| void | StackPush (Stack *s, int32 data) |
| int32 | StackPop (Stack *s) |
| int32 | StackTop (Stack *s) |
| geBoolean | StackIsEmpty (Stack *s) |
| void | StackSetup (Stack *s) |
Variables | |
| int32 | randomseed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 65 of file _bot.c. References int32, and randomseed. Referenced by RandomRange().
00066 {
00067 randomseed = ((randomseed * 21 + 1) & 65535);
00068 return (randomseed);
00069 }
|
|
|
Definition at line 77 of file _bot.c. References int32, krand(), and U. Referenced by Bot_FindNewMoveVec(), Bot_FindRandomItem(), Bot_FindRandomTrack(), Bot_ModeChange(), Bot_ModeThinkAttack(), Bot_ModeThinkLedge(), Bot_ModeThinkUnstick(), Bot_Shoot(), and ChooseAction().
00078 {
00079 int32 rand_num;
00080 int32 value;
00081
00082 if (range <= 0)
00083 return(0);
00084
00085 rand_num = krand();
00086
00087 if (rand_num == 65535U)
00088 rand_num--;
00089
00090 // shift values to give more precision
00091 value = (rand_num << 14) / ((65535UL << 14) / range);
00092
00093 if (value >= range)
00094 value = range - 1;
00095
00096 return(value);
00097 }
|
|
|
Definition at line 19 of file _bot.c. References GE_RAM_ALLOCATE_ARRAY, int32, MAX_TRACKS, and s. Referenced by Bot_Create().
00020 {
00021 s->TOS = -1;
00022 s->Data = GE_RAM_ALLOCATE_ARRAY(int32, MAX_TRACKS);
00023 assert(s->Data);
00024 s->Size = MAX_TRACKS;
00025 }
|
|
|
Definition at line 60 of file _bot.c. Referenced by Bot_FinishTrack(), Bot_InitFindMultiTrack(), Bot_InitFindMultiTrackAway(), and Bot_MoveToPoint().
00061 {
00062 return (s->TOS <= -1);
00063 }
|
|
|
Definition at line 39 of file _bot.c. Referenced by Bot_FinishTrack().
|
|
||||||||||||
|
Definition at line 32 of file _bot.c. References s. Referenced by Bot_FindTrack(), Bot_FindTrackToGoal(), and Track_FindMultiTrack().
|
|
|
Definition at line 27 of file _bot.c. References s. Referenced by Bot_ActorDying(), Bot_ClearTrack(), Bot_Dying(), and Track_FindMultiTrack().
00028 {
00029 s->TOS = -1;
00030 }
|
|
|
|
|
|
Definition at line 52 of file _bot.c. Referenced by Bot_FindTrack(), Bot_FindTrackToGoal(), Bot_FinishTrack(), Bot_InitFindMultiTrack(), and Bot_InitFindMultiTrackAway().
|
|
||||||||||||||||
|
Definition at line 122 of file _bot.c. References geXForm3d_Rotate(), geXForm3d_RotateY(), and geXForm3d_SetIdentity(). Referenced by Bot_FindNewMoveVec().
00123 {
00124 geXForm3d XForm;
00125
00126 geXForm3d_SetIdentity(&XForm);
00127 geXForm3d_RotateY(&XForm, delta_ang);
00128 geXForm3d_Rotate(&XForm, vec, result);
00129 }
|
|
|
|
1.3.2