DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Code] Shading Tutorial & Fixes - Ripper
Page 2 of 3 Goto page Previous  1, 2, 3  Next
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Guest




Last Visit:





PostPosted: Sun Apr 10, 2005 9:53 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I've used rippers shading tutorial and it works fine for me, but I have a little problem, I want to combine Kuki's electricity switch with this shading code, so when electricity is off then I'll use the shading and when I switch the electricity on again I wan't it to be light again. Can someone help me with this?
Guest




Last Visit:





PostPosted: Mon Apr 11, 2005 8:07 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Just wrote about it in the code crackers section.
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 16 Jan 2018

Topics: 46
Posts: 2293
Location: USA
usa.gif

PostPosted: Tue Apr 19, 2005 11:36 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I seem to have found a problem in VGAClearSccreen when the SkyState is 0 (the original draw).
If SHADE_COUNT is less than 32 (I'm using 16), the ceiling/floor is only half drawn and the rest is filled with strange lines where the shading *would* be, but is instead colors from the walls or someplace else in memory. I have also applied the No Scalers tutorial if that makes a different. I will try this out soon with clean source.

I seem to need to use 16 because 32 will cause Orb to bomb with "Out of memory" errors when loading the background picture on the menu screen (16*256 = 4096 bytes freed and it looks almost as well with 16). Orb has become a balancing act of code vs. vswap memory pages just to keep the OOM errors from appearing.

Everything looks great with the textured flats, but as soon as I shut them off, I get those weird lines.

EDIT: Nevermind, I think I found the problem. I changed the line that reads "shr bh,5" to "shr bh,4" so that I'm dividing by 16 instead of 32.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Guest




Last Visit:





PostPosted: Wed May 04, 2005 5:51 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

when try to build wolf3d, I get a linker error: |Undefined Symbole _FarScalePost in modual WL_DEBUG.C| Is there any thing that links the two source files together that include ScalePost?
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Thu May 05, 2005 2:14 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Shading tutorial wrote:
Search for the ScalePost function and replace the whole thing by the following line (don't touch the variables above (i.e. postwidth) or the FarScalePost function):

You removed the FarScalePost function in WL_DRAW.C, so you need to recover it.
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 14 Jan 2018

Topics: 66
Posts: 1240
Location: Loppi - Finland
finland.gif

PostPosted: Wed Jul 13, 2005 8:10 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Where can I found file "WL_DR_A.OBJ" because everytime I try to compile my source
files after using Shading Tutorial, my Borland C++ compiler requires it (also it tells me
that it cannot locate files Extern_A.ASM and Extern_A.OBJ
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Fri Jul 15, 2005 2:58 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You seem to have messed up your Wolf project file!
Please make sure, that the WL_DR_A.asm file is included in your project (you should be able to add files with the <INSERT> key, when the project window is selected).
For the Extern_A.ASM file, I never heard of it! How did this file get into your project? Perhaps you have to remove it with the <DELETE> key from your project (again in the project window of course).
Guest




Last Visit:





PostPosted: Tue Aug 02, 2005 11:08 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

The code compiles fine, but when it links, I get 11 errors.

Linker error: _fullscalefarcall is an undefined symbol in module SHADE_A.ASM
Linker error: _mapmask3 is an undefined symbol in module SHADE_A.ASM

etc.

How do I fix this?
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Fri Aug 05, 2005 11:39 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You also messed up your code. Recover your backup and redo the tutorial, but a bit more carefully this time Wink
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 15 Oct 2017

Topics: 22
Posts: 1281
Location: Rauma - Finland
finland.gif

PostPosted: Mon Aug 08, 2005 3:08 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Harpuia wrote:
The code compiles fine, but when it links, I get 11 errors.

Linker error: _fullscalefarcall is an undefined symbol in module SHADE_A.ASM
Linker error: _mapmask3 is an undefined symbol in module SHADE_A.ASM

etc.

How do I fix this?


Are you using the version where you shouldn't have SHADE_A.ASM in your project,
if you do remove that file and compile again.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Wed Dec 13, 2006 5:36 am
   Subject: Update for Wolf4GW
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Works with Wolf4gw_freepush3 as of 13/12/06 Smile

Ripper's put in most of the code for this already (all the #ifdef SHADE_COUNT bits), which is handy because Watcom appears to handle assembly differently from Borland. The key differences are:

1) DON'T REMOVE ScalePost, CHANGE VGAClearScreen OR ADD THE ASSEMBLY FILE! They're not needed.

2) Define:
::: CODE :::

unsigned maxscaleshl2=((int)((double)viewwidth*0.75))<<2;
byte *curshades;

above ScalePost. (note: the value for maxscaleshl2 is what I managed to come up with based on the original source that actually worked. Lots of other values seem not to mess up the engine, so I still have no idea what it's doing here.).

3) There is no longer a WL_SCALE.cpp file so add 'unsigned shade=0;' to the definitions at the start of WL_DRAW.cpp instead.

4) Change the '&gamepal' parameters in the PlayLoop to 'gamepal' (remove the &).

