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       

[Tutorial] Multi-textured floors
Page 6 of 8 Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  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
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Tue Aug 22, 2006 9:01 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Your code was like this:

::: CODE :::

/*
** use USE_TEX(n) to use floor/ceiling textures for given level
** n should be 1..255 !!!
** it is MAP-ID (from FloEdit). First texture goes to floor, second to ceiling
*/

unsigned vgaCeiling[]=


// An dieser Stelle kommt ein Riesenhaufen neuer Code. Ich habe gekennzeich-
// net, wo er aufh”rt und der alte Code weitergeht.
// Los geht's.
// ------------------------- * Textured flats * -------------------------
/*
** Draw Textured Floor/Ceiling
*/
void DrawFlats(unsigned tex_f, unsigned tex_c)
{
  int x, y, y0, halfheight;
  unsigned top_offset0, bot_offset0, top_offset, bot_offset;
  unsigned top_add, bot_add;
  byte p, color;
  byte far *src_bot, far *src_top;

  fixed dist;            // distance to row projection
  fixed tex_step;        // global step per one screen pixel
  fixed gu, gv, du, dv; // global texture coordinates
  int u, v;              // local texture coordinates

// ------ * prepare * --------
  halfheight=viewheight>>1;
  y0=min_wallheight>>3;      // starting y value
  if(y0>halfheight) return;  // view obscued by walls
  if(y0==0) y0=1;           // don't let division by zero
  top_offset0=80*(halfheight-y0-1);  // and will decrease by 80 each row
  bot_offset0=80*(halfheight+y0);  // and will increase by 80 each row

  src_bot=PM_GetPage(tex_f); // load floor texture
  src_top=PM_GetPage(tex_c); // load ceiling texture

// draw horizontal lines
  for(p=0; p<4; p++)
  {
    asm mov ax,0x0102
    asm mov cl,[p]
    asm shl ah,cl
    asm mov dx,0x3c4
    asm out dx,ax

    for(y=y0, top_offset=top_offset0, bot_offset=bot_offset0; y<halfheight; y++, top_offset-=80, bot_offset+=80)
    {
      dist=(heightnumerator/y)<<5;

      gu= viewx+FixedByFrac(dist, viewcos);
      gv=-viewy+FixedByFrac(dist, viewsin);

      tex_step=(dist<<8)/viewwidth/175;

      du= FixedByFrac(tex_step, viewsin);
      dv=-FixedByFrac(tex_step, viewcos);

      gu-=((viewwidth>>1)-p)*du;
      gv-=((viewwidth>>1)-p)*dv; // starting point (leftmost)

      du<<=2; // 4pix step
      dv<<=2;

      for(x=p, top_add=top_offset, bot_add=bot_offset; x<viewwidth; x+=4, top_add++, bot_add++)
      {
   if(wallheight[x]>>3<=y)
   {
     u=(gu>>10)&63; v=(gv>>10)&63;
     color=*(src_top+((63-u)<<6)+(63-v));

// draw top pixel using [color]
     asm mov es,[screenseg]
     asm mov di,[bufferofs]
     asm add di,[top_add]

     asm mov al,[color]
     asm mov es:[di],al

     color=*(src_bot+(u<<6)+(63-v));

// draw bottom pixel using [color]
     asm mov es,[screenseg]
     asm mov di,[bufferofs]
     asm add di,[bot_add]

     asm mov al,[color]
     asm mov es:[di],al
   }
   gu+=du; gv+=dv;
      }
    }
  }
}
// Hier ist das Ende des neu eingefhgten Codes erreicht.


