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] Textured Floor/Ceiling - By Darkone
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
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Wed Mar 30, 2005 12:14 pm
   Subject: Mid-day massacre act 3.
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

No prob, folks Smile flamer promised me some kind of tutorial or solution for this open-looking sky. AReyeP managed to do it,so it can't be too hard. Probably just a little code modification.
I want Chris to be satisfied with "Out in the fields" level! He did so much to me, definitively deserves the nice green field level! Smile
(I hope I wrote correctly the word "definitively" Wink )

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Guest




Last Visit:





PostPosted: Thu Mar 31, 2005 1:30 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I haven`t promised any tutorial to you! If you want an open sky level than go at chaos-softwares site. Their is a tutorial on cloudy sky. http://www.chaos-software.de.vu Just select tutorials from the main page and then choose cloudy sky one.
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Thu Mar 31, 2005 2:27 am
   Subject: Mid-day massacre act 4.
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Uh,sorry,I thought you'll make something which last 2-3 weeks, you mentioned it in PM Smile Confused
Thank you for the link, I'll check it out, I hope it will work! Smile

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
lucky_foot
Don't Hurt Me
Don't Hurt Me


Joined: 05 Nov 2004
Last Visit: 19 Sep 2010

Topics: 13
Posts: 69
Location: Pennsylvania
usa.gif

PostPosted: Mon Apr 25, 2005 11:16 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Forgive me if this is a stupid question, but I can change the Wall ID 32 in the tutorial for any Wall ID in Wolf3d correct?

I don't see anything in the code that says otherwise (though I'm not a C/C++ expert) Cheesy Grin

_________________
JonathanS
Lucky foot Productions

www.luckyfootproductions.jtworld.net
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

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

PostPosted: Mon Apr 25, 2005 12:50 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You sure can!
And the only stupid question is the one not asked Smile It's always good to see someone trying to learn.

_________________
Sporb2000
DieHard SS
DieHard SS


Joined: 27 Dec 2004
Last Visit: 26 May 2009

Topics: 19
Posts: 383
Location: New Zealand - Invercargill
newzealand.gif

PostPosted: Mon Apr 25, 2005 7:52 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK - i have this bug with textured flats that is really completely irritating the living crap out of me , and no one seems to know how to fix it - So i figure that this is the right place to ask for a fix (correct me if im mistaken) - it's undoubtedly a super simple fix ive missed for some reason but i really want it done so i can release my demo. The game draws the ceiling texture twice instead of drawing ceiling and floor. ive lookde thru draw flats and cross checked it with some backup code and i cant see any obvious reason for it to do this - i recently installed no scalers (<- life saving memory free-er-upper) and hi rez sprites (<- eye saving sprite de-pointyfier) and thats when this started. i can post my drawflats code and stuff that may be to blame. my demo is SOOOOOOOOOOOOOOOO close to completion , help me or my brain will explode again Shocked

_________________
I Like (Brackets)
lucky_foot
Don't Hurt Me
Don't Hurt Me


Joined: 05 Nov 2004
Last Visit: 19 Sep 2010

Topics: 13
Posts: 69
Location: Pennsylvania
usa.gif

PostPosted: Tue Apr 26, 2005 7:10 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Dugtrio17 ,

Thanks for the confidence. I want to ask competent questions and not in a n00b way. Smile


Sborb2000, I'm not much of a programmer, but just a tutorial follow (with a little guessing to make changes), but what I did was follow the tutorial EXACTLY to the letter. It took me 45 minutes to get it in because I read and re-read the entries. You may have to either put it in again and make sure everything is in the right spot or read down all your entries to make sure their isn't an accidental typo or something.

I'm sorry if this sounds stupid, but I'm just trying to help. Smile

_________________
JonathanS
Lucky foot Productions

www.luckyfootproductions.jtworld.net
Sporb2000
DieHard SS
DieHard SS


Joined: 27 Dec 2004
Last Visit: 26 May 2009

Topics: 19
Posts: 383
Location: New Zealand - Invercargill
newzealand.gif

PostPosted: Tue Apr 26, 2005 6:17 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

wish it was that simple but i did follow it - it all worked fine until i added no scalers and hi rez.

anyhoo here's my textured flats code - help would be appreciated - you'll be given credit of course.

::: CODE :::
// ------------------------- * Textured flats * -------------------------

 

/*

** Draw Textured Floor/Ceiling

*/

void DrawFlats(unsigned tex_f, unsigned tex_c)

{

  int x, y, y0, halfheight, shade;

  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;

  shade=(y<<2)/((maxscaleshl2>>8)+1+LSHADE_flag);
      if(shade>32) shade=32;
   if(shade<=0) shade=1;
      shade=32-shade;
      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>>9)&127; v=(gv>>9)&127;
          color=*(src_top+((127-u)<<7)+(127-v));

 

         color=shadetable[shade][*(src_top+((127-u)<<7)+(127-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<<7)+(127-v));
color=shadetable[shade][*(src_bot+(u<<7)+(127-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;

      }

    }

  }

}


PROBLEM- doesnt draw floor texture , just repeats ceiling texture

_________________
I Like (Brackets)
Guest




Last Visit:





PostPosted: Sat May 07, 2005 7:57 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I have exactly the same problem as you Sporb2000!

I also got it after installing No scalers and High Resolution.

Can someone please help us?
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: Sat May 07, 2005 1:30 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Again, it's the PMFrameCount bug mentioned here: http://diehardwolfers.areyep.com/viewtopic.php?p=9517#9517

For high resolution textures this happens, because one texture takes up a whole EMS page, so when using hires this bug is ALWAYS visible when more than one texture is used. Just apply the bugfix and everything will be fine again Wink

@sporb2000: You should remove the following red marked line, as it doesn't do anything useful but wasting performance:
::: CODE :::
      if(wallheight[x]>>3<=y)
        {
          u=(gu>>9)&127; v=(gv>>9)&127;
          color=*(src_top+((127-u)<<7)+(127-v));
          color=shadetable[shade][*(src_top+((127-u)<<7)+(127-v))];//?????

// draw top pixel using [color]


PS: I just tested it and found out that you additionally need to set the EMSFrameCount in ID_PM.H back to 4. This is a bug in the high resolution tutorial allowing only one single EMS frame to be used at the same time. Together with the above mentioned fix this does its work!
Sporb2000
DieHard SS
DieHard SS


Joined: 27 Dec 2004
Last Visit: 26 May 2009

Topics: 19
Posts: 383
Location: New Zealand - Invercargill
newzealand.gif

PostPosted: Sat May 07, 2005 7:03 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yay , thanks Mr Ripper , now i can finally finish tha bloody game Mr Green

_________________
I Like (Brackets)
Guest




Last Visit:





PostPosted: Sun May 08, 2005 3:47 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks Ripper!

Now it works perfectly!
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: Sun May 08, 2005 4:51 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'm glad I was able to help Wink
And thanks for making me notice this bug in the hires tut Mr Green
JackaL
DieHard SS
DieHard SS


Joined: 25 Jun 2004
Last Visit: 04 Apr 2011

Topics: 30
Posts: 335
Location: Rotorua, New Zealand
newzealand.gif

PostPosted: Mon May 09, 2005 12:16 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I have done this routine a few times, but I got an error saying i was missing a } in the threedrefresh so I counted them an noticed there was 3 {'s and only 2 }'s. So I added one to the end of the threedrefresh just so I could shut the error box up. But when I tryed to play the finished result the screen is black and I can still hear the noises of a dog attacking and I press the shoot key and I hear a gunshot... Luckily this was the first code tutorial I was implementing so if I have to I'll just start coding again Neutral
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 May 11, 2005 10:23 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I reckon, if you look carefully, you might have an if statement somewhere, lonely for its other bracket.
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: Thu May 12, 2005 8:11 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

JackaL wrote:
I have done this routine a few times, but I got an error saying i was missing a } in the threedrefresh so I counted them an noticed there was 3 {'s and only 2 }'s. So I added one to the end of the threedrefresh just so I could shut the error box up. But when I tryed to play the finished result the screen is black and I can still hear the noises of a dog attacking and I press the shoot key and I hear a gunshot... Luckily this was the first code tutorial I was implementing so if I have to I'll just start coding again Neutral


You can't just add a missing "}" (close bracket) anywhere and have the routine work. I'm not sure if you format your code that you are inserting. That is the easiest way to catch things like that. I match or set each "if" statement or the "switch" statement with it's proper opening and closing brackets to make sure that things like this don't happen. I can also follow the code easier when it's formatted properly.

Greg
BrotherTank

_________________

The probability of someone watching you is directly related to the Stupidity of your actions
&
The two most abundant things in the Universe are Hydrogen & Stupidity - H.Ellison

Which of those is more relevant to you??
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 18 Jan 2018

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

PostPosted: Thu Aug 04, 2005 6:58 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I succesfully added this piece of code in my source code, but
when I start the game, there is no textures in floor and ceiling.
To be honest floor and ceiling are filled with objects in the current room.
Example: if there is a red ceiling light in the room, ceiling is filled with
pictures of them.
Can anyone tell how to remove this "error"?
insurrectionman
DieHard Mutant
DieHard Mutant


Joined: 07 May 2005
Last Visit: 11 Jun 2018

Topics: 87
Posts: 756
Location: Wisconsin
usa.gif

PostPosted: Mon Sep 25, 2006 2:00 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I was told by Adam Biser that in Orb of Dilaaria he used a modification of the Textured Floor\Ceiling tutorial to have different colored vga floor, i cannot figure out how to mix it into the code, does anyone know how that is done?

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

New Site: http://www.treesapthief.com
Twitter: @treesapthief
Dean
Moderator
<B>Moderator</B>


Joined: 10 Jan 2006
Last Visit: 18 Jan 2018

Topics: 52
Posts: 2189
Location: Australia
australia.gif

PostPosted: Fri Oct 27, 2006 12:11 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I have successfully implemented the code but the ceiling and floor graphics are all screwed up. I have checked the code a number of times and it is exact.

This is whats happening;


Does anyone have a fix for this? Is there a tutorial that I'm not aware of to fix this?
Thanks, if anyone's able to help.

_________________
The Wolfenstein 3d Blog
The Wolfenstein 3d Blog is now on Facebook!

"Strong minds discuss ideas, average minds discuss events, weak minds discuss people" - Socrates
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 14 Jun 2018

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

PostPosted: Fri Oct 27, 2006 3:49 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Glad you got it working Dean (well, almost)! Smile
I've never seen that error before, but hopefully someone else knows what's causing it.
Raziel
DieHard SS
DieHard SS


Joined: 03 Dec 2005
Last Visit: 03 Dec 2009

Topics: 49
Posts: 485
Location: Israhell
israel.gif

PostPosted: Mon Nov 06, 2006 4:53 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Argh! I can't get it to work! I do exactly as it says in the tutorial but still... All I get when I start the game is the HUD and a black window... I can't see anything... Can anyone please help me on this? Crying or Very sad

-Raziel

_________________
Raziel A.
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 14 Jun 2018

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

PostPosted: Mon Nov 06, 2006 7:57 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hello again Human_Waste. Smile

You said that you're using MCS's Wolf Collection source code as a base, right? I'd try using the original source code, just to see if that works. That would atleast narrow down the problem. Narrowing down the problem is an awesome way to find cool things, see:

http://diehardwolfers.areyep.com/viewtopic.php?p=49315&highlight=narrow#49315
http://diehardwolfers.areyep.com/viewtopic.php?p=48896&highlight=narrow#48896
http://diehardwolfers.areyep.com/viewtopic.php?p=40923&highlight=narrow#40923
http://diehardwolfers.areyep.com/viewtopic.php?p=39408&highlight=narrow#39408
http://diehardwolfers.areyep.com/viewtopic.php?p=38042&highlight=narrow#38042
http://diehardwolfers.areyep.com/viewtopic.php?p=37833&highlight=narrow#37833
http://diehardwolfers.areyep.com/viewtopic.php?p=34351&highlight=narrow#34351
http://diehardwolfers.areyep.com/viewtopic.php?p=32588&highlight=narrow#32588
http://diehardwolfers.areyep.com/viewtopic.php?p=30041&highlight=narrow#30041

Man, I need to a make signature about this. Or a website... yes!

index.html wrote:
Welcome to Chris's coding tips!
A large collection of information that should answer all your coding questions!

....

Narrow down the problem.

@Dean: Did you get it working yet? From the picture, my guess is you added something incorrectly, or didn't do a full/fresh compile.
Dean
Moderator
<B>Moderator</B>


Joined: 10 Jan 2006
Last Visit: 18 Jan 2018

Topics: 52
Posts: 2189
Location: Australia
australia.gif

PostPosted: Mon Nov 06, 2006 10:22 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
@Dean: Did you get it working yet? From the picture, my guess is that you've added something incorrectly, or didn't do a full/fresh compile.


Yeah I did thanks Chris. I had 2 characters around the wrong way.
From memory I had =- instead of -= in one section.

If anyone wants to know how to make the effect, just ask! Cheesy Grin
Hrmm Think , maybe I should start my own coding website too!

_________________
The Wolfenstein 3d Blog
The Wolfenstein 3d Blog is now on Facebook!

"Strong minds discuss ideas, average minds discuss events, weak minds discuss people" - Socrates
lwmxynedtodth
DieHard Officer
DieHard Officer


Joined: 28 May 2006
Last Visit: 24 Aug 2017

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

PostPosted: Mon Nov 06, 2006 11:31 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You know what, I knew this bug too. It is caused by the engine, it tries to render all the vswap textures on one tilespot.
Otherwise it could be a minus swapped, you do 128x128, right. Then you're textures look interlaced.
I had it a lot of times doing the multi-ceilings thing.

- lwmxynedtodth

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


Joined: 03 Dec 2005
Last Visit: 03 Dec 2009

Topics: 49
Posts: 485
Location: Israhell
israel.gif

PostPosted: Tue Nov 07, 2006 5:53 am
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Chris...

I did tried it on a fresh copy of the source. but still, with no success. All I get is the HUD and the black screen instead of the sprites and walls... Not Happy

_________________
Raziel A.
wolfwhips
DieHard Officer
DieHard Officer


Joined: 09 Aug 2006
Last Visit: 20 Feb 2018

Topics: 66
Posts: 547

newzealand.gif

PostPosted: Thu Nov 16, 2006 2:17 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I was able to implement the textured floor and ceilings tutorial, but I get the exact texture for both the floor and the ceiling. Is there a way to specify a different texture for the ceiling and the floor? And, is it necessary to follow ripper's scaling and cloud sky tutorials for that?

_________________
MP3 remixes of the ROTT songs!!
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: Sun Jun 17, 2007 12:10 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ok...what do i put for the "<..stuff skipped to end of routine..> "
That throws me off...Please help

_________________
Thunderstorm "War is a conflict that does not determine who is right, but who is left." Thunderstorm
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: Sun Jun 17, 2007 7:00 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You don't put anything. You make the top of your routine look like the code given... Skip to the end of the routine doesn't mean delete or anything... it just means those lines were not touched...

Greg
BrotherTank
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: Sun Jun 17, 2007 7:32 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Can you paste what the whole ThreeDrefresh will look like? I am really confused...

_________________
Thunderstorm "War is a conflict that does not determine who is right, but who is left." Thunderstorm
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: Sun Jun 17, 2007 7:51 pm
   Subject: Re: [Code] Textured Floor/Ceiling - By Darkone
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Here's how it should look...

::: CODE :::
/*
========================
=
= ThreeDRefresh
=
========================
*/

void   ThreeDRefresh (void)
{
   int tracedir;
  unsigned ceiling;
  boolean flats;    

  outportb (SC_INDEX,SC_MAPMASK);             // this wouldn't need to be done except for my debugger/video wierdness
  memset(spotvis, 0, sizeof(spotvis));        // clear out the traced array
  spotvis[player->tilex][player->tiley]=1;    // set player spot

   bufferofs += screenofs;

//
// follow the walls from there to the right, drawwing as we go
//
  ceiling=vgaCeiling[gamestate.episode*10+mapon];
  if((ceiling>>8)==(ceiling&0xFF))
  {
     VGAClearScreen(ceiling);
     flats=false;
  }
  else
  {
     flats=true;
     ceiling=((ceiling&0xFF)-1)<<1;
  }

   WallRefresh ();

  if(flats) DrawFlats(ceiling, ceiling+1); // draw textured floor/ceiling

//
// draw all the scaled images
//
   DrawScaleds();         // draw scaled stuff
   DrawPlayerWeapon ();   // draw player's hands

//
// 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; mov cx,[displayofs]; mov dx,3d4h; mov al,0ch; out dx,al; inc dx; mov al,ch; out dx,al; sti; }

   bufferofs += SCREENSIZE;
   if (bufferofs > PAGE3START) bufferofs = PAGE1START;
   frameon++;
   PM_NextFrame();
}
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 2742 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 2622 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 1909 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 2218 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 2976 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