5) Change 'mincol' in GetColor to some other variable name...i think mincol is already declared elsewhere, at least it gives me an error if I use 'mincol' and no error using 'mincol2'.

6) There's some other changes in indirection floating around with some of the pointers, just try to compile and chase down each error individually, there shouldn't be too many.




I think that's most of it - these are just pointers to help anyone who wants to muck around with the 4GW code and knows vaguely what they're doing, not stuff to be cut'n'pasted. Please don't blame me if this messes up your code.

Cheers,
the_fish
Rux
DieHard Guard
DieHard Guard


Joined: 17 Dec 2006
Last Visit: 15 Nov 2015

Topics: 34
Posts: 202
Location: Port Angeles, WA
usa.gif

PostPosted: Fri Dec 22, 2006 2:14 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I've messed with the PlayLoop function where the shading controls are but I'm just not getting the result I wanted; How can I get a good thick fog shade without making it all bright?

_________________
Like Metroid? Like fangames? Like top-down games? Like FUN? Head over to www.metroidcoven.com and check out my game called Metroid: Coven.
lwmxynedtodth
DieHard Officer
DieHard Officer


Joined: 28 May 2006
Last Visit: 22 Aug 2017

Topics: 38
Posts: 570
Location: Neverland
netherlands.gif

PostPosted: Fri Dec 22, 2006 2:22 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Setting LSHADE_FLAG to 5 in the appropriate routine. I forgot how it was called, but you can set these flags for each of the levels. In the tutorial is also noticed that 1 is normal, and 5 is thick 'smokey.' For the color, just adjust the function I told above, it is all in there.

- lwmxynedtodth

_________________
lwmxynedtodth (portfolio, blog and more)
Killer-suit: Masterminds
On a MMORPG trip.
Rux
DieHard Guard
DieHard Guard


Joined: 17 Dec 2006
Last Visit: 15 Nov 2015

Topics: 34
Posts: 202
Location: Port Angeles, WA
usa.gif

PostPosted: Fri Dec 22, 2006 2:47 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hmm... I'm still not quite understanding. I'm still a little new to coding. You need to be a little more specific for me... sorry... I found LShade_Flag but I don't see what to change. Sorry for my tardliness, I'm still learning Wink

EDIT: Actually I figured it out. I made it thicker by changing LSHADE_FOG in the globals part of WLDEF.H from 5 to 10.

_________________
Like Metroid? Like fangames? Like top-down games? Like FUN? Head over to www.metroidcoven.com and check out my game called Metroid: Coven.


Last edited by Rux on Sat Dec 23, 2006 9:48 am; edited 2 times in total
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 13 Jan 2018

Topics: 55
Posts: 2118
Location: Canada
blank.gif

PostPosted: Fri Dec 22, 2006 10:19 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Speaking of shading fixes, I don't know about you guys, but I find it quite odd playing games with shading (like End of Destiny) on old computers or in DosBox where it just hangs on a black screen while the game is loading the shading tables... so you wonder what's going on, or if the game just froze. It looks especially strange when dying and then seeing an unanimated BJ staring sideways with a giant blotch of red on the screen for like 10 seconds before it's finished. Laughing

Anyway, I quickly cooked up a little "percentage bar" so the user knows the game is actually loading. Feel free to use/edit it if you want...