{
#ifndef SPEAR
// 1      2      3      4      5      6      7      8      9      B
// alte erste Zeile 0x9e9e,0x1d1d,0xdddd,0x1d1d,0x1e1e,0xd7d7,0xdede,0x9e9e,0x1d1d,0x1c1c,
 USE_TEX(32),0x1d1d,0xdddd,0x1d1d,0x1e1e,0xd7d7,0xdede,0x9e9e,0x1d1d,0x1c1c,
 0xd7d7,0xdede,0xdcdc,0x1d1d,0x9f9f,0xdede,0x1d1d,0x2d2d,0x1d1d,0x9f9f,
 0x6f6f,0x2f2f,0xe4e4,0x1d1d,0x1d1d,0x2d2d,0xdddd,0x1d1d,0x9f9f,0x1e1e,
 0x1d1d,0x9d9d,0x2d2d,0xdede,0xdede,0x9d9d,0x2d2d,0xd7d7,0x1d1d,0xdddd,
 0x6f6f,0x1d1d,0x2d2d,0x2d2d,0xdddd,0xd7d7,0x1d1d,0x1d1d,0x1d1d,0x2d2d,
 0x1d1d,0x1d1d,0x1d1d,0x1d1d,0xdddd,0xdddd,0x6f6f,0xe6e6,0x9d9d,0xdddd
#else
 0x6f6f,0x4f4f,0x1d1d,0xdede,0xdfdf,0x2e2e,0x7f7f,0x9e9e,0xaeae,0x7f7f,
 0x1d1d,0xdede,0xdfdf,0xdede,0xdfdf,0xdede,0xe1e1,0xdcdc,0x2e2e,0x1d1d,0xdcdc
#endif
};


But if I remember this right, it should be like this:

::: CODE :::


/*
** use USE_TEX(n) to use floor/ceiling textures for given level
** n should be 1..255 !!!
** it is MAP-ID (from FloEdit). First texture goes to floor, second to ceiling
*/

// An dieser Stelle kommt ein Riesenhaufen neuer Code. Ich habe gekennzeich-
// net, wo er aufh”rt und der alte Code weitergeht.
// Los geht's.
// ------------------------- * Textured flats * -------------------------
/*
** Draw Textured Floor/Ceiling
*/
void DrawFlats(unsigned tex_f, unsigned tex_c)
{
  int x, y, y0, halfheight;
  unsigned top_offset0, bot_offset0, top_offset, bot_offset;
  unsigned top_add, bot_add;
  byte p, color;
  byte far *src_bot, far *src_top;

  fixed dist;            // distance to row projection
  fixed tex_step;        // global step per one screen pixel
  fixed gu, gv, du, dv; // global texture coordinates
  int u, v;              // local texture coordinates

// ------ * prepare * --------
  halfheight=viewheight>>1;
  y0=min_wallheight>>3;      // starting y value
  if(y0>halfheight) return;  // view obscued by walls
  if(y0==0) y0=1;           // don't let division by zero
  top_offset0=80*(halfheight-y0-1);  // and will decrease by 80 each row
  bot_offset0=80*(halfheight+y0);  // and will increase by 80 each row

  src_bot=PM_GetPage(tex_f); // load floor texture
  src_top=PM_GetPage(tex_c); // load ceiling texture

// draw horizontal lines
  for(p=0; p<4; p++)
  {
    asm mov ax,0x0102
    asm mov cl,[p]
    asm shl ah,cl
    asm mov dx,0x3c4
    asm out dx,ax

    for(y=y0, top_offset=top_offset0, bot_offset=bot_offset0; y<halfheight; y++, top_offset-=80, bot_offset+=80)
    {
      dist=(heightnumerator/y)<<5;

      gu= viewx+FixedByFrac(dist, viewcos);
      gv=-viewy+FixedByFrac(dist, viewsin);

      tex_step=(dist<<8)/viewwidth/175;

      du= FixedByFrac(tex_step, viewsin);
      dv=-FixedByFrac(tex_step, viewcos);

      gu-=((viewwidth>>1)-p)*du;
      gv-=((viewwidth>>1)-p)*dv; // starting point (leftmost)

      du<<=2; // 4pix step
      dv<<=2;

      for(x=p, top_add=top_offset, bot_add=bot_offset; x<viewwidth; x+=4, top_add++, bot_add++)
      {
   if(wallheight[x]>>3<=y)
   {
     u=(gu>>10)&63; v=(gv>>10)&63;
     color=*(src_top+((63-u)<<6)+(63-v));

// draw top pixel using [color]
     asm mov es,[screenseg]
     asm mov di,[bufferofs]
     asm add di,[top_add]

     asm mov al,[color]
     asm mov es:[di],al

     color=*(src_bot+(u<<6)+(63-v));

// draw bottom pixel using [color]
     asm mov es,[screenseg]
     asm mov di,[bufferofs]
     asm add di,[bot_add]

     asm mov al,[color]
     asm mov es:[di],al
   }
   gu+=du; gv+=dv;
      }
    }
  }
}
// Hier ist das Ende des neu eingefhgten Codes erreicht.


