Hamumu Software Hamumu Software Hamumu Software
Name
Password Register
Latest Journal update: Oct 16, 2017
Old 09-06-2007, 05:51 AM   #1
AtkinsSJ
Legs sold separately.
Moderator
 
AtkinsSJ's Avatar
 
Join Date: Aug 2004
Location: Computers!
Posts: 4,790
Lightbulb NPC Quest Source Fun

Well, I've finally managed to get Allegro to work. (Turns out I'd been trying to use an uncompiled binary. Using a compiled one now. ) I'm all set to try messing with it, except for a couple of errors that the compiler threw:
Code:
main.cpp: In function `int _mangled_main(int, char**)':
main.cpp:76: error: `_CRTDBG_REPORT_FLAG' undeclared (first use this function)
main.cpp:76: error: (Each undeclared identifier is reported only once for each function it appears in.)
main.cpp:76: error: `_CrtSetDbgFlag' undeclared (first use this function)
main.cpp:78: error: `_CRTDBG_LEAK_CHECK_DF' undeclared (first use this function)
I'm using Dev C++ if that makes any difference. I reckon it might be that these might be included in a library that comes with whatever compiler it is that Jamul uses. If so, can anyone tell me where to get it?
Thanks,
~AtkinsSJ

EDIT: Seems that it's a Microsoft thing. Commenting it out works. However, now it can't find a file named 'crtdbg.h', which I've just realised must be related. So ignore all of this.

EDIT 2: Hmmm. It now compiles, and runs... if a black screen and a "preparation.exe has encountered a problem and needs to close. We are sorry for the inconvenience." message counts as running. Bah.

EDIT 3: AHA! I am a foold. Of course, I had to actually put all the graphics and sound files there! Yay! It works!
__________________
Caution: may contain traces of nuts

Last edited by AtkinsSJ; 09-06-2007 at 06:09 AM.
AtkinsSJ is offline   Reply With Quote
Old 09-06-2007, 05:08 PM   #2
drgamer
Lynch: Drgamer
 
drgamer's Avatar
 
Join Date: Jun 2004
Posts: 2,184
Default Re: NPC Quest Source Fun

...yeah, that might help XD

But can you modify any other part of the game?
__________________
Short story stuff!
Last update. 26-JUNE-2008 Late sig update
drgamer is offline   Reply With Quote
Old 09-07-2007, 11:45 AM   #3
AtkinsSJ
Legs sold separately.
Moderator
 
AtkinsSJ's Avatar
 
Join Date: Aug 2004
Location: Computers!
Posts: 4,790
Default Re: NPC Quest Source Fun

Yes. You can modify the graphics sound without the source code. I can theoretically modify any aspect of the game, however it's rather confusing. I'm trying to make it flash a red exclamation mark when you have 1/5 health, and no potions. No potions is the tricky bit.
__________________
Caution: may contain traces of nuts
AtkinsSJ is offline   Reply With Quote
Old 09-17-2007, 04:03 AM   #4
AtkinsSJ
Legs sold separately.
Moderator
 
AtkinsSJ's Avatar
 
Join Date: Aug 2004
Location: Computers!
Posts: 4,790
Default Re: NPC Quest Source Fun

Whoo! I finally got it working! Now, if you have 1/5 health or less, and don't have any potions, a red box is drawn around your life!

I put the following under the line 'RenderCharacterData();' in shop.cpp:
Code:
seconds = time (NULL);
if(player.life<=(player.stat[STAT_LIF]/5) && seconds%2)
    {
        for(i=0;i<20;i++)
        {
             if(GetItem(player.inventory[i])->type==ITM_POTION)
             {
                  //Do nothing.
                  break;
             }
             else
             {                                                                      
                  rect(screen2,6,116,218,126,makecol(255,0,0));
             }
        }
    }
Probably not the most efficient way of doing it, but I'm a noob.

I was going to make it flash, using 'if current second %2', but I'm not sure how to get that working. Still, should prevent accidental death.

EDIT: Did it! Easy! Extras added shown in bold. I think it would be better if it flashed more often, but I've no idea how to do that.
__________________
Caution: may contain traces of nuts

Last edited by AtkinsSJ; 09-17-2007 at 04:12 AM.
AtkinsSJ is offline   Reply With Quote
Old 09-17-2007, 04:17 AM   #5
Mr.Onion
Evil, random-voting vegetable
 
Mr.Onion's Avatar
 
Join Date: Mar 2005
Location: Down at the shore where there's no-one vacationing.
Posts: 4,862
Default Re: NPC Quest Source Fun

seconds%1?
__________________
Mr.Onion is offline   Reply With Quote
Old 09-17-2007, 09:31 AM   #6
AtkinsSJ
Legs sold separately.
Moderator
 
AtkinsSJ's Avatar
 
Join Date: Aug 2004
Location: Computers!
Posts: 4,790
Default Re: NPC Quest Source Fun

Nah.
seconds%2 means it only activates when there's a remainder after dividing seconds by 2. seconds%1 always activates. I tried a couple of /2 ans *2s, but with no effect. I'll think on it.
__________________
Caution: may contain traces of nuts
AtkinsSJ is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Source Of Blackmail REACTOR Total Mayhem 22 02-03-2015 05:23 PM
3rd Party Source For Addons REACTOR Total Mayhem 3 08-12-2014 02:06 AM
Release: SWC Toolbox v1.0 [VB NET Source Included] AnonOps Dr. Lunatic 8 07-14-2012 05:33 AM
What is Source Code? Lord Loony Dr. Lunatic 3 10-15-2011 06:07 PM
Termites Source SpaceManiac Our Other Games 3 05-27-2008 06:25 PM


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.
Site Map
Copyright 2017, Hamumu Games Inc.