Please help me with my source code! I've gone almost everywhere asking for help, but with no luck, so I'm hoping you guys will help me.
Ok, so I'm trying to add in a new weapon, which is a bolt action rifle. I followed this tutorial. I also followed that code tutorial where you can add more frames for weapons which is on this forum. I'm positive that I followed it exactly as it's written, but when I try to play my mod, the screen loads up, but the colors immediately get messed up and the game is frozen. I've been trying to mess with the coding for days, but it's not working.
Please, can anybody help me? I will put you in the credits for my mod if you help me.
Schabbs- 05-31-2005
Just one thing I noticed about the demo version of Pokestein 3D already out is that it uses the old Apogee version of Wolf 3D. If the new set also uses that version then the graphics will screw up if used with a new exe. This may not be the problem but I thought I'd better mention it just in case.
lizardcommando- 05-31-2005
Hmm, well I have another copy without the new weapon, but it has a new exe and the new graphics. I changed the quit messages (like Press N for Hero, Press N for Wimp), and changed the names in the High Score Table. When I use that exe (the modified one without the rifle graphics) they work perfectly.
I'm stumped. I don't know what's going on with it... :(
So this old apogee version you speak of... Do I have to upgrade to version 1.4?
Or perhaps I can send you the source so you can look at it?
Conner94- 05-31-2005
Did you define the graphics poperly? And like brian said, do you have the 1.4 vga files? If you don't, you can pm me and I'll send them to you.
lizardcommando- 05-31-2005
You mean put in (for example) SPR_RIFLEREADY,SPR_RIFLEATK1,SPR_RIFLEATK2,...RIFLEATK8, in wl_def.h?
Yeah, I know I did that. In fact, I had double checked with the tutorial to see if I messed up. Maybe I skipped a step or maybe the guy who made this tutorial messed up somewhere?
I downloaded the VGA files from here and I replaced them with my own graphics. Plus, I added in the new stuff too. I'm gonna try putting in the VGA files into my project folder again. I hope that fixes it.
EDIT:
Alright, I re-inserted the new VGA files, but the graphics are still wacked out and the game freezes!
Just out of curiousity, do I need to do anything with the EQU files or do I leave them alone?
Conner94- 06-01-2005
I have never had this problem before :? , unless when I used a windows installer. Can't tell you much.
lizardcommando- 06-01-2005
Ah man... :(
Well, how about I try sending you the source code? Could you look at it and see if there's anything wrong?
Conner94- 06-01-2005
ok, just e-mail me (if my e-mail button isn't there, pm me and I'll give you the address) and I'll take a look at the code.
Conner94- 06-01-2005
one more thing, what compiler are you using? Do you have the object files and all?
lizardcommando- 06-01-2005
I'm using BC 31. All the objects are there. I'm sure of it. I'll get you the source code in a bit.
EDIT: I just sent you the source code using my emergency email account. Gmail couldn't attach things with exe's on them even though it was zipped. ALso, I accidently sent you one email without the source. The email that has the source should be called "Oops! Here's the Source!" or something along the lines of that.
Deathshead- 06-02-2005
His tutorial don't work as is. Just wait, I had to change somethin when I did it.
EDIT: This doesn't have anythin to do with COlour messing, but you dont need to change the NUMBUTTONS part of the code man, ok? just NUMWEAPONS. Why dont you follow my shotgun tutorial down a bit, but modify it?
lizardcommando- 06-04-2005
Ok! I actually figured some stuff on my own! That tutorial from DHW was indeed what messed up the coding for my source!
In that tutorial, it said to change the LATCHPICS_NUM_END. I changed it when I was messing around with the code for the 5th time trying to get the rifle to work. And after I compiled it, I tested it, and the game still froze and had the graphics all screwy. So I decide to change back the LATCHPICS_NUM_END to its original value. Loandbehold, it works! The game isn't frozen and the graphics aren't screwy. Although, I'm still having problems with the game, at least I can actually play it.
Unfortunately, when I switch to another gun, I can't switch back to the rifle. Another problem I'm having is that I automatically start with all the guns minus the rifle. I only want to start off with the knife and pistol.
lizardcommando- 06-05-2005
Shit. I've got another new problem. i'm trying to put back the readme option, but when I compile it, i get this error:
Error WL.MENU.h: 'ControlInfo' Cannot Start a Parameter Declaration
void ReadAnyControl ( *ci);
The annoying thing about this is that I didn't even touch this line! All I did was change the 9 to a 10 so that the menu would have a space for the readme button. What the hell is going on?!?
Conner94- 06-11-2005
Try using MCS' tutorial on the readme. As for the rifle not switching back, make sure that the switch weapon code is compatible with more that 4 buttons, or it won't work. I use BrotherTanks switch weapon code.
lizardcommando- 06-11-2005
I got the readme thing to work now. As for the weapons thing, how would I make sure the weapons switching code is compatible? I inserted this code:
/*==
==== CheckWeaponChange
==== Editted by BrotherTank/Deathshead
====
==== Number Keys 1-0 select Weapon.
==*/
void CheckWeaponChange (void)
{
int i,kbuttons[10]={sc_1,sc_2,sc_3,sc_4,sc_5,sc_6,sc_7,sc_8,sc_9,sc_0}; //ten weapon buttons
for (i=0;i<NUMWEAPONS;i++)
if ((Keyboard[kbuttons[i]]) && (i != gamestate.weapon))
{
if (buttonstate[bt_readyknife+i-wp_knife])
{
gamestate.weapon = gamestate.chosenweapon = i;
DrawWeapon ();
DrawAmmo ();
return;
}
}
}
...but when I play, I still can't switch between guns. Also, I actually start off with all the guns, minus the bolt-action rifle. What''s going on?
Oh, and the status bar picture for the rifle is messed up. It won't load up. It just schows a messed up picture. I can't even tell what it is.
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.