TONPPAMF

The Official NPPAngband And NPPMoria Forum

You are not logged in.

Announcement

November 28, 2016 - NPPAngband forum has been migrated to a new host. SSL has been enabled so please use https:// if possible.

#1 2013-07-20 14:21:57

camb
Member
Registered: 2006-01-29
Posts: 707

[7.0.0 beta4] Compilation error

When compiling the latest code I get the following error:

melee1.c:1988: error: conflicting types for ‘get_ball_beam_dam’
externs.h:790: error: previous declaration of ‘get_ball_beam_dam’ was here

Cameron

Offline

#2 2013-07-20 15:10:29

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: [7.0.0 beta4] Compilation error

Thanks for reporting that.  Looks like I missed updating externs.h on github (which is where I get the src.zip file):

Here is the fix, at line 790:

-extern int get_ball_beam_dam(monster_race *r_ptr, int attack, int gf_type, bool powerful);
+extern int get_ball_beam_dam(int m_idx, monster_race *r_ptr, int attack, int gf_type, bool powerful);

I will upload a new src.zip file


EDIT:  You will also need a new randart.c, or insert these two lines of code in randart.c:

@@ -667,11 +667,11 @@ static long eval_max_dam(int r_idx)

                    if (which_gf)
                    {
                        int attack = 96 + (x * 32) + i;

-                        this_dam = get_ball_beam_dam(r_ptr, attack, which_gf, powerful);
+                        this_dam = get_ball_beam_dam(-1, r_ptr, attack, which_gf, powerful);

                        /* handle elemental breaths*/
                        switch (which_gf)
                        {
                            case GF_ACID:
@@ -705,11 +705,11 @@ static long eval_max_dam(int r_idx)

                    if (which_gf)
                    {
                        int attack = 96 + (x * 32) + i;

-                        this_dam = get_ball_beam_dam(r_ptr, attack, which_gf, powerful);
+                        this_dam = get_ball_beam_dam(-1, r_ptr, attack, which_gf, powerful);
                    }

                    /*slight bonus for cloud_surround*/
                    if (r_ptr->flags2 & RF2_CLOUD_SURROUND) this_dam = this_dam * 11 / 10;
                }

Offline

#3 2013-07-21 02:23:01

camb
Member
Registered: 2006-01-29
Posts: 707

Re: [7.0.0 beta4] Compilation error

Works now. Thanks!

Cameron

Offline

Board footer

Powered by FluxBB