From 81baeaeaa45ce7bc55bd250af1d33e38bff00c48 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sat, 17 Jul 2010 11:19:29 +0000 Subject: [PATCH] Removed OGL hack to fix overlapping room in D1 lvl19 and rather move vertex a little. Still a hack but now without messing Depth test --- CHANGELOG.txt | 4 ++++ main/gamesave.c | 8 ++++++++ main/render.c | 6 ------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index acb988f3b..1d8c5c0a4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20100717 +-------- +main/gamesave.c, main/render.c: Removed OGL hack to fix overlapping room in D1 lvl19 and rather move vertex a little. Still a hack but now without messing Depth test + 20100716 -------- main/gamecntl.c: Fixing showing options menu in demos - was still called (or rather not) by obsolete variable diff --git a/main/gamesave.c b/main/gamesave.c index 9b2132361..fcf031121 100644 --- a/main/gamesave.c +++ b/main/gamesave.c @@ -1254,6 +1254,14 @@ int load_level(char * filename_passed) //NOTE LINK TO ABOVE!! mine_err = load_mine_data_compiled(LoadFile); + + /* !!!HACK!!! + * Descent 1 - Level 19: OBERON MINE has some ugly overlapping rooms (segment 484). + * HACK to make this issue less visible by moving one vertex a little. + */ + if ( !stricmp("Descent: First Strike",Current_mission_longname) && !stricmp("level19.rdl",filename) && cfilelength(LoadFile) == 136706) + Vertices[1905].z =-385*F1_0; + if (mine_err == -1) //error!! return 1; diff --git a/main/render.c b/main/render.c index 91deeb2fa..7b5af338f 100644 --- a/main/render.c +++ b/main/render.c @@ -283,12 +283,6 @@ void render_face(int segnum, int sidenum, int nv, short *vp, int tmap1, int tmap #endif { #ifdef OGL - /* HACK: Level 19 has an unwanted 4D room. Let's use this stupid hack to disguise it. */ - if ( !memcmp("Descent: First Strike",Current_mission_longname,MISSION_NAME_LEN+1) && Current_level_num==19 && segnum >= 522 && segnum <=528 ) - { - glDepthFunc(GL_ALWAYS); - } - if (bm2) { g3_draw_tmap_2(nv,pointlist,uvl_copy,bm,bm2,((tmap2&0xC000)>>14) & 3);