320 Screensaver is posted

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • APWhite
    Adept
    • Jul 2007
    • 244

    320 Screensaver is posted

    I have the screensaver for windows working. You can download it at the borg page www.innovapain.com/borg.

    Few more fixes are needed. There is still a memory bug which is causing a crash. I have used diff to examine the code line by line to see where the memory error is originating and I cannot find it. If anyone wants to give it a go, you can download this savefile. There are a couple of manifestations of the memory bug. When the borg is attempting to do best_fit() and best_combo() the keypresses are not being interpreted correctly by the game. And the savefile above is crashing after a few minutes. The crash can be seen in non-screensaver mode as well.

    Andrew
    St George Chiropractor
    Angband Borg Homepage
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by APWhite
    I have the screensaver for windows working. You can download it at the borg page www.innovapain.com/borg.

    Few more fixes are needed. There is still a memory bug which is causing a crash. I have used diff to examine the code line by line to see where the memory error is originating and I cannot find it.
    Are you branching from one of the commits between the removal of z-quark.c and its reinstatement? It was reinstated because the removal caused the memory leaks ...
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • jtwadsworth
      Rookie
      • Apr 2011
      • 18

      #3
      Borg for Mac

      Andrew,

      Any suggestions on getting the Borg to work on the Mac? I can compile the 3.2.0 source without problem and it runs great, but I'd like to add the Borg functionality to it.

      jtw

      Comment

      • APWhite
        Adept
        • Jul 2007
        • 244

        #4
        Originally posted by jtwadsworth
        Andrew,

        Any suggestions on getting the Borg to work on the Mac? I can compile the 3.2.0 source without problem and it runs great, but I'd like to add the Borg functionality to it.

        jtw
        Off the top of my head, I can think of the following steps. There might be one or two that I am missing. I have done any mac work.

        To install this borg, you will need to do the following:
        1. Modify the config.h to uncomment:
        a. the allow_borg line
        b. the score_borg line
        2. Add a line that says ALLOW_BORG_GRAPHICS
        3. Modify the makefile to include the borg1.o (or borg1.obj if windows)
        though borg9.o
        4. Replace your game source files with the ones from the borg source zip file. the game files need certain changes in order for the borg to work. Those files are:
        birth.c, cmd-misc, dungeon, externs, init2, variable.
        5. There are changes to main-win.c for the windows screensaver to work. I do not know if any changes need to be incorporated into your main-mac.

        Any changes from the list in #4 are marked with 'apw'
        Compile and see how far you get. Copy the file borg.txt into your \lib\user directory.

        Let me know how far you get.

        Andrew
        St George Chiropractor
        Angband Borg Homepage

        Comment

        • jtwadsworth
          Rookie
          • Apr 2011
          • 18

          #5
          Originally posted by APWhite
          Off the top of my head, I can think of the following steps. There might be one or two that I am missing. I have done any mac work.

          To install this borg, you will need to do the following:
          1. Modify the config.h to uncomment:
          a. the allow_borg line
          b. the score_borg line
          2. Add a line that says ALLOW_BORG_GRAPHICS
          3. Modify the makefile to include the borg1.o (or borg1.obj if windows)
          though borg9.o
          4. Replace your game source files with the ones from the borg source zip file. the game files need certain changes in order for the borg to work. Those files are:
          birth.c, cmd-misc, dungeon, externs, init2, variable.
          5. There are changes to main-win.c for the windows screensaver to work. I do not know if any changes need to be incorporated into your main-mac.

          Any changes from the list in #4 are marked with 'apw'
          Compile and see how far you get. Copy the file borg.txt into your \lib\user directory.

          Let me know how far you get.

          Andrew
          Ok, I made the edits and replaced the files you indicated above, although there was no externs file

          The result:

          Code:
          JTWiMac:src jtw$ ls
          BIRTH.C			doc			squelch.c
          BORG.TXT		effects.c		squelch.h
          BORG1.C			effects.h		store.c
          BORG1.H			files.c			store.h
          BORG2.C			files.h			tables.c
          BORG2.H			game-cmd.c		target.c
          BORG3.C			game-cmd.h		target.h
          BORG3.H			game-event.c		tests
          BORG4.C			game-event.h		textui.h
          BORG4.H			generate.c		trap.c
          BORG5.C			generate.h		trap.h
          BORG5.H			gtk			types.h
          BORG6.C			h-basic.h		ui-birth.c
          BORG6.H			history.c		ui-birth.h
          BORG7.C			history.h		ui-event.h
          BORG7.H			init.h			ui-knowledge.c
          BORG8.C			list-blow-effects.h	ui-menu.c
          BORG8.H			list-blow-methods.h	ui-menu.h
          BORG9.C			list-effects.h		ui-options.c
          BORG9.H			list-mon-flags.h	ui-spell.c
          CMD-MISC.C		list-mon-spells.h	ui.c
          DUNGEON.C		list-object-flags.h	ui.h
          EXTERNS.H		list-player-flags.h	util.c
          HEADER			load-old.c		win
          INIT2.C			load.c			wiz-spoil.c
          MAIN-WIN.C		macro.c			wiz-stats.c
          Makefile		macro.h			wizard.c
          Makefile.inc		main-crb.c		wizard.h
          Makefile.nds		main-gcu.c		x-char.c
          Makefile.nmake		main-nds.c		x-char.h
          Makefile.osx		main-sdl.c		x-spell.c
          Makefile.src		main-test.c		xtra2.c
          Makefile.std		main-x11.c		xtra3.c
          Makefile.win		main-xxx.c		z-bitflag.c
          VARIABLE.C		main.c			z-bitflag.h
          angband.h		main.h			z-debug.h
          angband.ico		monster			z-file.c
          angband.man		nds			z-file.h
          attack.c		object			z-form.c
          attack.h		option.c		z-form.h
          autoconf.h.in		option.h		z-msg.c
          birth.h			osx			z-msg.h
          button.c		parser.c		z-quark.c
          button.h		parser.h		z-quark.h
          cave.c			pathfind.c		z-rand.c
          cave.h			player			z-rand.h
          cmd-obj.c		prefs.c			z-term.c
          cmd0.c			prefs.h			z-term.h
          cmd1.c			randname.c		z-textblock.c
          cmd2.c			save.c			z-textblock.h
          cmd3.c			savefile.c		z-type.c
          cmd4.c			savefile.h		z-type.h
          cmds.h			score.c			z-util.c
          config.h		signals.c		z-util.h
          death.c			snd-sdl.c		z-virt.c
          debug.c			spells.h		z-virt.h
          debug.h			spells1.c
          defines.h		spells2.c
          JTWiMac:src jtw$ make -f Makefile.osx
          ls: autoconf.h: No such file or directory
                  CC attack.c            
                  CC birth.c             
                  CC button.c            
                  CC cave.c              
                  CC cmd0.c              
                  CC cmd1.c              
                  CC cmd2.c              
                  CC cmd3.c              
                  CC cmd4.c              
          make: *** No rule to make target `cmd-misc.o', needed by `angband.o'.  Stop.
          JTWiMac:src jtw$
          Help pls.

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9629

            #6
            Originally posted by jtwadsworth
            Help pls.
            You may need to change all the filenames to lower case - I see you have CMD_MISC.C, but the makefile wants cmd-misc.c.

            I should think you will also need to add lines for each of the borg files to Makefile.src; something like
            Code:
               borg1.h \
            etc in the HEADERS section and

            Code:
               borg1.o \
            in the ANGFILES section. Note that the formatting for these is very strict - it needs to be <Tab>filename<space>\

            Good luck.
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • Timo Pietilä
              Prophet
              • Apr 2007
              • 4096

              #7
              Originally posted by Nick
              You may need to change all the filenames to lower case - I see you have CMD_MISC.C, but the makefile wants cmd-misc.c.

              I should think you will also need to add lines for each of the borg files to Makefile.src; something like
              Code:
              
              
              Empty code block?

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9629

                #8
                Originally posted by Timo Pietilä
                Empty code block?
                Fixed now. Moral of the story - don't try to use tabs in a forum post.
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • jtwadsworth
                  Rookie
                  • Apr 2011
                  • 18

                  #9
                  Originally posted by Nick
                  You may need to change all the filenames to lower case - I see you have CMD_MISC.C, but the makefile wants cmd-misc.c.

                  I should think you will also need to add lines for each of the borg files to Makefile.src; something like
                  Code:
                     borg1.h \
                  etc in the HEADERS section and

                  Code:
                     borg1.o \
                  in the ANGFILES section. Note that the formatting for these is very strict - it needs to be <Tab>filename<space>\

                  Good luck.
                  Ok, added the info to Makefile.src and changed filenames to lowercase:

                  Code:
                  JTWiMac:src jtw$ ls
                  HEADER			borg4.h			debug.c			list-mon-flags.h	parser.h		trap.h			z-bitflag.h
                  Makefile		borg5.c			debug.h			list-mon-spells.h	pathfind.c		types.h			z-debug.h
                  Makefile.inc		borg5.h			defines.h		list-object-flags.h	player			ui-birth.c		z-file.c
                  Makefile.nds		borg6.c			doc			list-player-flags.h	prefs.c			ui-birth.h		z-file.h
                  Makefile.nmake		borg6.h			dungeon.c		load-old.c		prefs.h			ui-event.h		z-form.c
                  Makefile.osx		borg7.c			effects.c		load.c			randname.c		ui-knowledge.c		z-form.h
                  Makefile.src		borg7.h			effects.h		macro.c			save.c			ui-menu.c		z-msg.c
                  Makefile.std		borg8.c			externs.h		macro.h			savefile.c		ui-menu.h		z-msg.h
                  Makefile.win		borg8.h			files.c			main-crb.c		savefile.h		ui-options.c		z-quark.c
                  angband.h		borg9.c			files.h			main-gcu.c		score.c			ui-spell.c		z-quark.h
                  angband.ico		borg9.h			game-cmd.c		main-nds.c		signals.c		ui.c			z-rand.c
                  angband.man		button.c		game-cmd.h		main-sdl.c		snd-sdl.c		ui.h			z-rand.h
                  attack.c		button.h		game-event.c		main-test.c		spells.h		util.c			z-term.c
                  attack.h		cave.c			game-event.h		main-win.c		spells1.c		variable.c		z-term.h
                  autoconf.h.in		cave.h			generate.c		main-x11.c		spells2.c		win			z-textblock.c
                  birth.c			cmd-misc.c		generate.h		main-xxx.c		squelch.c		wiz-spoil.c		z-textblock.h
                  birth.h			cmd-obj.c		gtk			main.c			squelch.h		wiz-stats.c		z-type.c
                  borg.txt		cmd0.c			h-basic.h		main.h			store.c			wizard.c		z-type.h
                  borg1.c			cmd1.c			history.c		monster			store.h			wizard.h		z-util.c
                  borg1.h			cmd2.c			history.h		nds			tables.c		x-char.c		z-util.h
                  borg2.c			cmd3.c			init.h			object			target.c		x-char.h		z-virt.c
                  borg2.h			cmd4.c			init2.c			option.c		target.h		x-spell.c		z-virt.h
                  borg3.c			cmds.h			list-blow-effects.h	option.h		tests			xtra2.c
                  borg3.h			config.h		list-blow-methods.h	osx			textui.h		xtra3.c
                  borg4.c			death.c			list-effects.h		parser.c		trap.c			z-bitflag.c
                  JTWiMac:src jtw$ make -f Makefile.osx
                  ls: autoconf.h: No such file or directory
                          CC attack.c            
                          CC birth.c             
                          CC button.c            
                          CC cave.c              
                          CC cmd0.c              
                          CC cmd1.c              
                          CC cmd2.c              
                          CC cmd3.c              
                          CC cmd4.c              
                          CC cmd-misc.c          
                          CC cmd-obj.c           
                          CC death.c             
                          CC debug.c             
                          CC dungeon.c           
                          CC effects.c           
                          CC files.c             
                          CC game-cmd.c          
                          CC game-event.c        
                          CC generate.c          
                          CC history.c           
                          CC init2.c             
                          CC load.c              
                          CC load-old.c          
                          CC macro.c             
                          CC monster/melee1.c    
                          CC monster/melee2.c    
                          CC monster/monster1.c  
                          CC monster/monster2.c  
                          CC object/identify.c   
                          CC object/obj-desc.c   
                          CC object/obj-info.c   
                          CC object/obj-make.c   
                          CC object/obj-power.c  
                          CC object/obj-ui.c     
                          CC object/obj-util.c   
                          CC object/randart.c    
                          CC option.c            
                          CC parser.c            
                          CC randname.c          
                          CC pathfind.c          
                          CC prefs.c             
                          CC player/calcs.c      
                  player/calcs.c:77: error: static declaration of ‘adj_int_dev’ follows non-static declaration
                  ./externs.h:18: error: previous declaration of ‘adj_int_dev’ was here
                  player/calcs.c:122: error: static declaration of ‘adj_wis_sav’ follows non-static declaration
                  ./externs.h:19: error: previous declaration of ‘adj_wis_sav’ was here
                  player/calcs.c:168: error: static declaration of ‘adj_dex_dis’ follows non-static declaration
                  ./externs.h:16: error: previous declaration of ‘adj_dex_dis’ was here
                  player/calcs.c:214: error: static declaration of ‘adj_int_dis’ follows non-static declaration
                  ./externs.h:17: error: previous declaration of ‘adj_int_dis’ was here
                  player/calcs.c:259: error: static declaration of ‘adj_dex_ta’ follows non-static declaration
                  ./externs.h:11: error: previous declaration of ‘adj_dex_ta’ was here
                  player/calcs.c:304: error: static declaration of ‘adj_str_td’ follows non-static declaration
                  ./externs.h:12: error: previous declaration of ‘adj_str_td’ was here
                  player/calcs.c:350: error: static declaration of ‘adj_dex_th’ follows non-static declaration
                  ./externs.h:13: error: previous declaration of ‘adj_dex_th’ was here
                  player/calcs.c:396: error: static declaration of ‘adj_str_th’ follows non-static declaration
                  ./externs.h:14: error: previous declaration of ‘adj_str_th’ was here
                  player/calcs.c:442: error: static declaration of ‘adj_str_wgt’ follows non-static declaration
                  ./externs.h:21: error: previous declaration of ‘adj_str_wgt’ was here
                  player/calcs.c:534: error: static declaration of ‘adj_str_dig’ follows non-static declaration
                  ./externs.h:20: error: previous declaration of ‘adj_str_dig’ was here
                  player/calcs.c:626: error: static declaration of ‘adj_dex_blow’ follows non-static declaration
                  ./externs.h:15: error: previous declaration of ‘adj_dex_blow’ was here
                  player/calcs.c:764: error: static declaration of ‘adj_con_mhp’ follows non-static declaration
                  ./externs.h:22: error: previous declaration of ‘adj_con_mhp’ was here
                  player/calcs.c:77: error: static declaration of ‘adj_int_dev’ follows non-static declaration
                  ./externs.h:18: error: previous declaration of ‘adj_int_dev’ was here
                  player/calcs.c:122: error: static declaration of ‘adj_wis_sav’ follows non-static declaration
                  ./externs.h:19: error: previous declaration of ‘adj_wis_sav’ was here
                  player/calcs.c:168: error: static declaration of ‘adj_dex_dis’ follows non-static declaration
                  ./externs.h:16: error: previous declaration of ‘adj_dex_dis’ was here
                  player/calcs.c:214: error: static declaration of ‘adj_int_dis’ follows non-static declaration
                  ./externs.h:17: error: previous declaration of ‘adj_int_dis’ was here
                  player/calcs.c:259: error: static declaration of ‘adj_dex_ta’ follows non-static declaration
                  ./externs.h:11: error: previous declaration of ‘adj_dex_ta’ was here
                  player/calcs.c:304: error: static declaration of ‘adj_str_td’ follows non-static declaration
                  ./externs.h:12: error: previous declaration of ‘adj_str_td’ was here
                  player/calcs.c:350: error: static declaration of ‘adj_dex_th’ follows non-static declaration
                  ./externs.h:13: error: previous declaration of ‘adj_dex_th’ was here
                  player/calcs.c:396: error: static declaration of ‘adj_str_th’ follows non-static declaration
                  ./externs.h:14: error: previous declaration of ‘adj_str_th’ was here
                  player/calcs.c:442: error: static declaration of ‘adj_str_wgt’ follows non-static declaration
                  ./externs.h:21: error: previous declaration of ‘adj_str_wgt’ was here
                  player/calcs.c:534: error: static declaration of ‘adj_str_dig’ follows non-static declaration
                  ./externs.h:20: error: previous declaration of ‘adj_str_dig’ was here
                  player/calcs.c:626: error: static declaration of ‘adj_dex_blow’ follows non-static declaration
                  ./externs.h:15: error: previous declaration of ‘adj_dex_blow’ was here
                  player/calcs.c:764: error: static declaration of ‘adj_con_mhp’ follows non-static declaration
                  ./externs.h:22: error: previous declaration of ‘adj_con_mhp’ was here
                  lipo: can't figure out the architecture type of: /var/folders/lk/lkxSHiXmEYyvqPPPmlfH2U+++TI/-Tmp-//ccqlAk76.out
                  make: *** [player/calcs.o] Error 1
                  JTWiMac:src jtw$

                  Comment

                  • APWhite
                    Adept
                    • Jul 2007
                    • 244

                    #10
                    Originally posted by jtwadsworth
                    Ok, added the info to Makefile.src and changed filenames to lowercase:

                    Code:
                    player/calcs.c:77: error: static declaration of ‘adj_int_dev’ follows non-static declaration
                    ./externs.h:18: error: previous declaration of ‘adj_int_dev’ was here
                    player/calcs.c:122: error: static declaration of ‘adj_wis_sav’ follows non-static declaration
                    ./externs.h:19: error: previous declaration of ‘adj_wis_sav’ was here
                    player/calcs.c:168: error: static declaration of ‘adj_dex_dis’ follows non-static declaration
                    ./externs.h:16: error: previous declaration of ‘adj_dex_dis’ was here
                    player/calcs.c:214: error: static declaration of ‘adj_int_dis’ follows non-static declaration
                    ./externs.h:17: error: previous declaration of ‘adj_int_dis’ was here
                    player/calcs.c:259: error: static declaration of ‘adj_dex_ta’ follows non-static declaration
                    ./externs.h:11: error: previous declaration of ‘adj_dex_ta’ was here
                    player/calcs.c:304: error: static declaration of ‘adj_str_td’ follows non-static declaration
                    ./externs.h:12: error: previous declaration of ‘adj_str_td’ was here
                    player/calcs.c:350: error: static declaration of ‘adj_dex_th’ follows non-static declaration
                    ./externs.h:13: error: previous declaration of ‘adj_dex_th’ was here
                    player/calcs.c:396: error: static declaration of ‘adj_str_th’ follows non-static declaration
                    ./externs.h:14: error: previous declaration of ‘adj_str_th’ was here
                    player/calcs.c:442: error: static declaration of ‘adj_str_wgt’ follows non-static declaration
                    ./externs.h:21: error: previous declaration of ‘adj_str_wgt’ was here
                    player/calcs.c:534: error: static declaration of ‘adj_str_dig’ follows non-static declaration
                    ./externs.h:20: error: previous declaration of ‘adj_str_dig’ was here
                    player/calcs.c:626: error: static declaration of ‘adj_dex_blow’ follows non-static declaration
                    ./externs.h:15: error: previous declaration of ‘adj_dex_blow’ was here
                    player/calcs.c:764: error: static declaration of ‘adj_con_mhp’ follows non-static declaration
                    ./externs.h:22: error: previous declaration of ‘adj_con_mhp’ was here
                    player/calcs.c:77: error: static declaration of ‘adj_int_dev’ follows non-static declaration
                    ./externs.h:18: error: previous declaration of ‘adj_int_dev’ was here
                    player/calcs.c:122: error: static declaration of ‘adj_wis_sav’ follows non-static declaration
                    ./externs.h:19: error: previous declaration of ‘adj_wis_sav’ was here
                    player/calcs.c:168: error: static declaration of ‘adj_dex_dis’ follows non-static declaration
                    ./externs.h:16: error: previous declaration of ‘adj_dex_dis’ was here
                    player/calcs.c:214: error: static declaration of ‘adj_int_dis’ follows non-static declaration
                    ./externs.h:17: error: previous declaration of ‘adj_int_dis’ was here
                    player/calcs.c:259: error: static declaration of ‘adj_dex_ta’ follows non-static declaration
                    ./externs.h:11: error: previous declaration of ‘adj_dex_ta’ was here
                    player/calcs.c:304: error: static declaration of ‘adj_str_td’ follows non-static declaration
                    ./externs.h:12: error: previous declaration of ‘adj_str_td’ was here
                    player/calcs.c:350: error: static declaration of ‘adj_dex_th’ follows non-static declaration
                    ./externs.h:13: error: previous declaration of ‘adj_dex_th’ was here
                    player/calcs.c:396: error: static declaration of ‘adj_str_th’ follows non-static declaration
                    ./externs.h:14: error: previous declaration of ‘adj_str_th’ was here
                    player/calcs.c:442: error: static declaration of ‘adj_str_wgt’ follows non-static declaration
                    ./externs.h:21: error: previous declaration of ‘adj_str_wgt’ was here
                    player/calcs.c:534: error: static declaration of ‘adj_str_dig’ follows non-static declaration
                    ./externs.h:20: error: previous declaration of ‘adj_str_dig’ was here
                    player/calcs.c:626: error: static declaration of ‘adj_dex_blow’ follows non-static declaration
                    ./externs.h:15: error: previous declaration of ‘adj_dex_blow’ was here
                    player/calcs.c:764: error: static declaration of ‘adj_con_mhp’ follows non-static declaration
                    ./externs.h:22: error: previous declaration of ‘adj_con_mhp’ was here
                    lipo: can't figure out the architecture type of: /var/folders/lk/lkxSHiXmEYyvqPPPmlfH2U+++TI/-Tmp-//ccqlAk76.out
                    make: *** [player/calcs.o] Error 1
                    JTWiMac:src jtw$
                    Did you figure out how to fix these minor errors or need me to walk you through it?
                    St George Chiropractor
                    Angband Borg Homepage

                    Comment

                    • jtwadsworth
                      Rookie
                      • Apr 2011
                      • 18

                      #11
                      Originally posted by APWhite
                      Did you figure out how to fix these minor errors or need me to walk you through it?
                      Need help please. I am a neophyte with compiling but a willing study.

                      jtw

                      Comment

                      • APWhite
                        Adept
                        • Jul 2007
                        • 244

                        #12
                        Originally posted by jtwadsworth
                        Need help please. I am a neophyte with compiling but a willing study.

                        jtw

                        In the player/calcs.c you need to change the line
                        /*
                        * Stat Table (INT) -- Magic devices
                        */
                        static const byte adj_int_dev[STAT_RANGE] =
                        {

                        to this:
                        /*
                        * Stat Table (INT) -- Magic devices
                        * apw -- screensaver needs extern
                        */
                        extern const byte adj_int_dev[STAT_RANGE] =
                        {

                        Add the 'extern' entry (as seen above) in your player/calcs.c file to each of the following (they are listed in externs.h):
                        extern const byte adj_dex_ta[];
                        extern const byte adj_str_td[];
                        extern const byte adj_dex_th[];
                        extern const byte adj_str_th[];
                        extern const byte adj_dex_blow[];
                        extern const byte adj_dex_dis[];
                        extern const byte adj_int_dis[];
                        extern const byte adj_int_dev[];
                        extern const byte adj_wis_sav[];
                        extern const byte adj_str_dig[];
                        extern const byte adj_str_wgt[];
                        extern const int adj_con_mhp[];


                        Andrew
                        St George Chiropractor
                        Angband Borg Homepage

                        Comment

                        • Timo Pietilä
                          Prophet
                          • Apr 2007
                          • 4096

                          #13
                          Originally posted by APWhite
                          In the player/calcs.c you need to change the line
                          /*
                          * Stat Table (INT) -- Magic devices
                          */
                          static const byte adj_int_dev[STAT_RANGE] =
                          {

                          to this:
                          /*
                          * Stat Table (INT) -- Magic devices
                          * apw -- screensaver needs extern
                          */
                          extern const byte adj_int_dev[STAT_RANGE] =
                          {

                          Add the 'extern' entry (as seen above) in your player/calcs.c file to each of the following (they are listed in externs.h):
                          extern const byte adj_dex_ta[];

                          ....

                          Andrew
                          Isn't externs.h part of normal angband without borg? Shouldn't that then be in normal set of sources too?

                          Comment

                          • Magnate
                            Angband Devteam member
                            • May 2007
                            • 5110

                            #14
                            Originally posted by Timo Pietilä
                            Isn't externs.h part of normal angband without borg? Shouldn't that then be in normal set of sources too?
                            Preferably not, as we are trying to get rid of externs.h altogether (see the comments in the file itself). So we try not to add to it.
                            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                            Comment

                            • jtwadsworth
                              Rookie
                              • Apr 2011
                              • 18

                              #15
                              Originally posted by APWhite
                              In the player/calcs.c you need to change the line
                              /*
                              * Stat Table (INT) -- Magic devices
                              */
                              static const byte adj_int_dev[STAT_RANGE] =
                              {

                              to this:
                              /*
                              * Stat Table (INT) -- Magic devices
                              * apw -- screensaver needs extern
                              */
                              extern const byte adj_int_dev[STAT_RANGE] =
                              {

                              Add the 'extern' entry (as seen above) in your player/calcs.c file to each of the following (they are listed in externs.h):
                              extern const byte adj_dex_ta[];
                              extern const byte adj_str_td[];
                              extern const byte adj_dex_th[];
                              extern const byte adj_str_th[];
                              extern const byte adj_dex_blow[];
                              extern const byte adj_dex_dis[];
                              extern const byte adj_int_dis[];
                              extern const byte adj_int_dev[];
                              extern const byte adj_wis_sav[];
                              extern const byte adj_str_dig[];
                              extern const byte adj_str_wgt[];
                              extern const int adj_con_mhp[];


                              Andrew
                              Ok, made the changes in the file as listed above...next errors:

                              Code:
                              Last login: Wed Apr 13 17:31:01 on ttys000
                              cdJTWiMac:~ jtw$ cd Downloads/angband-3.2.0/src
                              JTWiMac:src jtw$ ls
                              HEADER			dungeon.c		randname.o
                              Makefile		dungeon.o		save.c
                              Makefile.inc		effects.c		savefile.c
                              Makefile.nds		effects.h		savefile.h
                              Makefile.nmake		effects.o		score.c
                              Makefile.osx		externs.h		signals.c
                              Makefile.src		files.c			snd-sdl.c
                              Makefile.std		files.h			spells.h
                              Makefile.win		files.o			spells1.c
                              angband.h		game-cmd.c		spells2.c
                              angband.ico		game-cmd.h		squelch.c
                              angband.man		game-cmd.o		squelch.h
                              attack.c		game-event.c		store.c
                              attack.h		game-event.h		store.h
                              attack.o		game-event.o		tables.c
                              autoconf.h.in		generate.c		target.c
                              birth.c			generate.h		target.h
                              birth.h			generate.o		tests
                              birth.o			gtk			textui.h
                              borg.txt		h-basic.h		trap.c
                              borg1.c			history.c		trap.h
                              borg1.h			history.h		types.h
                              borg2.c			history.o		ui-birth.c
                              borg2.h			init.h			ui-birth.h
                              borg3.c			init2.c			ui-event.h
                              borg3.h			init2.o			ui-knowledge.c
                              borg4.c			list-blow-effects.h	ui-menu.c
                              borg4.h			list-blow-methods.h	ui-menu.h
                              borg5.c			list-effects.h		ui-options.c
                              borg5.h			list-mon-flags.h	ui-spell.c
                              borg6.c			list-mon-spells.h	ui.c
                              borg6.h			list-object-flags.h	ui.h
                              borg7.c			list-player-flags.h	util.c
                              borg7.h			load-old.c		variable.c
                              borg8.c			load-old.o		win
                              borg8.h			load.c			wiz-spoil.c
                              borg9.c			load.o			wiz-stats.c
                              borg9.h			macro.c			wizard.c
                              button.c		macro.h			wizard.h
                              button.h		macro.o			x-char.c
                              button.o		main-crb.c		x-char.h
                              cave.c			main-gcu.c		x-spell.c
                              cave.h			main-nds.c		xtra2.c
                              cave.o			main-sdl.c		xtra3.c
                              cmd-misc.c		main-test.c		z-bitflag.c
                              cmd-misc.o		main-win.c		z-bitflag.h
                              cmd-obj.c		main-x11.c		z-debug.h
                              cmd-obj.o		main-xxx.c		z-file.c
                              cmd0.c			main.c			z-file.h
                              cmd0.o			main.h			z-form.c
                              cmd1.c			monster			z-form.h
                              cmd1.o			nds			z-msg.c
                              cmd2.c			object			z-msg.h
                              cmd2.o			option.c		z-quark.c
                              cmd3.c			option.h		z-quark.h
                              cmd3.o			option.o		z-rand.c
                              cmd4.c			osx			z-rand.h
                              cmd4.o			parser.c		z-term.c
                              cmds.h			parser.h		z-term.h
                              config.h		parser.o		z-textblock.c
                              death.c			pathfind.c		z-textblock.h
                              death.o			pathfind.o		z-type.c
                              debug.c			player			z-type.h
                              debug.h			prefs.c			z-util.c
                              debug.o			prefs.h			z-util.h
                              defines.h		prefs.o			z-virt.c
                              doc			randname.c		z-virt.h
                              JTWiMac:src jtw$ make -f Makefile.osx
                              ls: autoconf.h: No such file or directory
                                      CC player/calcs.c      
                              player/calcs.c:78: warning: ‘adj_int_dev’ initialized and declared ‘extern’
                              player/calcs.c:124: warning: ‘adj_wis_sav’ initialized and declared ‘extern’
                              player/calcs.c:171: warning: ‘adj_dex_dis’ initialized and declared ‘extern’
                              player/calcs.c:218: warning: ‘adj_int_dis’ initialized and declared ‘extern’
                              player/calcs.c:264: warning: ‘adj_dex_ta’ initialized and declared ‘extern’
                              player/calcs.c:310: warning: ‘adj_str_td’ initialized and declared ‘extern’
                              player/calcs.c:357: warning: ‘adj_dex_th’ initialized and declared ‘extern’
                              player/calcs.c:404: warning: ‘adj_str_th’ initialized and declared ‘extern’
                              player/calcs.c:451: warning: ‘adj_str_wgt’ initialized and declared ‘extern’
                              player/calcs.c:544: warning: ‘adj_str_dig’ initialized and declared ‘extern’
                              player/calcs.c:637: warning: ‘adj_dex_blow’ initialized and declared ‘extern’
                              player/calcs.c:776: warning: ‘adj_con_mhp’ initialized and declared ‘extern’
                              player/calcs.c:78: warning: ‘adj_int_dev’ initialized and declared ‘extern’
                              player/calcs.c:124: warning: ‘adj_wis_sav’ initialized and declared ‘extern’
                              player/calcs.c:171: warning: ‘adj_dex_dis’ initialized and declared ‘extern’
                              player/calcs.c:218: warning: ‘adj_int_dis’ initialized and declared ‘extern’
                              player/calcs.c:264: warning: ‘adj_dex_ta’ initialized and declared ‘extern’
                              player/calcs.c:310: warning: ‘adj_str_td’ initialized and declared ‘extern’
                              player/calcs.c:357: warning: ‘adj_dex_th’ initialized and declared ‘extern’
                              player/calcs.c:404: warning: ‘adj_str_th’ initialized and declared ‘extern’
                              player/calcs.c:451: warning: ‘adj_str_wgt’ initialized and declared ‘extern’
                              player/calcs.c:544: warning: ‘adj_str_dig’ initialized and declared ‘extern’
                              player/calcs.c:637: warning: ‘adj_dex_blow’ initialized and declared ‘extern’
                              player/calcs.c:776: warning: ‘adj_con_mhp’ initialized and declared ‘extern’
                                      CC player/player.c     
                                      CC player/spell.c      
                                      CC player/timed.c      
                                      CC player/util.c       
                                      CC score.c             
                                      CC signals.c           
                                      CC save.c              
                                      CC savefile.c          
                                      CC spells1.c           
                                      CC spells2.c           
                                      CC squelch.c           
                                      CC store.c             
                                      CC tables.c            
                                      CC target.c            
                                      CC trap.c              
                                      CC ui.c                
                                      CC ui-birth.c          
                                      CC ui-knowledge.c      
                                      CC ui-menu.c           
                                      CC ui-options.c        
                                      CC ui-spell.c          
                                      CC util.c              
                                      CC variable.c          
                                      CC wiz-spoil.c         
                                      CC wiz-stats.c         
                                      CC wizard.c            
                                      CC x-char.c            
                                      CC x-spell.c           
                                      CC xtra2.c             
                                      CC xtra3.c             
                                      CC borg1.c             
                              borg1.c:4:22: error: tvalsval.h: No such file or directory
                              borg1.c: In function ‘borg_init_1’:
                              borg1.c:2541: warning: implicit declaration of function ‘C_MAKE’
                              borg1.c:2541: error: expected expression before ‘char’
                              borg1.c:2555: error: expected expression before ‘borg_grid’
                              borg1.c:2562: warning: implicit declaration of function ‘MAKE’
                              borg1.c:2562: error: expected expression before ‘borg_data’
                              borg1.c:2565: error: expected expression before ‘borg_data’
                              borg1.c:2568: error: expected expression before ‘borg_data’
                              borg1.c:2571: error: expected expression before ‘borg_data’
                              borg1.c:2574: error: expected expression before ‘borg_data’
                              borg1.c:2590: error: expected expression before ‘int’
                              borg1.c:2591: error: expected expression before ‘int’
                              borg1.c:2599: error: expected expression before ‘int’
                              borg1.c:2600: error: expected expression before ‘int’
                              borg1.c:2605: error: expected expression before ‘int’
                              borg1.c:2606: error: expected expression before ‘int’
                              borg1.c:2611: error: expected expression before ‘int’
                              borg1.c:2612: error: expected expression before ‘int’
                              borg1.c:2618: error: expected expression before ‘byte’
                              borg1.c:2623: error: expected expression before ‘int’
                              borg1.c:2624: error: expected expression before ‘int’
                              borg1.c:2629: error: expected expression before ‘int’
                              borg1.c:2630: error: expected expression before ‘int’
                              borg1.c:2635: error: expected expression before ‘int’
                              borg1.c:2636: error: expected expression before ‘int’
                              borg1.c:2641: error: expected expression before ‘int’
                              borg1.c:2642: error: expected expression before ‘int’
                              borg1.c:2651: error: expected expression before ‘borg_take’
                              borg1.c:2672: error: expected expression before ‘borg_kill’
                              borg1.c:2690: error: expected expression before ‘s16b’
                              borg1.c:2693: error: expected expression before ‘s16b’
                              borg1.c:4:22: error: tvalsval.h: No such file or directory
                              borg1.c: In function ‘borg_init_1’:
                              borg1.c:2541: warning: implicit declaration of function ‘C_MAKE’
                              borg1.c:2541: error: expected expression before ‘char’
                              borg1.c:2555: error: expected expression before ‘borg_grid’
                              borg1.c:2562: warning: implicit declaration of function ‘MAKE’
                              borg1.c:2562: error: expected expression before ‘borg_data’
                              borg1.c:2565: error: expected expression before ‘borg_data’
                              borg1.c:2568: error: expected expression before ‘borg_data’
                              borg1.c:2571: error: expected expression before ‘borg_data’
                              borg1.c:2574: error: expected expression before ‘borg_data’
                              borg1.c:2590: error: expected expression before ‘int’
                              borg1.c:2591: error: expected expression before ‘int’
                              borg1.c:2599: error: expected expression before ‘int’
                              borg1.c:2600: error: expected expression before ‘int’
                              borg1.c:2605: error: expected expression before ‘int’
                              borg1.c:2606: error: expected expression before ‘int’
                              borg1.c:2611: error: expected expression before ‘int’
                              borg1.c:2612: error: expected expression before ‘int’
                              borg1.c:2618: error: expected expression before ‘byte’
                              borg1.c:2623: error: expected expression before ‘int’
                              borg1.c:2624: error: expected expression before ‘int’
                              borg1.c:2629: error: expected expression before ‘int’
                              borg1.c:2630: error: expected expression before ‘int’
                              borg1.c:2635: error: expected expression before ‘int’
                              borg1.c:2636: error: expected expression before ‘int’
                              borg1.c:2641: error: expected expression before ‘int’
                              borg1.c:2642: error: expected expression before ‘int’
                              borg1.c:2651: error: expected expression before ‘borg_take’
                              borg1.c:2672: error: expected expression before ‘borg_kill’
                              borg1.c:2690: error: expected expression before ‘s16b’
                              borg1.c:2693: error: expected expression before ‘s16b’
                              lipo: can't figure out the architecture type of: /var/folders/lk/lkxSHiXmEYyvqPPPmlfH2U+++TI/-Tmp-//cc7KPs4C.out
                              make: *** [borg1.o] Error 1
                              JTWiMac:src jtw$ make -f Makefile.osx
                              ls: autoconf.h: No such file or directory
                                      CC borg1.c             
                              borg1.c:4:22: error: tvalsval.h: No such file or directory
                              borg1.c: In function ‘borg_init_1’:
                              borg1.c:2541: warning: implicit declaration of function ‘C_MAKE’
                              borg1.c:2541: error: expected expression before ‘char’
                              borg1.c:2555: error: expected expression before ‘borg_grid’
                              borg1.c:2562: warning: implicit declaration of function ‘MAKE’
                              borg1.c:2562: error: expected expression before ‘borg_data’
                              borg1.c:2565: error: expected expression before ‘borg_data’
                              borg1.c:2568: error: expected expression before ‘borg_data’
                              borg1.c:2571: error: expected expression before ‘borg_data’
                              borg1.c:2574: error: expected expression before ‘borg_data’
                              borg1.c:2590: error: expected expression before ‘int’
                              borg1.c:2591: error: expected expression before ‘int’
                              borg1.c:2599: error: expected expression before ‘int’
                              borg1.c:2600: error: expected expression before ‘int’
                              borg1.c:2605: error: expected expression before ‘int’
                              borg1.c:2606: error: expected expression before ‘int’
                              borg1.c:2611: error: expected expression before ‘int’
                              borg1.c:2612: error: expected expression before ‘int’
                              borg1.c:2618: error: expected expression before ‘byte’
                              borg1.c:2623: error: expected expression before ‘int’
                              borg1.c:2624: error: expected expression before ‘int’
                              borg1.c:2629: error: expected expression before ‘int’
                              borg1.c:2630: error: expected expression before ‘int’
                              borg1.c:2635: error: expected expression before ‘int’
                              borg1.c:2636: error: expected expression before ‘int’
                              borg1.c:2641: error: expected expression before ‘int’
                              borg1.c:2642: error: expected expression before ‘int’
                              borg1.c:2651: error: expected expression before ‘borg_take’
                              borg1.c:2672: error: expected expression before ‘borg_kill’
                              borg1.c:2690: error: expected expression before ‘s16b’
                              borg1.c:2693: error: expected expression before ‘s16b’
                              borg1.c:4:22: error: tvalsval.h: No such file or directory
                              borg1.c: In function ‘borg_init_1’:
                              borg1.c:2541: warning: implicit declaration of function ‘C_MAKE’
                              borg1.c:2541: error: expected expression before ‘char’
                              borg1.c:2555: error: expected expression before ‘borg_grid’
                              borg1.c:2562: warning: implicit declaration of function ‘MAKE’
                              borg1.c:2562: error: expected expression before ‘borg_data’
                              borg1.c:2565: error: expected expression before ‘borg_data’
                              borg1.c:2568: error: expected expression before ‘borg_data’
                              borg1.c:2571: error: expected expression before ‘borg_data’
                              borg1.c:2574: error: expected expression before ‘borg_data’
                              borg1.c:2590: error: expected expression before ‘int’
                              borg1.c:2591: error: expected expression before ‘int’
                              borg1.c:2599: error: expected expression before ‘int’
                              borg1.c:2600: error: expected expression before ‘int’
                              borg1.c:2605: error: expected expression before ‘int’
                              borg1.c:2606: error: expected expression before ‘int’
                              borg1.c:2611: error: expected expression before ‘int’
                              borg1.c:2612: error: expected expression before ‘int’
                              borg1.c:2618: error: expected expression before ‘byte’
                              borg1.c:2623: error: expected expression before ‘int’
                              borg1.c:2624: error: expected expression before ‘int’
                              borg1.c:2629: error: expected expression before ‘int’
                              borg1.c:2630: error: expected expression before ‘int’
                              borg1.c:2635: error: expected expression before ‘int’
                              borg1.c:2636: error: expected expression before ‘int’
                              borg1.c:2641: error: expected expression before ‘int’
                              borg1.c:2642: error: expected expression before ‘int’
                              borg1.c:2651: error: expected expression before ‘borg_take’
                              borg1.c:2672: error: expected expression before ‘borg_kill’
                              borg1.c:2690: error: expected expression before ‘s16b’
                              borg1.c:2693: error: expected expression before ‘s16b’
                              lipo: can't figure out the architecture type of: /var/folders/lk/lkxSHiXmEYyvqPPPmlfH2U+++TI/-Tmp-//ccfhIiOP.out
                              make: *** [borg1.o] Error 1
                              JTWiMac:src jtw$
                              If I can get this working well, I'll post it for other Mac Users

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