/** * Loads a bunch of STCFNx fonts from WAD, and sets some of the remaining constants. * * @throws Exception */ @Override public void Init() { String xxx = new String("STCFN%03d"); int i; int j; String buffer; if (DM.language == Language.french) shiftxform = french_shiftxform; else shiftxform = english_shiftxform; // load the heads-up font j = HU_FONTSTART; // So it basically loads a bunch of patch_t's from memory. C2JUtils.initArrayOfObjects(hu_font, patch_t.class); for (i = 0; i < HU_FONTSIZE; i++) { buffer = String.format(xxx, j++); // hu_font[i] = ((patch_t[]) wd.CacheLumpName(buffer, PU_STATIC); hu_font[i] = (W.CachePatchName(buffer, PU_STATIC)); } // MAES: Doom's SC had a really f****d up endianness change for height. // I don't really see the point in that, as in the WAD patches appear // to be all Little Endian... mystery :-S // HU_TITLEY = (167 - Swap.SHORT(hu_font[0].height)); HU_TITLEY = (167 - hu_font[0].height); HU_INPUTY = (HU_MSGY + HU_MSGHEIGHT * hu_font[0].height + 1); }
/** * Try only one IWAD. * * @param iwad * @return */ public GameMode_t tryOnlyOne(String iwad, String doomwaddir) { // Is it a known and valid version? GameMode_t tmp = VersionChecker.get(iwad.toLowerCase()); if (tmp != null) { // Can we read it? if (C2JUtils.testReadAccess(doomwaddir + iwad)) return tmp; // Yes, so communicate the gamemode back. } // It's either invalid or we can't read it. // F**k that. return null; }
public void clearTextLine() { this.len = 0; C2JUtils.memset(this.text, (char) 0, this.text.length); // It's actually used as a status, go figure. this.needsupdate = 1; }