::: CODE :::
void GenerateShadeTable(byte red,byte green,byte blue,byte far *palette,int fog)
{
   int count;
   int n;
   double R,G,B,R1,G1,B1,DeltaR,DeltaG,DeltaB,StepR,StepG,StepB;

   if (playstate == ex_died)
      return;

   gamestate.faceframe = 0;
   DrawFace();

   VWB_Bar (63,86,100,12,1);
   PrintX=65;
   PrintY=88;
   fontnumber = 0;
   fontcolor = 15;
   US_Print("Loading level...");
   fontcolor = 44;

   VW_UpdateScreen();
   VW_FadeIn();


   // Set the fog-flag
   LSHADE_flag=fog;

   // Color loop
   for (count=0; count<256; count++)
   {
      // Get original palette color
      R=R1=(double) *(palette+(count*3));
      G=G1=(double) *(palette+(count*3)+1);
      B=B1=(double) *(palette+(count*3)+2);

      // Calculate difference to final color
      DeltaR=(double)red-R1;
      DeltaG=(double)green-G1;
      DeltaB=(double)blue-B1;

      // Calculate increment per step
      StepR=DeltaR / (double)(SHADE_COUNT+8);
      StepG=DeltaG / (double)(SHADE_COUNT+8);
      StepB=DeltaB / (double)(SHADE_COUNT+8);

      // Calc color for each shade of the active color
      for (n=0; n<SHADE_COUNT; n++)
      {
         shadetable[n][count]=GetColor((byte)R,(byte)G,(byte)B,palette);

         // Inc to next shade
         R+=StepR;
         G+=StepG;
         B+=StepB;
      }

      if (count%8 == 0)
      {
         VWB_Bar (165,86,90,12,37);
         PrintX=167;
         US_PrintUnsigned(count*100/256);
         US_Print("% complete");
         VW_WaitVBL(1);
         VW_UpdateScreen();
      }


   }
}

Also, I just made it return (exit the function) if you died, because I'm pretty sure you don't need to load the shading tables all over again if you're restarting the same level, since will just load the same table anyway. Feel free to correct me if I'm wrong though. Hooray for shading conversations... and stuff.
Rux
DieHard Guard
DieHard Guard


Joined: 17 Dec 2006
Last Visit: 15 Nov 2015

Topics: 34
Posts: 202
Location: Port Angeles, WA
usa.gif

PostPosted: Sat Dec 30, 2006 7:06 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Apparently, since I can change L_SHADE_FOG to make the fog thicker or thinner, How can I incorporate it to make it change thickness depending on level?? I've used the shading, textured ceilings/floors, directional sprites, and outside atmosphere. They all work 110% perfect. And this is what my ThreeDRefresh code looks like...

