00001 /********************************************************************************************* 00002 * 00003 * ai_init.cpp 00004 * 00005 * Re-Volt (Generic) Copyright (c) Probe Entertainment 1998 00006 * 00007 * Contents: 00008 * Initialisation (and destruction) functions for object AIs 00009 * This is a companion file to obj_init.cpp that intialises the object structure 00010 * and calls the appropriate AI init function 00011 * 00012 ********************************************************************************************* 00013 * 00014 * 01/07/98 Matt Taylor 00015 * File inception. 00016 * 00017 *********************************************************************************************/ 00018 00019 #include "revolt.h" 00020 #ifndef _PSX 00021 #include "main.h" 00022 #endif 00023 #include "geom.h" 00024 #include "particle.h" 00025 #include "model.h" 00026 #include "aerial.h" 00027 #include "newcoll.h" 00028 #include "body.h" 00029 #include "car.h" 00030 #include "ctrlread.h" 00031 #include "object.h" 00032 #include "player.h" 00033 #include "ai.h" 00034 #include "ai_init.h" 00035 #ifdef _PC 00036 #include "sfx.h" 00037 #endif 00038 00039 // 00040 // Static variables 00041 // 00042 00043 00044 // 00045 // Global variables 00046 // 00047 00048 00049 // 00050 // Global function prototypes 00051 // 00052 00053 bool AI_InitPlayerAI(PLAYER *player); 00054 00055 00056 //-------------------------------------------------------------------------------------------------------------------------- 00057 00058 // 00059 // AI_InitPlayerAI 00060 // 00061 // Initialises the player's "AI" (sound handling, etc). Requires a player structure be passed to the function, rather than 00062 // an object structure. This should be called from PLR_CreatePlayer. 00063 // 00064 00065 bool AI_InitPlayerAI(PLAYER *player) 00066 { 00067 00068 #ifdef _PC 00069 00070 // create engine sfx 00071 00072 player->car.SfxEngine = CreateSfx3D(SFX_ENGINE, 0, 0, TRUE, &player->car.Body->Centre.Pos); 00073 00074 // null scrape sfx 00075 00076 player->car.SfxScrape = NULL; 00077 00078 // null screech sfx 00079 00080 player->car.SfxScreech = NULL; 00081 00082 #endif 00083 00084 // Returns true on success 00085 00086 return(TRUE); 00087 } 00088 00089 //--------------------------------------------------------------------------------------------------------------------------