Author Topic: ZAPM - some trouble  (Read 27892 times)

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
ZAPM - some trouble
« on: February 15, 2011, 12:42:20 PM »
Hello people. First post here.

Recently I've discovered ZAPM and I've more or less fallen in love with it :P

The problem is, I can't compile the sources, the compiler always get stuck with some classes declaration.

Any folks here got any clue about that? Has anyone compiled ZAPM successfully? Any general recommendations?
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: ZAPM - some trouble
« Reply #1 on: February 15, 2011, 04:37:42 PM »
Error messages with the copy of the line where the error is could help.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #2 on: February 16, 2011, 12:18:35 AM »
Aye Aye!

C:\zapmsource\Global.h|65|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'shMenu'|
C:\zapmsource\Global.h|66|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'shCreature'|
C:\zapmsource\Global.h|68|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'shMonster'|

and on and on... a gazillion errors more. The lines around that are

Code: [Select]

[...]

60 #define FULLTURN  1000
62 #define HALFTURN  500
63 #define QUICKTURN 250
64
65 struct shInterface;
66 class shMenu;
67 class shCreature;
68 struct shMonsterIlk;
69 class shMonster;
70 struct shObjectIlk;
71 struct shObject;

[...]


in global.h . Basically in every class line. Or is it the line before?

I'm using codeblocks, mingw32, and the version of the ZAPM source is 0.8.3 froom nethack.devnull.net

How do I compiled ZAPM ?  :'(

I suck ballz big tiem-.-
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Fenrir

  • Rogueliker
  • ***
  • Posts: 473
  • Karma: +1/-2
  • The Monstrous Wolf
    • View Profile
Re: ZAPM - some trouble
« Reply #3 on: February 16, 2011, 02:55:58 AM »
I went to http://nethack.devnull.net, but I couldn't find the source. That doesn't mean much, as I may have just missed it, but, if you'll link to me the source, I'll have a go at compiling it.

The Win32 binary for version 0.8.2 is available at http://www.zapm.org if you ever get tired of messing with it. You probably know already if you've played it already, but I figured that there would be no harm in mentioning it.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #4 on: February 16, 2011, 03:10:07 AM »
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: ZAPM - some trouble
« Reply #5 on: February 16, 2011, 07:05:05 AM »
The source comes with Visual C++ project file. It's compiling in VC++, just one warning (MOUSE_MOVED seems to be re-defined). If it's complaining about class, are you sure it's compiling in C++ mode?

By the way, running zapm was an interesting experience. I tried to type in my name (it was using computer's name by default) by pressing enter couple of times (nothing happened) and the game complained about "too many tries" and stopped. What the hell?

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #6 on: February 16, 2011, 10:59:56 AM »

Well I´ll be getting some tool that´s more vc++ specific and see if that helps...

I like this game so much I´m aching to tweak1 it.

About the name, it let´s me use the default name as well as typing one, that sounds weird.

And yes, I guess it was compiling in c++ mode since it asked me if it was a c or c++ project (and my answer was the later)



1 You might as well read "ruin" XD.
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: ZAPM - some trouble
« Reply #7 on: February 16, 2011, 04:19:10 PM »
Well I´ll be getting some tool that´s more vc++ specific and see if that helps...

Get VC++ Express, it's free. It's also the best IDE for Windows. Although the problem in zapm could possibly be VC++ only feature, which is bad programming. Writing standard portable C++ is of course possible in VC++ also. I'm developing code in VC++ and running final compile in GCC, because there is some .dll dependencies in VC++.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #8 on: February 16, 2011, 04:58:02 PM »
Yes, I have installed it already! But I don´t have time right now to try to compile it again, Ill post later if I have any success.
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #9 on: February 16, 2011, 06:05:05 PM »

Well, I got to see the project file with VC++ and it does compile... but alas, it won't read the name input, what the hell?!
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: ZAPM - some trouble
« Reply #10 on: February 16, 2011, 07:16:25 PM »
but alas, it won't read the name input, what the hell?!

Yes, it's strange. It appears to be an older VC project file, so maybe there are differences let's say in Windows XP (possibly the platform zapm was programmed) and Windows 7 related to that input routine. Who knows. Just looking at global.h tells that zapm source code is poor quality.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #11 on: February 16, 2011, 08:27:17 PM »

 I'm running winbugs XP too and it gives me the same bullshit XD

It really looks that bad? Perhaps that's why I can kind of understand some of it XD

I just love the theme and gameplay.

Thanks for the help man, the version I play is 0.8.2, I'll try to check if that compiles fine and then check the differences in the name-typing, or just switch to screw around with 0.8.2...
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: ZAPM - some trouble
« Reply #12 on: February 17, 2011, 04:53:58 PM »
Here's the epic code asking for player's name:

Code: [Select]
   if (!name) {
        int tries = 5;

        name = getenv ("USER");
        if (!name)
            name = getenv ("USERNAME");

        do {
            if (!tries--) {
                I->p ("Too many tries!");
                I->pause ();
                I->p ("");
                goto done;
            }
            I->p ("Welcome to ZAPM!");
            I->getStr (namebuf, HERO_NAME_LENGTH+1,
                       "What is your name?", name);
            I->pageLog ();
        } while (!nameOK (namebuf));
        name = namebuf;
    }

It could be simple but this guy has made it complicated. Also, great names for instances and functions. Interface class instance is 'I' and text output 'p'.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #13 on: February 17, 2011, 05:29:13 PM »
I had located it and somehow1 managed to get it to compile (perhaps I erased a typo or something, go figure) but then the game crashed as soon as a (b)arrel exploded. Way to go.







1 As in "I haven't the foggiest"
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: ZAPM - some trouble
« Reply #14 on: February 19, 2011, 08:04:15 PM »
I ditched 0.8.3 and started screwing around with 0.8.2 (Which is the version I've played, anyway)

I've been able to add some stuffs and even got it to compile :D
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.