::: CODE :::
void   ThreeDRefresh (void)
{
   int tracedir,texture,texture2;
   unsigned ceiling, floor;
   boolean flats;
   //
   // Get ceiling colour from vgaCeiling array
   // and set default floor to Gray (original)
   // Set other defaults as well
   //
   ceiling=vgaCeiling[gamestate.episode*10+gamestate.mapon];
   floor = 0x1919;
   SkyState = 0;
   flats = false;
   texture = 0;
   texture2 = 0;
   
   // this wouldn't need to be done except for my debugger/video wierdness
      outportb (SC_INDEX,SC_MAPMASK);

   //
   // clear out the traced array
   //
   asm mov   ax,ds
   asm mov   es,ax
   asm mov   di,OFFSET spotvis
   asm xor   ax,ax
   asm mov   cx,2048   // 64*64 / 2
   asm rep stosw
   
   bufferofs += screenofs;

   //
   //  Here we define what we are going to use for each map.
   //
   //  SkyState - 0 = Original Coloured Ceiling
   //                1 = Starry Sky
   //               2 = Starry Sky with Rain
   //               3 = Starry Sky with Snow
   //    ceiling, floor - Only if you don't want to use the defaulted originals
   //  flats - true = use defined textures below - false = no ceiling/floor texture
   //  texture - the Texture that you wish to use for your ceiling/floor 
   
      switch (gamestate.mapon) // defining which level and what you want for it.
      {
         //
         // 1 case for each map in your game
         // You need only define the things you are going to
         // use for that level.
         //
      case 0: // Defines for map level 1
         //ceiling = 0x0000;  // Remmed to use the default ceiling colour
         //floor = 0x0000;    // Remmed to use the default floor colour
         flats = true;      // Remmed - No ceiling floor textures
         texture = 98;       // Remmed - Not used as flats = false
    texture2 = 99;
         //SkyState = 1;         // Sky with Stars
         break;
      case 1: // Defines for map level 2
         //ceiling = 0x0000;   // Remmed to use the default ceiling colour
         floor = 0x0000;         // Use "black" as Floor colour
         //flats = false;       // Remmed - No Ceiling/Floor Textures
         //texture = 0;        // Not used as flats = false
    SkyState = 2;          // Sky with Stars and rain
         break;
      case 2: // Defines for map level 3
         ceiling = 0x2a3a;       // Use our own defined ceiling colour
         //floor = 0x0000;       // Remmed use default gray colour
         flats = false;        // Use Wolf3d original Look
         //texture = 0;          // Not used as flats = false
         //SkyState = 0;        // Remmed - Use Wolf3d original look
         break;
      case 3: // Defines for map level 4
         //ceiling = 0x0000;   // Remmed to use the default ceiling colour
         //floor = 0x0000;     // Remmed for default Floor colour
         //flats = true;           // Use Ceiling/Floor Textures
    //texture = 1;            // Used Stone Texture
         //SkyState = 2;       // Using Ceiling/Floor Textures
         break;
         
         //   
         // Continue with "case" defines util you have defined all
         // the levels you wish to use in your game.
         //
         // ie: if you have 10 levels, you need 10 "case" defines
         //
       
      }
       
      // if not using textures clear the screen
       
      if (!flats || SkyState) VGAClearScreen(ceiling, floor, SkyState);
       
      // next we draw the walls
       
      WallRefresh();
       
      // next we draw the textures if used
       
      if (flats)
   DrawFlats(texture,texture2);      // draw textured floor/ceiling

      // then we draw all the scaled images
      // of guards and object sprites

      DrawScaleds();

      // next we call to Rippers Snow & Rain if Skystate > 1

      if(SkyState==3) PaintSnow(viewsin,viewcos);
      else if(SkyState==2) PaintRain(viewsin,viewcos);

      // then we draw the players hands/weapons

        DrawPlayerWeapon ();   

      //
      // show screen and time last cycle
      //
      if (fizzlein)
         {
            FizzleFade(bufferofs,displayofs+screenofs,viewwidth,viewheight,20,false);
            fizzlein = false;
            lasttimecount = TimeCount = 0; // don't make a big tic count
         }

      bufferofs -= screenofs;
      displayofs = bufferofs;

      asm cli
      asm mov   cx,[displayofs]
      asm mov   dx,3d4h   // CRTC address register
      asm mov   al,0ch   // start address high register
      asm out   dx,al
      asm inc   dx
      asm mov   al,ch
      asm out   dx,al      // set the high byte
      asm sti
       
       
      bufferofs += SCREENSIZE;
      if (bufferofs > PAGE3START) bufferofs = PAGE1START;

      frameon++;
      PM_NextFrame();
}

It is fully functional and all, But I was wondering how I can let it control the L_SHADE_FOG value...

_________________
Like Metroid? Like fangames? Like top-down games? Like FUN? Head over to www.metroidcoven.com and check out my game called Metroid: Coven.
lwmxynedtodth
DieHard Officer
DieHard Officer


Joined: 28 May 2006
Last Visit: 22 Aug 2017

Topics: 38
Posts: 570
Location: Neverland
netherlands.gif

PostPosted: Sun Dec 31, 2006 3:42 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Arclese wrote:
Actually I figured it out. I made it thicker by changing LSHADE_FOG in the globals part of WLDEF.H from 5 to 10.


I actually meant PlayLoop in WL_PLAY.C:
::: CODE :::

