diff --git a/engine/bot.c b/engine/bot.c index 83ef90b..05801fb 100644 --- a/engine/bot.c +++ b/engine/bot.c @@ -180,23 +180,23 @@ TODO: Read and parse names from a file */ char *PickBotName (int r) { - if (r == 1) return "windshield wiper"; - else if (r == 2) return "nosefart"; - else if (r == 3) return "WILDEBEEST"; - else if (r == 4) return "Human"; - else if (r == 5) return "Aye"; - else if (r == 6) return "Utrvis"; - else if (r == 7) return "Whoop"; - else if (r == 8) return "BurninNgtWear"; - else if (r == 9) return "nonsensicalous"; - else if (r == 10) return "a dog"; - else if (r == 11) return "Damn, I"; - else if (r == 12) return "Hard Man"; - else if (r == 13) return "complete as whole"; - else if (r == 14) return "AN UPSET"; - else if (r == 15) return "Starter"; + if (r == 1) return "system32"; + else if (r == 2) return "/dev/null"; + else if (r == 3) return "Philip"; + else if (r == 4) return "Travis"; + else if (r == 5) return "Shawn"; + else if (r == 6) return "Steve"; + else if (r == 7) return "Dave"; + else if (r == 8) return "Croft"; + else if (r == 9) return "James"; + else if (r == 10) return "Scott"; + else if (r == 11) return "Ridley"; + else if (r == 12) return "Mister"; + else if (r == 13) return "Anubis"; + else if (r == 14) return "Radon"; + else if (r == 15) return "Maxwell"; - return "GloBot"; + return "player"; } /* @@ -259,18 +259,18 @@ void BotConnect (client_t *client, int ClientNo, int color, char *name) if (color != 666) { client->colors = color * 14 + color; // The bot must have a color - bot->v.team = color + 1; // And to be in a team + bot->v.team = color + 1; // And to be in a team } else { client->colors = randombot * 14 + randombot; // The bot must have a color - bot->v.team = randombot + 1; // And to be in a team + bot->v.team = randombot + 1; // And to be in a team } client->old_frags = 0; // And since he just joined he cant have got any frags yet bot->v.colormap = ClientNo; // Without this he wont be using any colored clothes - bot->v.netname = client->name - pr_strings; // Everyone wants a name + bot->v.netname = client->name - pr_strings; // Everyone wants a name UpdateClient (client, ClientNo); // Update the scoreboard @@ -283,66 +283,6 @@ void BotConnect (client_t *client, int ClientNo, int color, char *name) pr_global_struct->self = EDICT_TO_PROG (self); // Get back to the backup } - -/* -========== -LoserConnect - -Create a player to split onto.... -========== -*/ -int splitmeup; -client_t *splitplayer; // leilei - splitscreen -void LoserConnect (client_t *client, int ClientNo, int color, char *name) -{ - edict_t *self = PROG_TO_EDICT(pr_global_struct->self); // Make a backup of the current QC self - edict_t *bot = client->edict; - int randombot; - splitmeup = 2; - bot->bot.isbot = 35; // And yes this is a human who ignores some builtins - bot->bot.Active = true; // and hes active - bot->bot.enemy = bot; // Now why is he chasing himself? - bot->bot.connecttime = sv.time; - bot->bot.ClientNo = ClientNo;// Now we get a clientnumber - - randombot = ceil (RandomRange (0, 15)); - - while (globot.botactive[randombot]) - randombot = ceil (RandomRange (0, 15)); - - globot.botactive[randombot] = true; - - if (name[0] != '0') - strcpy (client->name, name); - else - strcpy (client->name, "Scud"); - - if (color != 666) - { - client->colors = color * 16 + color; // The bot must have a color - bot->v.team = color + 1; // And to be in a team - } - else - { - client->colors = randombot * 16 + randombot; // The bot must have a color - bot->v.team = randombot + 1; // And to be in a team - } - client->old_frags = 0; // And since he just joined he cant have got any frags yet - - bot->v.colormap = ClientNo; // Without this he wont be using any colored clothes - bot->v.netname = client->name - pr_strings; // Everyone wants a name - - UpdateClient (client, ClientNo);// Update the scoreboard - - pr_global_struct->self = EDICT_TO_PROG(bot); // Update the QC self to be the bot - - PR_ExecuteProgram (pr_global_struct->SetNewParms); // Now call some QC functions - PR_ExecuteProgram (pr_global_struct->ClientConnect); // Now call some more QC functions - PR_ExecuteProgram (pr_global_struct->PutClientInServer); // Now call yet some more QC functions - - pr_global_struct->self = EDICT_TO_PROG (self); // Get back to the backup - splitplayer = client; -} /* ============== NextFreeClient @@ -384,46 +324,6 @@ void NextFreeClient (void) SV_BroadcastPrintf ("Unable to connect a bot, server is full.\n"); // No free client slots = no more bots allowed } - - -// for splitscreen's genesis -void NextFreeLoser (void) -{ - client_t *client; - int i, color; - char name[32]; - if (splitmeup){ - SV_BroadcastPrintf ("Unable to connect a loser, you already got one.\n"); // No free client slots = no more bots allowed - return; - } - if (Cmd_Argc() == 2) - { - color = Q_atoi(Cmd_Argv(1)); - sprintf (name, "0"); - } - else if (Cmd_Argc() == 3) - { - color = Q_atoi(Cmd_Argv(1)); - sprintf (name, "%s", Cmd_Argv(2)); - } - else - { - color = 666; - sprintf (name, "0"); - } - - for (i=0, client=svs.clients; iedict->bot.Active) // We found a free client slot - { - LoserConnect (client, i, color, name); // so why not connect a bot? - return; // We are done now - } - } - - SV_BroadcastPrintf ("Unable to connect a loser, server is full.\n"); // No free client slots = no more bots allowed -} - /* ======= MoveBot @@ -741,9 +641,8 @@ the command "addbot" from the console */ void Bot_Init (void) { - char name[256]; + char name[MAX_OSPATH]; Cmd_AddCommand ("addbot", NextFreeClient); - Cmd_AddCommand ("addburp", NextFreeLoser); // eukara - loading botnames start printf("Looking for botnames.cfg...\n"); diff --git a/engine/draw.c b/engine/draw.c index 0c79cbf..5616c57 100644 --- a/engine/draw.c +++ b/engine/draw.c @@ -897,33 +897,26 @@ Draw_Init // gfx/addmap.lmp, gfx/mulmap.lmp, gfx/tinttab.lmp (hi hexen2) // gfx/8to16.lmp, gfx/8to24.lmp, gfx/palmap.lmp, gfx/palmap2.lmp // These are proposed filenames. + byte menumap[256][16]; // Used for menu backgrounds and simple colormod byte gelmap[256]; // Unused id effect TO be used somehow. made redundant by menumap byte remapmap[256]; // For translating an old palette to new on load -byte bumpmap[256]; // leilei experimental bumpmap feature -int translate_bsp; -int translate_mdl; -int translate_gfx; -int translate_spr; +int translate_bsp; +int translate_mdl; +int translate_gfx; +int translate_spr; -float fademap[256]; // Used in generation of certain alpha tables -byte coltranslate[256]; // TranslateToCustomPal - used for taking one palette to another without going through a whole 8to24to15to8 thing -pixel_t addTable[256][256]; // Additive blending effect -pixel_t mulTable[256][256]; // Multiply blending effect (for colormod) +float fademap[256]; // Used in generation of certain alpha tables +byte coltranslate[256]; // TranslateToCustomPal - used for taking one palette to another without going through a whole 8to24to15to8 thing +pixel_t addTable[256][256]; // Additive blending effect +pixel_t mulTable[256][256]; // Multiply blending effect (for colormod) pixel_t transTable[256][256]; // Alpha blending by 33% and 66% //pixel_t alphaTable[256][256]; // Alpha blending by row pixel_t waterTable[256][256]; // Not cached to disk - for wateralpha only (THIS IS A STUPID but only sensible way to go for this) -int smoothtable[32768][3]; // a table for smoothing out things.... :( -int noisetable[512][5]; // a table for table - -int wootel[32][32][32]; // alternate kernel blend - - - - - - +int smoothtable[32768][3]; // a table for smoothing out things.... :( +int noisetable[512][5]; // a table for table +int wootel[32][32][32]; // alternate kernel blend unsigned d_8to24table[256]; // a super important table here @@ -941,19 +934,6 @@ void InitGel (byte *palette) } } -void InitBump (byte *palette) -{ - int i; - int r; - - for (i=0 ; i<256 ; i++) - { - r = (palette[i*3] + palette[i*3+1] + palette[i*3+2]) / 3; - // r *= 3; - // if (r > 255) r = 255; - bumpmap[i] = r; - } -} // Gamepad notes: // AUX29 - dpad up // AUX32 - dpad left @@ -983,7 +963,6 @@ void InitWootel (void) wootel[i][r][0] = result; } } - } void InitNoise (void) @@ -1016,11 +995,7 @@ void InitNoise (void) //noisetable[64][r] = 64; //yeah...SIXTY FOUR } } -/* - t = (y & 1) << 1; - if ((x & 3) != t) - pbuf[x] = 0; - */ + extern cvar_t *temp3; void InitOrder (void) { @@ -1036,7 +1011,8 @@ void InitOrder (void) for (i=1 ; i 512) result = 512; - //if (result < 0) result = 0; - noisetable[i][r] = result; - - //noisetable[i][r] = (float)(range * ay); - } + result = (float)ay; + noisetable[i][r] = result; + } } for (r=0; r<6; r++){ - noisetable[0][r] = 0; //yeah.... 0 - //noisetable[64][r] = 64; //yeah...SIXTY FOUR + noisetable[0][r] = 0; //yeah.... 0 } } @@ -1114,7 +1082,7 @@ void InitSmooth (void) float noiz; float noiiz; - int range = 64; // was 64 + int range = 64; InitNoise(); // InitOrder(); // InitSimple(); @@ -1122,14 +1090,11 @@ void InitSmooth (void) { for (r=0; r 256 - host_fullbrights){ - coltranslate[i] = BestColor(bah[0], bah[1], bah[2], 9, 15); - remapmap[i] = BestColor(bah[0], bah[1], bah[2], 9, 15); + coltranslate[i] = BestColor(bah[0], bah[1], bah[2], 9, 15); + remapmap[i] = BestColor(bah[0], bah[1], bah[2], 9, 15); } else { - coltranslate[i] = BestColor(bah[0], bah[1], bah[2], 0, 8); - remapmap[i] = BestColor(bah[0], bah[1], bah[2], 0, 8); + coltranslate[i] = BestColor(bah[0], bah[1], bah[2], 0, 8); + remapmap[i] = BestColor(bah[0], bah[1], bah[2], 0, 8); } - - } - - rmap_ready = 1; - + rmap_ready = 1; } extern void PalmapStaticized (); @@ -1221,11 +1182,12 @@ extern int inthedos; void FogTableRefresh (void); extern cvar_t *r_tranquality; cvar_t *engoo_lookuppalette; + #ifdef _WIN32 extern unsigned char vid_curpal[256*3]; #endif - int erh; +int erh; int fbs[256]; void MassiveLookupTablesInit (void) { @@ -1247,12 +1209,10 @@ void MassiveLookupTablesInit (void) #endif thepaltouse = host_basepal; - //InitBump(thepaltouse); -// InitFader(); // if (COM_CheckParm ("-cache")) // lookupcaching = 1; // try to cache it all for future loading - fprintf(stderr,"\nGenerating additive table..."); + fprintf(stderr,"\nGenerating additive table... "); for (l=0;l<255;l++) { for (c=0 ; c<255 ; c++) @@ -1263,8 +1223,11 @@ void MassiveLookupTablesInit (void) addTable[l][c] = BestColor(red,green,blue, 0, 254); } } + if(addTable) + fprintf(stderr,"[DONE]"); - fprintf(stderr,"\nGenerating alpha table..."); + + fprintf(stderr,"\nGenerating alpha table... "); for (l=0;l<255;l++) { for (c=0 ; c<255 ; c++) @@ -1275,6 +1238,9 @@ void MassiveLookupTablesInit (void) transTable[l][c] = BestColor(red,green,blue, 0, 254); } } + if(transTable) + fprintf(stderr,"[DONE]"); + if (COM_CheckParm ("-nolookups")){ nolookups = 1; @@ -1285,7 +1251,7 @@ void MassiveLookupTablesInit (void) fprintf(stderr,"\n\n---------------------\nGenerating all the lookup tables\n(If your computer is slow, this will take up to 30 seconds. Use the -nolookups \nparameter if you find this unsettling)\nYou can also skip the 18-bit generation by passing -no18\nAlternatively, you can pass -ugly for faster but ugly generation\n---------------------\n\n"); if (COM_CheckParm ("-ugly")){ - fprintf(stderr,"UGLY GENERATION MODE ON!\n"); + fprintf(stderr,"\n*** UGLY GENERATION MODE ON ***\n"); ugly = 1;} else ugly = 0; @@ -1294,7 +1260,7 @@ void MassiveLookupTablesInit (void) VID_SetPalette2 (thepaltouse); - fprintf(stderr,"\nGenerating 15-bit lookup table..."); + fprintf(stderr,"\nGenerating 15-bit lookup table... "); for (r=0 ; r<256 ; r+=8) { for (g=0 ; g<256 ; g+=8) @@ -1347,6 +1313,8 @@ void MassiveLookupTablesInit (void) if (!palmap) printf(stderr,"FAILED!\n"); + else + fprintf(stderr,"[DONE]"); // Make the 18-bit lookup table here // This is a HUGE 256kb table, the biggest there is here @@ -1357,7 +1325,7 @@ void MassiveLookupTablesInit (void) fprintf(stderr,"\n18-bit lookup generation skipped - High quality light mode DISABLED!\n"); else { - fprintf(stderr,"\nGenerating 18-bit lookup table..."); + fprintf(stderr,"\nGenerating 18-bit lookup table... "); for (r=0 ; r<256 ; r+=4) { @@ -1377,10 +1345,12 @@ void MassiveLookupTablesInit (void) if (!palmap2) printf(stderr,"FAILED!\n"); + else + fprintf(stderr,"[DONE]"); } - fprintf(stderr,"\nGenerating additive table..."); + fprintf(stderr,"\nGenerating additive table... "); for (l=0;l<255;l++) { @@ -1397,9 +1367,11 @@ void MassiveLookupTablesInit (void) if (!addTable) printf(stderr,"FAILED!\n"); + else + fprintf(stderr,"[DONE]"); - fprintf(stderr,"\nGenerating multiply blend table..."); + fprintf(stderr,"\nGenerating multiply blend table... "); for (l=0;l<255;l++) { @@ -1424,6 +1396,8 @@ void MassiveLookupTablesInit (void) if (!mulTable) printf(stderr,"FAILED!\n"); + else + fprintf(stderr,"[DONE]"); // if(palmap2) PalmapStaticized(); @@ -1461,18 +1435,16 @@ void MassiveLookupTablesInit (void) // mangled a bit from grabcolormap void SetFogMap (void); - - void FogTableRefresh (void) { - int ugly; - int l, c, red, green, blue; + int ugly; + int l, c, red, green, blue; float fogthik; - float frac; + float frac; float frac2; float farc; - byte *colmap; + byte *colmap; int RANGE = 1; int COLORLEVELS = 64; int PALBRIGHTS; @@ -1551,10 +1523,7 @@ void WaterTableGet (void) ay = r_wateralpha->value; // water surface ae = 1 - ay; // base pixels -// newwateralpha = r_wateralpha->value; // why - //if (oldwateralpha != newwateralpha) { -// Con_Printf ("yep"); @@ -1615,43 +1584,26 @@ void WaterTableGet (void) if (ooh) waterTable[l][c] = BestColor(red,green,blue, 0, 255); // High quality color tables get best color else if (palmap2) waterTable[l][c] = FindColor18(red,green,blue); - else waterTable[l][c] = FindColor(red,green,blue); // Since we do this live we must do this - - // fast! or i'll cry. + else waterTable[l][c] = FindColor(red,green,blue); // Since we do this live we must do this + // fast! or i'll cry. } } - // if (!waterTable) - // Con_Printf (".... NOT!\n"); // how are we going to fail? - // else{ -// Con_Printf ("!\n"); - - // } } } - - void RemapMapTableGet (void) { - int i, j, l, c, o; - float red, green, blue; - int ooh; - - - for (l=0;l<255;l++) - { - remapmap[l] = 56; - } + int l; + for (l=0;l<255;l++) + remapmap[l] = 56; } - void Draw_Init (void) { int i, j, l, c, r; - draw_chars = W_GetLumpName ("conchars"); draw_disc = W_GetLumpName ("disc"); draw_backtile = W_GetLumpName ("backtile"); @@ -1661,8 +1613,6 @@ void Draw_Init (void) r_rectdesc.ptexbytes = draw_backtile->data; r_rectdesc.rowbytes = draw_backtile->width; - - // Make the menu background table // This has been extended to allow 16 others via r_menucolors for (i=0 ; i<256 ; i++) @@ -1679,10 +1629,6 @@ void Draw_Init (void) } // and no you can't skip it. i'll use it for colored text and other coolities - - - - } @@ -1701,18 +1647,8 @@ void RemapMenuMap (void) }; - - - - - - int lilchar = 1; - - - - /* ================ Draw_Character @@ -2778,8 +2714,6 @@ void Draw_TransPicTranslate_Scaled (int x, int y, qpic_t *pic, byte *translation { dest[u] = translation[tbyte]; } - - } dest += vid.rowbytes; @@ -2975,7 +2909,6 @@ void Draw_ConsoleBackground (int lines) } } } - } @@ -3096,9 +3029,9 @@ refresh window. */ void Draw_TileClear (int x, int y, int w, int h) { - int width, height, tileoffsetx, tileoffsety; - byte *psrc; - vrect_t vr; + int width, height, tileoffsetx, tileoffsety; + byte *psrc; + vrect_t vr; r_rectdesc.rect.x = x; r_rectdesc.rect.y = y; @@ -3214,7 +3147,6 @@ void Draw_Fill_Scaled (int x, int y, int w, int h, int c) { byte *dest = vid.buffer + y*vid.rowbytes + x; - for (v = 0; v < vmax; v++, dest += vid.rowbytes) { for (u = 0; u < umax; u++) @@ -3222,9 +3154,7 @@ void Draw_Fill_Scaled (int x, int y, int w, int h, int c) dest[u] = c; } } - } - } //============================================================================= @@ -3240,9 +3170,7 @@ Draw_FadeScreen ================ */ - byte *obuf; - - +byte *obuf; void Draw_FadeScreen (void) { int x,y; @@ -3286,44 +3214,8 @@ void Draw_FadeScreen (void) pbuf[x] = 0; } } - - - } - -/* - // Weird blur experiment, which unfortunately, causes a crash in a higher resolution. - { - byte *pbuf2[8]; - - for (y=0 ; yvalue; -// VID_UnlockBuffer (); -// S_ExtraUpdate (); -// VID_LockBuffer (); - - for (y=0 ; yvalue; - VID_UnlockBuffer (); - S_ExtraUpdate (); - VID_LockBuffer (); - splet = vid.height; - bloome = 16300; - -// for (ee=0; ee vid.width) - philclampx = vid.width * phil; - philclampy = vid.width * -phil; - if (philclampx < 0) philclampx = 0; - if (philclampx > vid.width * vid.height) philclampx = vid.width; - if (philclampy < 0) philclampy = 0; - if (philclampy > vid.width * vid.height) philclampy = vid.width; - - - pbuf[x] = pbuf[x + (rand()&phil)]; - pbuf[x+1] = pbuf[x + 1 + (rand()&phil)]; - - pbuf[x] = transTable[pbuf[x+1]][pbuf[x]]; - - // pbuf[x] = host_colormap[pbuf[x] + (14000 & 0xFF00)]; - /* - pbuf[x] = addTable[transTable - [transTable [fbs[pbuf[x + (philclampx)]]][ fbs[pbuf[x + - phil]] ]] - [transTable [fbs[pbuf[x + (philclampy)]]][fbs[pbuf[x + phil]] ]] - ][pbuf[x]]; - - pbuf[x+1] = addTable[transTable - [transTable [fbs[pbuf[x + (philclampy)]]][fbs[pbuf[x + phil] ]]] - [transTable [fbs[pbuf[x + (philclampx)]]][fbs[pbuf[x - phil] ]]] - ][pbuf[x+1]]; -*/ - // pbuf[x+1] = transTable - // [transTable [pbuf[x + (philclampy)]][pbuf[x + phil]]] - // [transTable[pbuf[x + (philclampx)]][pbuf[x - phil]]]; -/* - pbuf[x] = transTable - [transTable [pbuf[x + (philclampx)]][pbuf[x - phil]]] - [transTable[pbuf[x + (philclampy)]][pbuf[x + phil]]]; - pbuf[x+1] = transTable - [transTable [pbuf[x + (philclampy)]][pbuf[x + phil]]] - [transTable[pbuf[x + (philclampx)]][pbuf[x - phil]]]; -*/ - - // pbuf[x] = pbuf[x + (int)splet]; - // pbuf[x+1] = pbuf[x - (int)splet]; - // pbuf[x+2] = pbuf[x + (int)splet]; - // pbuf[x+3] = pbuf[x - (int)splet]; - // transTable [pbuf[x - (vid.width * 2)]][pbuf[x - 2]] - - // transTable[pbuf[x + (vid.width * 2)]][pbuf[x + 2]] - //[pbuf[x + (vid.width * 2)]]; - - } - } - - VID_UnlockBuffer (); - S_ExtraUpdate (); - VID_LockBuffer (); -} -#endif -//============================================================================= - /* ================ Draw_BeginDisc diff --git a/engine/host.c b/engine/host.c index 2b67fc7..f0fc168 100644 --- a/engine/host.c +++ b/engine/host.c @@ -1097,9 +1097,7 @@ void Draw_Init_Cvars(); //TW void CDAudio_Init_Cvars(); // 2001-09-18 New cvar system by Maddes (Init) end - - -void VID_SetPalette2 (unsigned char *palette) +void VID_SetPalette2 (unsigned char *palette) { byte *pal; unsigned r,g,b; @@ -1111,7 +1109,8 @@ void VID_SetPalette2 (unsigned char *palette) FILE *f; char s[255]; float gamma = 0; - Con_Printf ("Making 8to24 lookup tables..."); + + fprintf(stderr,"\nGenerating 8to24 lookup tables... "); // // 8 8 8 encoding // @@ -1138,11 +1137,12 @@ void VID_SetPalette2 (unsigned char *palette) d_8to24table[0] &= 0x000000; // black is black -// if (!d_8to24table) -// Con_Printf ("FAILED!\n"); -// else -// Con_Printf ("!\n"); + if (!d_8to24table) + printf(stderr,"FAILED!\n"); + else + fprintf(stderr,"[DONE]"); } + #ifdef GLOBOT void Bot_Init (void); #endif diff --git a/engine/wad.c b/engine/wad.c index c16d0bd..1e2b7fc 100644 --- a/engine/wad.c +++ b/engine/wad.c @@ -80,87 +80,27 @@ void W_LoadWadFile (char *filename) wad_base = fileinfo->data; // 2001-09-12 Returning information about loaded file by Maddes header = (wadinfo_t *)wad_base; - + if (header->identification[0] != 'W' || header->identification[1] != 'A' || header->identification[2] != 'D' || header->identification[3] != '2') Sys_Error ("Wad file %s doesn't have WAD2 id\n",filename); - + wad_numlumps = LittleLong(header->numlumps); infotableofs = LittleLong(header->infotableofs); wad_lumps = (lumpinfo_t *)(wad_base + infotableofs); - - for (i=0, lump_p = wad_lumps ; ifilepos = LittleLong(lump_p->filepos); - lump_p->size = LittleLong(lump_p->size); - - W_CleanupName (lump_p->name, lump_p->name); - if (lump_p->type == TYP_QPIC){ - SwapPic ( (qpic_t *)(wad_base + lump_p->filepos)); - // leilei - quick palette translation - /* - if (rmap_ready){ - int bah; - for (bah = 0; bah < lump_p->size; bah++) - { } - // lump_p->size[bah] = coltranslate[lump_p->size[bah]]; - - } - */ - // leilei - quick palette translation - - } - } -} - - -// leilei - this one is for 'extra' interface stuff -// it is not required by the engine, but will load it -// if it finds it -void W_LoadWadFileExtra (char *filename) -{ - lumpinfo_t *lump_p; - wadinfo_t *header; - unsigned i; - int infotableofs; - loadedfile_t *fileinfo; // 2001-09-12 Returning information about loaded file by Maddes - - fileinfo = COM_LoadHunkFile (filename); - if (!fileinfo){ - Con_Printf ("W_LoadWadFileExtra: couldn't load %s\n\nNot panicking, moving on", filename); - hasextra = 0; - return; - } - wad_extra = fileinfo->data; // 2001-09-12 Returning information about loaded file by Maddes - - header = (wadinfo_t *)wad_extra; - - if (header->identification[0] != 'W' - || header->identification[1] != 'A' - || header->identification[2] != 'D' - || header->identification[3] != '2') - Sys_Error ("Wad file %s doesn't have WAD2 id\n",filename); - - wad_numlumps = LittleLong(header->numlumps); - infotableofs = LittleLong(header->infotableofs); - wad_lumps = (lumpinfo_t *)(wad_extra + infotableofs); - for (i=0, lump_p = wad_lumps ; ifilepos = LittleLong(lump_p->filepos); lump_p->size = LittleLong(lump_p->size); W_CleanupName (lump_p->name, lump_p->name); if (lump_p->type == TYP_QPIC) - SwapPic ( (qpic_t *)(wad_extra + lump_p->filepos)); + SwapPic ( (qpic_t *)(wad_base + lump_p->filepos)); } - hasextra = 1; } - - /* ============= W_GetLumpinfo @@ -198,15 +138,6 @@ void *W_GetLumpName (char *name) return NULL; } -void *W_GetLumpName2 (char *name) -{ - lumpinfo_t *lump; - - lump = W_GetLumpinfo (name); - - return (void *)(wad_extra + lump->filepos); -} - void *W_GetLumpNum (int num) { lumpinfo_t *lump; @@ -229,15 +160,6 @@ automatic byte swapping void SwapPic (qpic_t *pic) { - /*// leilei - quick palette translation - if (rmap_ready){ - int bah; - for (bah = 0; bah < pic->width*pic->height; bah++) - pic->data[bah] = coltranslate[pic->data[bah]]; - - } - // leilei - quick palette translation -*/ pic->width = LittleLong(pic->width); pic->height = LittleLong(pic->height); @@ -375,40 +297,6 @@ byte *W_ConvertWAD3Texture(miptex_t *tex) return data; } - -byte *W_ConvertWAD3Texture2(miptex_t *tex) -{ - byte *in, *data, *out, *pal; - int d, p; - - in = (byte *)((int) tex + tex->offsets[0]); - data = out = malloc(tex->width * tex->height * 3); - - if (!data) - return NULL; - - image_width = tex->width; - image_height = tex->height; - pal = in + (((image_width * image_height) * 85) >> 6); - pal += 2; - - for (d = 0;d < image_width * image_height;d++) - { - p = *in++; - if (tex->name[0] == '{' && p == 255) - out[0] = out[1] = out[2] = out[3] = 0; - else - { - p *= 3; - out[0] = pal[p]; - out[1] = pal[p+1]; - out[2] = pal[p+2]; - } - out += 3; - } - return data; -} - byte *W_ConvertWAD3TextureFTE(miptex_t *tex, int *width, int *height, int alphaed) //returns rgba { byte *in, *data, *out, *pal; @@ -739,5 +627,3 @@ void Mod_ParseInfoFromEntityLump(char *data) //actually, this should be in the m skyrotate = VectorNormalize(skyaxis); // R_SetSky(skyname, skyrotate, skyaxis); } - - diff --git a/system/sys_linux.c b/system/sys_linux.c index 69f34ad..c87fcad 100644 --- a/system/sys_linux.c +++ b/system/sys_linux.c @@ -113,30 +113,27 @@ static char end1[] = "\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE: The Doomed Dimension \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ---------------------------------------------------------------------------- \x1b[3;1H CALL 1-800-IDGAMES TO ORDER OR FOR TECHNICAL SUPPORT \x1b[4;1H PRICE: $45.00 (PRICES MAY VARY OUTSIDE THE US.) \x1b[5;1H \x1b[6;1H \x1b[37mYes! You only have one fourth of this incredible epic. That is because most \x1b[7;1H of you have paid us nothing or at most, very little. You could steal the \x1b[8;1H game from a friend. But we both know you'll be punished by God if you do. \x1b[9;1H \x1b[33mWHY RISK ETERNAL DAMNATION? CALL 1-800-IDGAMES AND BUY NOW! \x1b[10;1H \x1b[37mRemember, we love you almost as much as He does. \x1b[11;1H \x1b[12;1H \x1b[33mProgramming: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[13;1H \x1b[33mDesign: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[14;1H \x1b[33mArt: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[15;1H \x1b[33mBiz: \x1b[37mJay Wilbur, Mike Wilson, Donna Jackson \x1b[16;1H \x1b[33mProjects: \x1b[37mShawn Green \x1b[33mSupport: \x1b[37mBarrett Alexander \x1b[17;1H \x1b[33mSound Effects: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[18;1H For other information or details on ordering outside the US, check out the \x1b[19;1H files accompanying QUAKE or our website at http://www.idsoftware.com. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a registered trademark licensed to \x1b[22;1H Nothing Interactive, Inc. All rights reserved. \x1b[40m\x1b[23;1H\x1b[0m"; static char end2[] = "\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H QUAKE \x1b[33mby \x1b[44mid\x1b[41m Software \x1b[2;1H ----------------------------------------------------------------------------- \x1b[3;1H \x1b[37mWhy did you quit from the registered version of QUAKE? Did the \x1b[4;1H scary monsters frighten you? Or did Mr. Sandman tug at your \x1b[5;1H little lids? No matter! What is important is you love our \x1b[6;1H game, and gave us your money. Congratulations, you are probably \x1b[7;1H not a thief. \x1b[8;1H Thank You. \x1b[9;1H \x1b[33;44mid\x1b[41m Software is: \x1b[10;1H PROGRAMMING: \x1b[37mJohn Carmack, Michael Abrash, John Cash \x1b[11;1H \x1b[33mDESIGN: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits \x1b[12;1H \x1b[33mART: \x1b[37mAdrian Carmack, Kevin Cloud \x1b[13;1H \x1b[33mBIZ: \x1b[37mJay Wilbur, Mike Wilson \x1b[33mPROJECTS MAN: \x1b[37mShawn Green \x1b[14;1H \x1b[33mBIZ ASSIST: \x1b[37mDonna Jackson \x1b[33mSUPPORT: \x1b[37mBarrett Alexander \x1b[15;1H \x1b[33mSOUND EFFECTS AND MUSIC: \x1b[37mTrent Reznor and Nine Inch Nails \x1b[16;1H \x1b[17;1H If you need help running QUAKE refer to the text files in the \x1b[18;1H QUAKE directory, or our website at http://www.idsoftware.com. \x1b[19;1H If all else fails, call our technical support at 1-800-IDGAMES. \x1b[20;1H \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc. \x1b[21;1H All rights reserved. NIN logo is a registered trademark licensed \x1b[22;1H to Nothing Interactive, Inc. All rights reserved. \x1b[23;1H\x1b[40m\x1b[0m"; -static char end_engoo[] = "\x1b[0;1;46m\x1b[1;1H\ - ENGOO \x1b[37mversion 2.78 \n\ -\x1b[33m================================================================================\n\ +static char end_engoo[] = "\n\n\n================================================================================\n\ + _ _ ____ _ _ _ _ _____ __ \n\ + | | / |___ \\| | | | | / |_ _\\ \\/ / \n\ + | |/ |_ | | | | | |/ || | \\ / \n\ + | /| | |_| | |_| | /| || | / \\ \n\ + |_/ |_|____/ \\___/|_/ |_|___/_/\\_\\ \n\ \n\ - \x1b[37mBased on QIP Engine by Maddes \n\ +================================================================================\n\ \n\ + Programming by Based on Engoo by \n\ + eukara leileilol \n\ \n\ - \x1b[33mProgramming by Linux port by \n\ - \x1b[37mleilei eukara \n\ + Special thanks to \n\ + LordHavoc - Lighting Andrewj - Dithering \n\ + Spike - Memory Tomaz - Snow/Rain and Bots \n\ + Fitz - Fog MH - Vid code /interpolation \n\ + Qbism - Optimizations Siggi - 2D Scaling \n\ + Mankrip - Optimizations Taniwha - Aspect \n\ \n\ - \x1b[33mLOTS of HELP from \n\ - \x1b[37mLordHavoc - Lighting \n\ - Spike - Memory \n\ - Fitz - Fog \n\ - Qbism - Optimizations \n\ - Mankrip - Optimizations \n\ - Andrewj - Dithering \n\ - Tomaz - Snow/Rain and Bots \n\ - MH - Vid code /interpolation \n\ - Siggi - 2D Scaling \n\ - Taniwha - Aspect \n\ - \x1b[33m This engine is licensed under the \n\ - GNU GPL v2. Read COPYING for more. \n\e[0m"; - + This engine is licensed under the \n\ + GNU GPL v2. Read LICENSE for more. \n"; void Sys_Quit (void) {