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       

Falcon*93's Coding Questions
Page 2 of 2 Goto page Previous  1, 2
DieHard Wolfers Forum Index -> SDL Code Crackers 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
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Fri Jun 09, 2017 2:17 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

So I'm wondering making specific walls not get shaded, and the enemy fire sequence not get shaded.
I see in WL_Act1 that in the objects list at the end of lamps there is "FL_FULLBRIGHT"
I used this to cause a gold flag staff sprite I made to not get shaded, as the gold pallet is limited and cause it to look funky when moving around, at least with shading active. It solved that problem.

Say I wanted to make my Stained Glass walls not get shaded, would I add FL_FULLBRIGHT under that wall definition somewhere or does that only work for objects?

Same question for enemy fire sprites.

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 7:31 ago.

Topics: 160
Posts: 7972
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Fri Jun 09, 2017 6:57 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You'd have to dig in the code WL_DRAW.CPP to disable certain walls for shading. I think it would be simplest to just have it scan the objects plane for a certain number, and the shading routines for that wall will be skipped if it finds that number. The only catch is that it wouldn't work if that wall was a Pushwall.
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 9:25 ago.

Topics: 36
Posts: 2380
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Fri Jun 09, 2017 7:44 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You can probably just check in ScalePost, and set curshades to shadetable[0] if it wants to be unshaded.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 7:31 ago.

Topics: 160
Posts: 7972
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sat Jun 10, 2017 5:42 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I suppose you can. I had in mind where you change the graphics of the walls as the mod's development moves on, sets of walls are moved to other places in the Walls list, and you find yourself with all this shading happening in the wrong place ... and then it happens more than once. I can imagine that being a real headache. Just my two cents. Smile
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 9:25 ago.

Topics: 36
Posts: 2380
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sat Jun 10, 2017 6:04 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

That is another option: when creating the horizwall and vertwall table, create a shadewall table that's just a bool for each map value that states if it wants to be shaded or not and check against that in ScalePost.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 7:31 ago.

Topics: 160
Posts: 7972
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sat Jun 10, 2017 12:45 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ah, yes - a checklist. Good call, AlumiuN - that is a good suggestion. Smile
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Mon Jun 19, 2017 12:01 am
   Subject: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

So using this http://hwolf3d.dugtrio17.com/index.php?section=tut_readthis tutorial I have got Read This to work on SOD Full. However I can't get it to work on SDM.

I have commented out all Read This the graphics in WL_Text, and I've even tried commenting out the Read This music in WL_Menu, I renamed the file Helpart.SDM, and removed the call for the image. Either way it crashes the game when I select Read This.

I've dug through the code and can't figure out any solution.


Any Ideas?

I will may try another method tomorrow.

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 7:31 ago.

Topics: 160
Posts: 7972
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Jun 19, 2017 1:34 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You have to put in the missing VGAGRAPH pics that the code uses. I have yet to make the "Read This!" code work without it. Spear 2-level Demo is the only Wolf3D release that doesn't have these pics in the VGAGRAPH file.
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Mon Jun 19, 2017 5:46 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ah Chris helped me out, I haven't updated here yet sorry.

I removed all references to graphics, but otherwise I'm sure that would make it not work.
The issue was even though I thought I had renamed the Helpart from .SOD to .SDM
the extension still was SOD, I had to change my folder settings to display known extensions to be able to change it, even making a new text file creates a .txt even if you save it as .sdm, it becomes .txt.sdm until you properly change it.

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 7:31 ago.

Topics: 160
Posts: 7972
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Jun 19, 2017 6:21 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

That's interesting. Thanks for posting this; this problem is still in the Base Of Operations source code I did. At least now I know there's something else causing the errors I was experiencing.
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Mon Jun 19, 2017 6:26 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Smile Glad I could actually help... but that credit really goes to Chris.
I'm such a noob still lol.
Any idea why I can't get the music to change in Read This?

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 7:31 ago.

Topics: 160
Posts: 7972
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Jun 19, 2017 7:21 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I believe you need to go to WL_PLAY.CPP.
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Mon Jun 19, 2017 7:44 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