void PlayLoop (void)
{
   int      give;
   int   helmetangle;

   // Different shade tables (and shade intensitys)
      switch (gamestate.episode*10+mapon)
      {
            case 0:GenerateShadeTable(15,15,15,&gamepal,LSHADE_FOG); break;
            case 1:GenerateShadeTable(0,20,0,&gamepal,LSHADE_NORMAL); break;
            case 2:
            case 6:GenerateShadeTable(0,0,0,&gamepal,LSHADE_NORMAL); break;
            case 5:GenerateShadeTable(0,0,0,&gamepal,LSHADE_FOG); break;
            default:GenerateShadeTable(10,10,10,&gamepal,LSHADE_NORMAL); break;
      }

Change 'LSHADE_FOG' and 'LSHADE_NORMAL' in another value or another variable. These case values are the levels, so level 0 is foggy, level 1 normal and so on. Oh, correct me if I'm wrong, but I forgot whether these cases were episodes or levels. Hope that helps, same goes for your last question: I meant you should set it right here.

- lwmxynedtodth

_________________
lwmxynedtodth (portfolio, blog and more)
Killer-suit: Masterminds
On a MMORPG trip.
Rux
DieHard Guard
DieHard Guard


Joined: 17 Dec 2006
Last Visit: 15 Nov 2015

Topics: 34
Posts: 202
Location: Port Angeles, WA
usa.gif

PostPosted: Sun Dec 31, 2006 8:39 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I thought that was for the color of the fog.

_________________
Like Metroid? Like fangames? Like top-down games? Like FUN? Head over to www.metroidcoven.com and check out my game called Metroid: Coven.
lwmxynedtodth
DieHard Officer
DieHard Officer


Joined: 28 May 2006
Last Visit: 22 Aug 2017

Topics: 38
Posts: 570
Location: Neverland
netherlands.gif

PostPosted: Sun Dec 31, 2006 11:07 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

case 0:GenerateShadeTable(15,15,15,&gamepal,LSHADE_FOG); break;

case 0:GenerateShadeTable(colorR,colorG,colorB,&gamepal,intensity); break;

You're right, but also for the intensity.

- lwmxynedtodth

_________________
lwmxynedtodth (portfolio, blog and more)
Killer-suit: Masterminds
On a MMORPG trip.
Rux
DieHard Guard
DieHard Guard


Joined: 17 Dec 2006
Last Visit: 15 Nov 2015

Topics: 34
Posts: 202
Location: Port Angeles, WA
usa.gif

PostPosted: Sun Dec 31, 2006 6:08 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Oh-- HAHA! I should slap myself for not seeing that... thanks lol

_________________
Like Metroid? Like fangames? Like top-down games? Like FUN? Head over to www.metroidcoven.com and check out my game called Metroid: Coven.
insurrectionman
DieHard Mutant
DieHard Mutant


Joined: 07 May 2005
Last Visit: 09 Jan 2018

Topics: 86
Posts: 754
Location: Wisconsin
usa.gif

PostPosted: Mon Feb 19, 2007 5:52 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Okay, for Wolf4GW, I put all the fixes in, except now all the textured floors\ceilings and static sprites and enemies are all color FF. Did I miss something in the GetColor, or GenerateShadeTable functions, because that supposedly is the root of the problem. Or is it where I defined maxscaleshl2?

_________________
I'm back! I missed this community!
Youtube Channel: TreeSapThief

New Site: http://www.treesapthief.com
Twitter: @treesapthief
Born4battle
DieHard SS
DieHard SS


Joined: 24 Mar 2006
Last Visit: 21 Jun 2014

Topics: 37
Posts: 388
Location: Cherry Chocolate Reign!!!
usa.gif

PostPosted: Tue Jun 05, 2007 8:15 pm
   Subject: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Problem!!! when i try to compile, only after that big chunk of text where it is only shaded walls, it has a list of "Error ID_Heads.h 4: Unable to open include file "alloc.h", but replace alloc.h with a bunch of other ones as the list continues. "4" also increases by 1 each time respectively.

_________________
Thunderstorm "War is a conflict that does not determine who is right, but who is left." Thunderstorm
Ultimator
Registered User
Registered User


Joined: 30 Oct 2005
Last Visit: 17 Jun 2008

Topics: 2
Posts: 22

usa.gif

PostPosted: Tue Jun 19, 2007 9:21 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Everything compiled fine for me, and when I play, it looks amazing in the level I've designed. However, once I leave the first level, I start getting "slime trails" on the screen running vertically (anyone who's had this happen in Doom knows the problem). The more I move, the more slime trails come down the screen. Before long, the game crashes. Has anybody else had this problem (I doubt it), and if so, where's the problem? I'm sure I've followed the tutorial to the T, but again, I could have made a mistake somewhere, and if someone else has experienced this, I'd like to know where the problem is so I can try to fix it myself (before I beg for spoon feeding).
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2255
Location: Ontario
canada.gif

