// // ingameRes.js //-------------------- // Provides access to general ingame resources. // by RHY3756547 // window.IngameRes = function(rom) { var r = this; this.kartPhys = new kartphysicalparam(rom.getFile("/data/KartModelMenu/kartphysicalparam.bin")); this.kartOff = new kartoffsetdata(rom.getFile("/data/KartModelMenu/kartoffsetdata.bin")); this.MapObj = new narc(lz77.decompress(rom.getFile("/data/Main/MapObj.carc"))); //contains generic map obj, look in here when mapobj res is missing from course. (itembox etc) this.MainRace = new narc(lz77.decompress(rom.getFile("/data/MainRace.carc"))); //contains item models. this.MainEffect = new narc(lz77.decompress(rom.getFile("/data/MainEffect.carc"))); //contains particles. this.Main2D = new narc(lz77.decompress(rom.getFile("/data/Main2D.carc"))); this.KartModelSub = new narc(lz77.decompress(rom.getFile("/data/KartModelSub.carc"))); //contains characters + animations this.Race = new narc(lz77.decompress(rom.getFile("/data/Scene/Race.carc"))); //contains lakitu, count, various graphics this.RaceLoc = new narc(lz77.decompress(rom.getFile("/data/Scene/Race_us.carc"))); //contains lakitu lap signs, START, YOU WIN etc. some of these will be replaced by hi res graphics by default. this.RaceEffect = new spa(r.MainEffect.getFile("RaceEffect.spa")); this.MainFont = new nftr(r.Main2D.getFile("marioFont.NFTR")); //debugger; this.getChar = getChar; this.getKart = getKart; var itemNames = [ "banana", "bomb", "gesso" /*squid*/, "kinoko" /*mushroom*/, "kinoko_p" /*queen shroom*/, "koura_g" /*green shell*/, "koura_r" /*red shell*/, "star", "teresa" /*boo*/, "thunder", "koura_w" /*blue shell item rep*/, "f_box", "killer" /*bullet bill*/ ] var charNames = [ "mario", "donkey", "kinopio", "koopa", "peach", "wario", "yoshi", "luigi", "karon", "daisy", "waluigi", "robo", "heyho" ] var charAbbrv = [ "MR", "DK", "KO", "KP", "PC", "WR", "YS", "LG", "KA", "DS", "WL", "RB", "HH" ] var tireName = ["kart_tire_L", "kart_tire_M", "kart_tire_S"]; var characters = []; var karts = []; loadItems(); loadTires(); function loadItems() { //loads physical representations of items var t = {} for (var i=0; i