well, yes, that is in Menu.cpp
However somebody has managed to clutter up a once well organized directory and was compiling in a duplicate sub folder within the source folder, not knowing it, and pulling from the wrong folder,

AAAND That somebody is me :\
I had actually fixed this a few hours ago but didn't know it, actually was never broken to begin with.

Today = Facepalm.
LOL

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Wed Jun 21, 2017 12:04 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

so i finally got the code to compile for Brother Tanks Intermissions Screens tut.... but it instantly crashes the game when i start new game with or without the intart file present.
http://diehardwolfers.areyep.com/viewtopic.php?t=5213#66742

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Wed Jun 21, 2017 8:42 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK, the solution is near.. I hope.
I will post when I nail it down.
Chris, Alumiun, and I have been trying to crack this, but the solutions still eludes me. Though Chris has compiled a working rendition, possibly due to a compiler edition difference mine does not work.

Alumiun sent a code of two lines that deal with a cached image, and Chris changed one line and commented out another.

This link may shed light on it too, but the fix it mentions seems to already be implemented.

http://diehardwolfers.areyep.com/viewtopic.php?t=4830&postdays=0&postorder=asc&&start=120


Code change from Chris
In WL_Text.cpp

/*
======================
= *Mod
= Intermission Screens by BrotherTank
=
======================
*/
void IntermissionScreens (void)
{
struct stat statbuf;
char *text;
memptr layout;

char intfilename[13] = "INTART00.SDM"; // *Change From Chris
// strcat(intfilename,extension); // ^ ^


Change suggested by Alumiun and implimented by Chris
In WL_Game.cpp

CacheLump(BACKDROP_LUMP_START, BACKDROP_LUMP_END); // Code from Alumiun
ClearMScreen();
IntermissionScreens (); // Intermission Text - Shown when starting new game
ClearMemory ();
UnCacheLump(BACKDROP_LUMP_START, BACKDROP_LUMP_END); // code from Alumiun


Sorry for the small fonts, it's the only way I know to not have to lines wrap and distort the syntax.

This is my debug call stack, not sure what it means yet.

#0 0x425bf3 CacheLayoutGraphics() (C:\NCC4SDL\WL_TEXT.CPP:574)
#1 0x425cf8 ShowArticle(article=0x3 <Address 0x3 out of bounds>) (C:\NCC4SDL\WL_TEXT.CPP:672)
#2 0x426055 IntermissionScreens() (C:\NCC4SDL\WL_TEXT.CPP:919)
#3 0x416ea5 GameLoop() (C:\NCC4SDL\WL_GAME.CPP:1411)
#4 0x41b284 DemoLoop() (C:\NCC4SDL\WL_MAIN.CPP:1664)
#5 0x41bb9e SDL_main(argc=2, argv=0x361240) (C:\NCC4SDL\WL_MAIN.CPP:1958)
#6 0x40a60c console_main(argc=2, argv=0x361240) (C:\NCC4SDL\sdl_winmain.cpp:236)
#7 0x40a8f6 WinMain@16(hInst=0x400000, hPrev=0x0, szCmdLine=0x61371a "--windowed", sw=10) (C:\NCC4SDL\sdl_winmain.cpp:372)
#8 0x42d0db main () (??Confused?)

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 9:25 ago.

Topics: 36
Posts: 2380
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Thu Jun 22, 2017 5:15 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I would check how the call to ShowArticle at that point in IntermissionScreens looks, because it shows there that the value getting passed to ShowArticle is very wrong indeed.
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Thu Jun 22, 2017 5:15 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Do you mean :

ShowArticle (text);

?

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 9:25 ago.

Topics: 36
Posts: 2380
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Thu Jun 22, 2017 6:10 pm
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

More along the lines of 'how is it getting the value for text'.
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Sat Jun 24, 2017 9:13 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks to AlumiuN and Chris and Borther Tank I now have the intermissions working.
http://diehardwolfers.areyep.com/viewtopic.php?t=5213 - see the entry Posted: Thu 22 Jun, 2017 22:06 by AlumiuN.
Smile

I am now working on weapons. Which I didn't think I would try doing for the demo release.

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Thu Jun 29, 2017 1:38 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Among the final code changes for my SDM4SDL based KSS BW1 Demo are
To make enemies attack with less hesitation.
and To increase the damage dealt by enemies.
Especially the latter.

I did a search files for Damage, but I'm not sure how to read what I found.
Anyone care to shed a little light on the matter?

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 9:25 ago.

Topics: 36
Posts: 2380
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Thu Jun 29, 2017 3:39 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

T_Shoot in WL_ACT2 is where the damage for most (if not all) hitscan enemy attacks is defined; namely this section:

::: CODE :::
        if (US_RndT()<hitchance)
        {
            if (dist<2)
                damage = US_RndT()>>2;
            else if (dist<4)
                damage = US_RndT()>>3;
            else
                damage = US_RndT()>>4;

            TakeDamage (damage,ob);
        }


As you can see, the distance between the player and enemy is taken into account, but the damage as it stands is almost entirely random. US_RndT() returns a random number between 0 and 255, and the ">>" operator shifts all the bits in the number to the right (meaning that 'x >> y' is roughly equivalent to 'x / 2^y'). What this means is that, by default, if you're within 2 tiles you'll take between 0 and 63 damage, otherwise if you're within 4 tiles you'll take between 0 and 31 damage, and if you're further away you'll take between 0 and 15 damage; all of this is also assuming that an earlier random number is higher than the calculated 'hitchance', which is based entirely on the distance to the player and whether the player can see the enemy or not.

Essentially, if you want to make the enemy do more damage, just change the way the 'damage' variable is calculated in that block.
Aryan_Wolf3D
I am Death Incarnate
I am Death Incarnate


Joined: 21 Jul 2011
Last Visit: 22 Sep 2017

Topics: 5
Posts: 160

blank.gif

PostPosted: Thu Jun 29, 2017 6:28 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You can also use this to make certain enemies deal different damage: http://diehardwolfers.areyep.com/viewtopic.php?t=6533

_________________
"Way too many #ifdefs in the code!" - John Carmack
Falcon*93
Don't Hurt Me
Don't Hurt Me


Joined: 19 May 2017
Last Visit: 04 Jul 2017

Topics: 5
Posts: 51

usa.gif

PostPosted: Sat Jul 01, 2017 11:04 am
   Subject: Re: Falcon*93's Coding Questions
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Thanks Guys!
I had to fix a few other things, switch some stuff, and change the health pick up ratios.
I'm going to play test my level 2 again a few times without any cheats once I get my new weapon tuned up.
I need to see if I actually need to adjust the enemy attack damages.

Some times I think that level is plenty hard, and other times it seems to easy.
Two things that create a bias are that I know where everyone and everything is, and when I use the cheats... well any level is too easy with God Mode, No Clipping, and ILM or Tab I.

Gonna test it before I go messing around with that stuff, but now I know where to go tinkering if I do.
Smile

_________________
Falcon 93 Studios
Demo/Level Out - Castle Court
Series/Game Coming - Knights of the SS : BeoWulfenstein
- Episode 1 Armour of Beowulf & Episode 2 The Hrunting Sword -
Smile Collaboration Welcome (:
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 2 of 2 Goto page Previous  1, 2
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Announcement: Wolf4SDL released
Author: Ripper
522 137083 Mon May 22, 2017 2:04 pm
Tricob View latest post
No new posts [help] Adding teleporters in wolf4sdl
Author: Mortimer
35 6328 Fri May 26, 2017 8:19 am
Military View latest post
No new posts [WOLF4SDL Help] Blake Stone Style doors
Author: Haasboy
3 1997 Sun Jul 20, 2008 7:56 am
Haasboy View latest post
No new posts [Help] Problem with Checkweaponchange function (wolf4sdl)
Author: Mortimer
4 2122 Sat May 17, 2008 11:26 am
Mortimer View latest post
No new posts [SDL] Apply 2nd ScaleFactor to selected (hi-res) vga gfx
Author: Andy_Nonymous
9 2925 Sun Apr 27, 2008 2:30 am
AlumiuN 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