PostPosted: Tue Jun 19, 2007 11:20 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Check the conditions around the "VGAClearScreen" in your ThreeDRefresh routine. That problem usually occurs when the the screen is not being cleared properly.... ie: you aren't calling the Clearscreen on that level...

Greg
BrotherTank
Ultimator
Registered User
Registered User


Joined: 30 Oct 2005
Last Visit: 17 Jun 2008

Topics: 2
Posts: 22

usa.gif

PostPosted: Tue Jun 19, 2007 11:37 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

BrotherTank wrote:
Check the conditions around the "VGAClearScreen" in your ThreeDRefresh routine. That problem usually occurs when the the screen is not being cleared properly.... ie: you aren't calling the Clearscreen on that level...

Greg
BrotherTank


Yep, the VGAClearScreen was nested in a loop that couldn't be fulfilled because I made a few silly typos.

Thanks, works perfectly now.
thellt
Bring 'em On
Bring 'em On


Joined: 21 Jan 2008
Last Visit: 12 May 2009

Topics: 11
Posts: 85
Location: bloodgulch
usa.gif

PostPosted: Mon Apr 07, 2008 2:08 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

hey brother tank! hope u got my "email" message....

i uh... to make it simple want to turn it off for certain cases. i use version.h still for my dosbox release of h3d, and i wonder how i can use it to turn off shading for dos box use. i found one way but it turned everything but the sky black... erm... that was wierd...

_________________
}{even or }{ellt?

look for helt3d
Born4battle
DieHard SS
DieHard SS


Joined: 24 Mar 2006
Last Visit: 21 Jun 2014

Topics: 37
Posts: 388
Location: Cherry Chocolate Reign!!!
usa.gif

PostPosted: Mon Apr 07, 2008 2:52 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You could compile it two seperate times. Comment out the stuff in the tutorial, compile, copypaste folder, uncomment and compile again!

_________________
Thunderstorm "War is a conflict that does not determine who is right, but who is left." Thunderstorm
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 13:42 ago.

Topics: 161
Posts: 8021
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Apr 07, 2008 7:20 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It needn't be coded in such a complicated manner. Just have the shade features enabled/disabled through "#if def", and it saves a lot of pain and hassle. Smile
Born4battle
DieHard SS
DieHard SS


Joined: 24 Mar 2006
Last Visit: 21 Jun 2014

Topics: 37
Posts: 388
Location: Cherry Chocolate Reign!!!
usa.gif

PostPosted: Mon Apr 07, 2008 9:47 pm
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ah, yes. It has been a while since I have taken a look at any C/C++ source code. Forgot about if def.

_________________
Thunderstorm "War is a conflict that does not determine who is right, but who is left." Thunderstorm
thellt
Bring 'em On
Bring 'em On


Joined: 21 Jan 2008
Last Visit: 12 May 2009

Topics: 11
Posts: 85
Location: bloodgulch
usa.gif

PostPosted: Tue Apr 08, 2008 8:08 am
   Subject: Re: [Code] Shading Tutorial & Fixes - Ripper
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

i already have that but i get a black screen with the exception of the "sky" and "floor"... erm... i will copy my code in version.h and wl_play.c when i get a chance... it is funny though. i might put it in teh "weirdest bugs" topic... WHEN I POST TEH CODE CAN SOMEBODY PLZ HELP ME.

_________________
}{even or }{ellt?

look for helt3d


Last edited by thellt on Tue Apr 08, 2008 2:07 pm; edited 1 time in total
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 2 of 3 Goto page Previous  1, 2, 3  Next
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Add Text to Screen at Skill Level select - Chris
Author: Chris
3 2473 Tue Sep 28, 2010 6:59 pm
Tricob View latest post
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 2410 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 2003 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 2734 Sun Oct 26, 2003 1:21 am
Guest View latest post
No new posts [Help] Different Enemy Dying Frames/Views
Author: Guest
7 609 Tue Jul 29, 2003 3:00 pm
Codetech84 View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group