unsigned vgaCeiling[]=

{
#ifndef SPEAR
// 1      2      3      4      5      6      7      8      9      B
// alte erste Zeile 0x9e9e,0x1d1d,0xdddd,0x1d1d,0x1e1e,0xd7d7,0xdede,0x9e9e,0x1d1d,0x1c1c,
 USE_TEX(32),0x1d1d,0xdddd,0x1d1d,0x1e1e,0xd7d7,0xdede,0x9e9e,0x1d1d,0x1c1c,
 0xd7d7,0xdede,0xdcdc,0x1d1d,0x9f9f,0xdede,0x1d1d,0x2d2d,0x1d1d,0x9f9f,
 0x6f6f,0x2f2f,0xe4e4,0x1d1d,0x1d1d,0x2d2d,0xdddd,0x1d1d,0x9f9f,0x1e1e,
 0x1d1d,0x9d9d,0x2d2d,0xdede,0xdede,0x9d9d,0x2d2d,0xd7d7,0x1d1d,0xdddd,
 0x6f6f,0x1d1d,0x2d2d,0x2d2d,0xdddd,0xd7d7,0x1d1d,0x1d1d,0x1d1d,0x2d2d,
 0x1d1d,0x1d1d,0x1d1d,0x1d1d,0xdddd,0xdddd,0x6f6f,0xe6e6,0x9d9d,0xdddd
#else
 0x6f6f,0x4f4f,0x1d1d,0xdede,0xdfdf,0x2e2e,0x7f7f,0x9e9e,0xaeae,0x7f7f,
 0x1d1d,0xdede,0xdfdf,0xdede,0xdfdf,0xdede,0xe1e1,0xdcdc,0x2e2e,0x1d1d,0xdcdc
#endif
};

_________________
False Spear download
False Spear SDL download
Wolfenstein-blog


Last edited by WLHack on Tue Aug 22, 2006 9:05 am; edited 1 time in total
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Tue Aug 22, 2006 9:03 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

So you had accidently misplaced one part of the VGACeiling function.

_________________
False Spear download
False Spear SDL download
Wolfenstein-blog
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 9:09 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I just did it and moved the line. Again, the compiler fools around. Now in 1134:19 telling "Multiple declaration for 'ceiling'".
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Tue Aug 22, 2006 10:06 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Maybe you should put the vgaceiling function before the drawflats function.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 10:15 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is where it was at the beginning and didn't work. If it helps you, I could uploade my whole code with all the files and if you don't get suck about it you are welcome to take a look at it and correct everything that's wrong. Big credits are for sure! Too Cool
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Tue Aug 22, 2006 10:20 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

What happens if you change this:

::: CODE :::

