------------------------------------------------------------
-- Mower Racing Madness

function InitClass(class, className)
    if (class == nil) then
        error("Could not initialize class"..className);
        end;
--|    Game.StatusMessage("Initializing"..className.."...");
--|    Script.WaitFrame(1);
    Game.LoadTick(1);
    Entity.CreateClass(class, Game.GetDataPath(), 0);
    end

-- load common functions used by the menu system
--| Game.DoFile("MenuMacros.lua");

--|Game.StatusMessage("Initializing Entity Classes...");
--|Script.WaitFrame(1);
--InitClass(EntNull,      "EntNull"     ); -- EntNull is now created by default
--InitClass(Terrain,      "Terrain"     );
InitClass(Terrain2,     "Terrain2"    );
InitClass(Water,        "Water"       );
InitClass(Sun,          "Sun"         );
InitClass(Light,        "Light"       );
InitClass(LensFlare,    "LensFlare"   );
InitClass(SkyBox1,      "SkyBox1"     );
InitClass(SkyDome,      "SkyDome"     );
--InitClass(CloudDome,    "CloudDome"   );
--InitClass(Sunbeam,      "Sunbeam"     );
InitClass(Environment,  "Environment" );
InitClass(Sound,        "Sound"       );
--InitClass(Tree,         "Tree"        );
--InitClass(GrassClump,   "GrassClump"  );
InitClass(Observer2,    "Observer2"   );
--InitClass(ShadowBuilder, "ShadowBuilder");
InitClass(Creator,      "Creator"     );
InitClass(StaticObject, "StaticObject");
InitClass(ArticuModel,  "ArticuModel" );
InitClass(BannerModel,  "BannerModel" );
InitClass(CullNode2d,   "CullNode2d"  );
InitClass(SwitchNode,   "SwitchNode"  );
--InitClass(Particle1,    "Particle1"   );
InitClass(Particles,    "Particles"   );
InitClass(GrassPatch,   "GrassPatch"  );
InitClass(GrassMesh,    "GrassMesh"   );
--InitClass(CloudGrid,    "CloudGrid"   );
--InitClass(CameraTrack,  "CameraTrack" );
--InitClass(SplashRipple, "SplashRipple");
InitClass(RadialEfx,    "RadialEfx"   );
--InitClass(AirAnimal,    "AirAnimal"   );
--InitClass(AirFlock,     "AirFlock"    );
InitClass(Waypoint,     "Waypoint");
InitClass(FlySwarm,     "FlySwarm"    );
InitClass(EntGame,      "Game"        );
InitClass(ParticleSpray,"ParticleSpray");
InitClass(PhyTest,      "PhyTest");
InitClass(Buggy1,       "Buggy1");
--InitClass(GroundAnimal, "GroundAnimal");
--InitClass(QuakeMan,     "QuakeMan"    );
--InitClass(Cloud1,       "Cloud1"      );
InitClass(CloudDome2,     "CloudDome2"  );
InitClass(LocalRain,      "LocalRain"   );
InitClass(TrackZone,      "TrackZone"   );
InitClass(Race,           "Race"        );
InitClass(LightBeam,      "LightBeam"   );
InitClass(FlashEffect,    "FlashEffect" );
InitClass(TrackCamera,    "TrackCamera" );
InitClass(TrackCameraDir, "TrackCameraDir");
InitClass(WaypointCamera, "WaypointCamera");
--InitClass(OrthoCamera,    "OrthoCamera");
InitClass(SpringCamera,   "SpringCamera");
InitClass(CameraWaypoint, "CameraWaypoint");
InitClass(WptFollower,    "WptFollower");
--InitClass(Chicken,        "Chicken");
InitClass(Bullet1,        "Bullet1");
-- Menus
--InitClass(MenuEv,            "MenuEv"            );
--InitClass(MenuPublisher,     "MenuPublisher"     );
--InitClass(MenuSplashStart,   "MenuSplashStart"   );
--InitClass(MenuMovie,         "MenuMovie"         );
InitClass(MenuChooseStorage,    "MenuChooseStorage" );
InitClass(MenuChooseProfile,    "MenuChooseProfile" );
InitClass(MenuNoSaveSpace,      "MenuNoSaveSpace"   );
InitClass(MenuNoSaveSlots,      "MenuNoSaveSlots"   );
InitClass(MenuDeleteProfile,    "MenuChooseProfile" );
InitClass(MenuMain,             "MenuMain"          );
InitClass(MenuOptions,          "MenuOptions"       );
InitClass(MenuVideo,            "MenuVideo"         );
InitClass(MenuSound,            "MenuSound"         );
InitClass(MenuControls,         "MenuControls"      );
InitClass(MenuGame,             "MenuGame"          );
InitClass(MenuDeveloper,        "MenuDeveloper"     );
InitClass(MenuInGame,           "MenuInGame"        );
InitClass(MenuInsertController, "MenuInsertController");
InitClass(MenuSaveProfile,      "MenuSaveProfile"   );
InitClass(MenuGameRunning,      "MenuGameRunning"   );
InitClass(MenuQuickTrack,       "MenuQuickTrack"    );
InitClass(MenuRaceOptions,      "MenuRaceOptions"   );
InitClass(MenuConfirm2,         "MenuConfirm2"      );
InitClass(MenuLoadingWorld,     "MenuLoadingWorld"  );
InitClass(MenuRaceIntro,        "MenuRaceIntro"     );
InitClass(MenuAttractor,        "MenuAttractor"     );
InitClass(MenuPostRace,         "MenuPostRace"      );
InitClass(MenuFinishOrder,      "MenuFinishOrder"   );
InitClass(MenuMowPedia,         "MenuMowPedia"      );
InitClass(MenuMultiplayer,      "MenuMultiplayer"   );
InitClass(MenuMultiConfig,      "MenuMultiConfig"   );
InitClass(MenuNewProfile,       "MenuNewProfile"    );
InitClass(MenuProfileExists,    "MenuProfileExists" );
InitClass(MenuFirstProfile,     "MenuFirstProfile"  );
InitClass(MenuCircuit,          "MenuCircuit"       );
InitClass(MenuStats,            "MenuStats"         );
InitClass(MenuNextRace,         "MenuNextRace"      );
InitClass(MenuSeasonOver,       "MenuSeasonOver"    );
InitClass(MenuTrophy,           "MenuTrophy"        );
--InitClass(MenuRaceSettings,     "MenuRaceSettings"  );
InitClass(MenuVKeyboard,        "MenuVKeyboard"     );
InitClass(MenuTractorSetup,     "MenuTractorSetup"  );
InitClass(MenuEngineSetup,      "MenuEngineSetup"   );
InitClass(MenuTractorOptions,   "MenuTractorOptions");
InitClass(MenuBuyItem,          "MenuBuyItem"       );
-- Controls
InitClass(TextButton,           "TextButton"        );
InitClass(Highlight,            "Highlight"         );
InitClass(Checkbox,             "Checkbox"          );
InitClass(MultiState,           "MultiState"        );
--InitClass(Frame,             "Frame"             );
--InitClass(StaticText,        "StaticText"        );
InitClass(StaticTextBox,        "StaticTextBox"     );
--InitClass(StaticGraphic,     "StaticGraphic"     );
--InitClass(Movie,             "Movie"             );
InitClass(IntSpinner,           "IntSpinner"        );
InitClass(EditLine,             "EditLine"          );
InitClass(Slider,               "Slider"            );
InitClass(VertList,             "VertList"          );
InitClass(Callback,             "Callback"          );
InitClass(Ctl3Model,            "Ctl3Model"         );
InitClass(Effect1,              "Effect1"           );
-- Hud Components
InitClass(HudSpeedometer,       "HudSpeedometer"    );
InitClass(HudLapInfo,           "HudLapInfo"        );
InitClass(HudLapTimes,          "HudLapTimes"       );
InitClass(HudGearShift,         "HudGearShift"      );
InitClass(HudOffTrack,          "HudOffTrack"       );
InitClass(HudTrackMap,          "HudTrackMap"       );
InitClass(HudRacerList,         "HudRacerList"      );

-- Setup key/mouse/gamepad mappings
Game.DoFile("InputMapping.lua");
--Game.CompileFile("maps\\ForestLake\\ForestLake.lua");
--LatestChunk();
--Game.EnableWorld();
--Game.MenuSet("MenuMain");
--Game.MenuSet("MenuEv");
