View Single Post
Old 03-12-2014   #10
Sryder13
'That brit'
Judge
 
Sryder13's Avatar
Default

Quote:
Originally Posted by AlamGBC View Post
A few notes:
  • test with -DNOHW to make sure your code works for systems that does not have 3D support
  • the var type "byte" only exist in Win32 land, use UINT8 in it place
  • use / not \ for paths, also Win32 only
Spoiler:

Code:
diff --git a/src/f_wipe.c b/src/f_wipe.c
index 2f665d6..ff344e8 100644
--- a/src/f_wipe.c
+++ b/src/f_wipe.c
@@ -82,7 +82,7 @@ static INT32 F_DoWipe(INT32 width, INT32 height, tic_t ticks)
 
        while (ticks--)
        {
-#ifdef SHUFFLE
+#if defined (SHUFFLE) && defined (HWRENDER)
                if(rendermode != render_soft)
                {
 
@@ -130,7 +130,7 @@ void F_WipeStartScreen(void)
 #ifndef NOWIPE
        if(rendermode != render_soft)
        {
-#ifdef SHUFFLE
+#if defined (SHUFFLE) && defined (HWRENDER)
                HWR_StartScreenWipe();
 #endif
                return;
diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 22207a0..b76992d 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -2869,7 +2869,7 @@ static void HWR_Subsector(size_t num)
                        {
                                if (rover->flags & FF_FOG)
                                {
-                                       byte alpha;
+                                       UINT8 alpha;
 
                                        light = R_GetPlaneLight(gr_frontsector, *rover->topheight, dup_viewz < *rover->topheight ? true : false);
 
diff --git a/src/r_things.c b/src/r_things.c
index 0d5d678..173c8a9 100644
--- a/src/r_things.c
+++ b/src/r_things.c
@@ -32,7 +32,9 @@
 #include "r_plane.h"
 #include "p_tick.h"
 #include "p_local.h"
-#include "hardware\hw_md2.h"
+#ifdef HWRENDER
+#include "hardware/hw_md2.h"
+#endif
 
 #ifdef PC_DOS
 #include <stdio.h> // for snprintf
@@ -412,8 +414,10 @@ void R_AddSpriteDefs(UINT16 wadnum)
 
                if (R_AddSingleSpriteDef(spritename, &sprites[i], wadnum, start, end))
                {
+#ifdef HWRENDER
                        if (rendermode == render_opengl)
                                HWR_AddSpriteMD2(i);
+#endif
                        // if a new sprite was added (not just replaced)
                        addsprites++;
                        if (devparm)
@@ -2853,8 +2857,10 @@ next_token:
                ST_LoadFaceGraphics(skins[numskins].faceprefix, skins[numskins].superprefix, numskins);
                ST_LoadFaceNameGraphics(skins[numskins].nameprefix, numskins);
 
+#ifdef HWRENDER
                if (rendermode == render_opengl)
                        HWR_AddPlayerMD2(numskins);
+#endif
Oops, I knew I'd have done SOMETHING wrong. I've applied the changes you pointed out and re-uploaded the executable and source code. Thanks.
__________________
Quote:
<MonsterIestyn> try ctrl+f masturbation and get to the point
Sryder13 is offline