void VGAClearScreen (unsigned ceiling)   // in der Klammer stand void
{
 unsigned ceiling=vgaCeiling[gamestate.episode*10+mapon];


To this:

::: CODE :::


void VGAClearScreen (void)
{
 unsigned ceiling=vgaCeiling[gamestate.episode*10+mapon];

_________________
False Spear download
False Spear SDL download
Wolfenstein-blog
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 10:32 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is what my comment was saying: before any changes, there stood "void" inside the brackets. I changed it now back to its original state and now it errors in line 1536: "Extra parameter in call to VGAClearScreen".
I become crazy if this goes on that way...
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 15 Oct 2017

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

PostPosted: Tue Aug 22, 2006 11:58 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Seems to me you are calling the function VGAClearScreen with a parameter when you just removed it from the function itself (unsigned ceiling) -> (void).
In this case extra parameter means that you have inserted a parameter, where VGAClearScreen is used (called), when there should be none (void = empty, none).

Call it like this instead:
::: CODE :::
VGAClearScreen ();

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 12:10 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Aaaaaaahhh! IT WORKS! Kiitos Sinulle!!
Don't know how many positions I have changed compared to the original tutorial, which seems to be full of errors (hello DarkOne, this was *your* tut!).

OK, it works so far.

Now I come to steps 2 and 3: Multi-textures for each level and the effect, that places which are far away look darker than places where the player stands right now.
Any ideas?
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Tue Aug 22, 2006 12:40 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, there is nothing wrong with DarkOne's tutorial. You probably inserted something wrong. But it's good that you found it out! I also had troubles the first time I tried to add it. It happens to probably anyone!
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 12:57 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, I checked it several times before I first tried to compile it.
But nevermind. Now it does what it should, and everything's fine.

As I mentioned I'd like to implement the feature which can be seen on these screenshots:
http://www.areyep.com/RIPandMCS-EoD-Screenshots.html
The ones in the right column: the far end of a room is dark, and there are different floors/ceilings in one level.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Tue Aug 22, 2006 1:38 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You mean shading, I think? You can find it at this website.

www.chaos-software.de.vu
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Tue Aug 22, 2006 1:40 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

And what you say about different floor/ceiling textures, that isn't true. EoD doesn't contain multiple floor/ceiling textures. I think you mean the outside atmosphere. It can also be found at chaos-software.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 1:49 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sorry, you're right. I had it in mind but it seems to be another game. But I'm sure to have read about the possibility of having several ceilings and/or floors on one level. Do you know how to build this into the engine? Best would be to edit the levels with ChaosEdit which offers this opportunity as far as I know but I don't know how to modify the engine so that it supports this feature.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Tue Aug 22, 2006 2:53 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK, I spent the last hour in changing the engine as the guys from Chaos Software described it. The compiler gives the following error message:
WL_DRAW.C: 1563:25 Too few parameters in call to VGAClearScreen. The brackets behind VGAClearScreen within the code are empty. When I fill them with "ceiling" (without quotes), I get a Linker error, which says: "__ScanTodVector defined in module c0.asm is duplicated in module C0.ASM" (wirtten in upper and lower case letters as displayed).
Once again, I did it exactly as told in the tut.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Wed Aug 23, 2006 6:33 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You tried to combine floor/ceiling textures with the outside atmosphere tutorial, I think? Well, there is a topic about this. Just search for fun with textures in the Code Crackers section. I hope you made a back-up of your source code, since it's difficult to insert if you're new to the code. It took me several times since I worked it out with some help.
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Wed Aug 23, 2006 7:17 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

C0.ASM? Wasn't that one of those files you can remove from the source since
it useless?

_________________
False Spear download
False Spear SDL download
Wolfenstein-blog
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Wed Aug 23, 2006 12:02 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@ronwolf:
No, I used the "Shading"-Tutorial from the page you gave me the link from: http://www.stud.uni-karlsruhe.de/~uvaue/chaos/shadingtut.html
So my first step was to include the procedure of having textures on floor and ceiling, and my second step should be the shading effect. The third step will be the possibility of having different floors and ceiling on one level. But right now it's on step 2 which doesn't want to work, and I don't know, why.

@WLHack:
I don't think so. Let me just have a look at the introducing tutorial for installing the compiler... As I am informed, only SIGNON.OBJ and GAMEPAL.OBJ should be removed but not the C0.ASM.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Wed Aug 23, 2006 12:31 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Maybe you should first install the removing the scalers tutorial, because if you installed that tutorial you don't have to make any changes in WL_SCALE.C, the ScalePost function in WL_DRAW.C and you don't have to include SHADE.asm if you install Shading.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Wed Aug 23, 2006 12:46 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sorry, I don't understand this:
ronwolf1705 wrote:
Maybe you should first install the removing the scalers tutorial
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Wed Aug 23, 2006 1:25 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

On the same site where you can find the shading tutorial, there is also a tutorial about saving memory, the removing the scalers tutorial. If you install that tutorial, you don't have to install some things I mentioned a couple of posts back.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Wed Aug 23, 2006 1:37 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

So you mean, if I install this "Removing the scalers"-tut, the shading-tut will work?
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Wed Aug 23, 2006 5:04 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Latzhosenjunge wrote:
So you mean, if I install this "Removing the scalers"-tut, the shading-tut will work?


I believe "Removing the Scalers" Is only truly "needed" if you are adding "Hi-Resolution" and is not need for "Shading".

Maybe start a new topic and explain your errors in "detail" therefore "someone" who "understands" them can "assist" so your "mod" will "work"

"quotation" marks "FTW"
"""""""""""""""""

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 15 Oct 2017

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

PostPosted: Wed Aug 23, 2006 10:01 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I think all mods should incorporate Removing the Scalers, it removes the restriction of memory in view size.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Wed Aug 23, 2006 10:15 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, like any other major mod, it has its drawbacks. It's fantastically useful, but it draws slower than the original routine, and it has a few quirks in it that I've seen (like the walls going all flattened and far apart at certain points).

Plus people might want to use DarkOne's raycaster. Wink

_________________
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Thu Aug 24, 2006 2:32 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

After installing the "Removing the scalers"-tut, the shading-effect works fine. Yet I cannot say if it draws slower than the original code; I'll find out.

Now the last step would be including multi-textures. Best would be if I could declare them using the 3rd plane feature of Choas-Edit. I just tried it out but the hard-coded textures remain.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Thu Aug 24, 2006 6:09 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

On Page 7 I have posted my DrawFlats function. It contains multi-textured floor/ceilings, shading and (if you want to use it) animated floors. Just replace your DrawFlats with my DrawFlats function in WL_DRAW.C. You would only have to change the MAPPLANES in ID_CA.H from 2 to 3 and then you have multi-textured floors and ceilings. If you want to use animated floors just use tile 24 as a floor texture.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Thu Aug 24, 2006 7:35 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Now I replaced the DrawFlats function with yours. It seems to work a little but I have trouble with areas where no ceiling/texture is assigned.

I noticed that the texture-feature only works when I modify the block in which the original ceiling-colours were stored in. The hex values have to be changed into USE_TEX(n), where n is a wall-ID. Is this n somehow important or may I cange the whole block into one and the same value so that every level in every episode has the same value?
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:47 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Thu Aug 24, 2006 7:37 am
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You can just put USE_TEX(32) in your vgaceiling, since you can just paint the floors and ceilings with Chaos-Edit and you don't have to use wall tile 32.
Latzhosenjunge
Can I Play Daddy
Can I Play Daddy


Joined: 20 Aug 2006
Last Visit: 17 Jun 2017

Topics: 1
Posts: 41
Location: Saarbrücken, Germany
germany.gif

PostPosted: Fri Aug 25, 2006 1:04 pm
   Subject: Re: [Tutorial] Multi-textured floors
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

As far as I can see now, it works perfectly. Gimme a little time to create the levels with Mapedit and then extend them with textured floor/ceiling. As soon as the Alpha is ready, I will post some screenshots in the gallery section of this board.
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 6 of 8 Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  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 2438 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 2381 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Adding a Frames per Second Counter - Darkone
Author: BrotherTank
0 1703 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 1969 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 2700 Sun Oct 26, 2003 1:21 am
Guest 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