320 Screensaver is posted

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

    #16
    Originally posted by jtwadsworth
    Ok, made the changes in the file as listed above...next errors:

    Code:
            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’
    If I can get this working well, I'll post it for other Mac Users
    You should have the tvalsval.h file in the angband distribution. See if you can locate it and make sure the directory is correct. You may need to move it from 'src\object\tvalsval.h' to 'src\tvalsval.h' Mine is located in src\object\tvalsval.h' and VS2008 does not seem to squawk about it.

    Another option would be to change the recursing of the compiler. Is there a way to tell it to look in each subdirectory for any called files?

    The C_MAKE() issue may come from z-virt.h. I had to add c_make and another object to z_vert.h but the modified z-vert.h should be included in the borg source. If not, just add this to your copy of z-virt.h
    Code:
    /* Allocate a wiped array of type T[N], assign to pointer P */
    /* apw --screensaver begin */
    #define C_MAKE(P, N, T) \
    	((P) = C_ZNEW(N, T))
    /* Allocate a wiped thing of type T, assign to pointer P */
    #define MAKE(P, T) \
    	((P) = ZNEW(T))
    /* apw -- screensaver end*/
    I think that should help reduce the errors. Make those changes then send your report.

    Andrew
    St George Chiropractor
    Angband Borg Homepage

    Comment

    • jtwadsworth
      Rookie
      • Apr 2011
      • 18

      #17
      Originally posted by APWhite
      You should have the tvalsval.h file in the angband distribution. See if you can locate it and make sure the directory is correct. You may need to move it from 'src\object\tvalsval.h' to 'src\tvalsval.h' Mine is located in src\object\tvalsval.h' and VS2008 does not seem to squawk about it.

      Another option would be to change the recursing of the compiler. Is there a way to tell it to look in each subdirectory for any called files?

      The C_MAKE() issue may come from z-virt.h. I had to add c_make and another object to z_vert.h but the modified z-vert.h should be included in the borg source. If not, just add this to your copy of z-virt.h
      Code:
      /* Allocate a wiped array of type T[N], assign to pointer P */
      /* apw --screensaver begin */
      #define C_MAKE(P, N, T) \
      	((P) = C_ZNEW(N, T))
      /* Allocate a wiped thing of type T, assign to pointer P */
      #define MAKE(P, T) \
      	((P) = ZNEW(T))
      /* apw -- screensaver end*/
      I think that should help reduce the errors. Make those changes then send your report.

      Andrew
      Ok, above changes made. Large output is:

      Code:
      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-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 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: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/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-menu.c           
              CC util.c              
              CC variable.c          
              CC wiz-spoil.c         
              CC wiz-stats.c         
              CC wizard.c            
              CC x-spell.c           
              CC xtra2.c             
              CC xtra3.c             
              CC borg1.c             
              CC borg2.c             
              CC borg3.c             
      borg3.c: In function ‘borg_object_star_id_aux’:
      borg3.c:1340: warning: comparison between signed and unsigned
      borg3.c: In function ‘borg_item_analyze’:
      borg3.c:1867: warning: comparison between signed and unsigned
      borg3.c: In function ‘borg_read_unknown’:
      borg3.c:2556: warning: implicit declaration of function ‘no_light’
      borg3.c:2531: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_read_scroll’:
      borg3.c:2675: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_spell_okay’:
      borg3.c:3399: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_prayer_okay’:
      borg3.c:3586: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_object_star_id_aux’:
      borg3.c:1340: warning: comparison between signed and unsigned
      borg3.c: In function ‘borg_item_analyze’:
      borg3.c:1867: warning: comparison between signed and unsigned
      borg3.c: In function ‘borg_read_unknown’:
      borg3.c:2556: warning: implicit declaration of function ‘no_light’
      borg3.c:2531: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_read_scroll’:
      borg3.c:2675: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_spell_okay’:
      borg3.c:3399: warning: unused variable ‘ag’
      borg3.c: In function ‘borg_prayer_okay’:
      borg3.c:3586: warning: unused variable ‘ag’
              CC borg4.c             
      borg4.c: In function ‘borg_notice_aux1’:
      borg4.c:131: warning: implicit declaration of function ‘player_flags’
      borg4.c:696: warning: suggest parentheses around && within ||
      borg4.c: In function ‘borg_power_aux1’:
      borg4.c:4526: warning: suggest parentheses around && within ||
      borg4.c: In function ‘borg_power_aux2’:
      borg4.c:5553: warning: suggest parentheses around && within ||
      borg4.c: In function ‘borg_danger_aux’:
      borg4.c:8549: warning: implicit declaration of function ‘distance’
      borg4.c:8278: warning: unused variable ‘monster_moves’
      borg4.c:8274: warning: unused variable ‘glyph’
      borg4.c: In function ‘borg_notice_aux1’:
      borg4.c:131: warning: implicit declaration of function ‘player_flags’
      borg4.c:696: warning: suggest parentheses around && within ||
      borg4.c: In function ‘borg_power_aux1’:
      borg4.c:4526: warning: suggest parentheses around && within ||
      borg4.c: In function ‘borg_power_aux2’:
      borg4.c:5553: warning: suggest parentheses around && within ||
      borg4.c: In function ‘borg_danger_aux’:
      borg4.c:8549: warning: implicit declaration of function ‘distance’
      borg4.c:8278: warning: unused variable ‘monster_moves’
      borg4.c:8274: warning: unused variable ‘glyph’
              CC borg5.c             
      borg5.c: In function ‘observe_take_move’:
      borg5.c:480: warning: implicit declaration of function ‘distance’
      borg5.c: In function ‘borg_follow_kill_aux’:
      borg5.c:1344: warning: unused variable ‘r_ptr’
      borg5.c: In function ‘borg_update_map’:
      borg5.c:3135: warning: implicit declaration of function ‘map_info’
      borg5.c: In function ‘borg_init_5’:
      borg5.c:5453: warning: array subscript has type ‘char’
      borg5.c: In function ‘observe_take_move’:
      borg5.c:480: warning: implicit declaration of function ‘distance’
      borg5.c: In function ‘borg_follow_kill_aux’:
      borg5.c:1344: warning: unused variable ‘r_ptr’
      borg5.c: In function ‘borg_update_map’:
      borg5.c:3135: warning: implicit declaration of function ‘map_info’
      borg5.c: In function ‘borg_init_5’:
      borg5.c:5453: warning: array subscript has type ‘char’
              CC borg6.c             
      borg6.c:559: warning: return type defaults to ‘int’
      borg6.c: In function ‘borg_freedom’:
      borg6.c:891: warning: implicit declaration of function ‘distance’
      borg6.c: In function ‘borg_escape’:
      borg6.c:2102: warning: suggest parentheses around && within ||
      borg6.c:2190: warning: suggest parentheses around && within ||
      borg6.c:2265: warning: suggest parentheses around && within ||
      borg6.c:2340: warning: suggest parentheses around && within ||
      borg6.c: In function ‘borg_caution’:
      borg6.c:3288: warning: suggest parentheses around && within ||
      borg6.c:3545: warning: implicit declaration of function ‘borg_count_sell’
      borg6.c: At top level:
      borg6.c:10136: warning: ‘static’ is not at beginning of declaration
      borg6.c: In function ‘borg_defend_aux_genocide’:
      borg6.c:11829: warning: array subscript has type ‘char’
      borg6.c:11832: warning: array subscript has type ‘char’
      borg6.c:11835: warning: array subscript has type ‘char’
      borg6.c:11843: warning: array subscript has type ‘char’
      borg6.c:11843: warning: array subscript has type ‘char’
      borg6.c:11880: warning: array subscript has type ‘char’
      borg6.c:11884: warning: array subscript has type ‘char’
      borg6.c:11884: warning: array subscript has type ‘char’
      borg6.c: In function ‘borg_defend_aux_destruction’:
      borg6.c:12169: warning: suggest parentheses around && within ||
      borg6.c: In function ‘borg_flow_recover’:
      borg6.c:16754: warning: unused variable ‘b_x’
      borg6.c:16754: warning: unused variable ‘b_y’
      borg6.c: In function ‘borg_flow_kill_direct’:
      borg6.c:17907: warning: unused variable ‘perma_grids’
      borg6.c:17906: warning: unused variable ‘b_x’
      borg6.c:17906: warning: unused variable ‘b_y’
      borg6.c: At top level:
      borg6.c:13898: warning: ‘borg_perma_aux_glyph’ defined but not used
      borg6.c: In function ‘borg_caution’:
      borg6.c:3895: warning: ‘b_p’ may be used uninitialized in this function
      borg6.c:559: warning: return type defaults to ‘int’
      borg6.c: In function ‘borg_freedom’:
      borg6.c:891: warning: implicit declaration of function ‘distance’
      borg6.c: In function ‘borg_escape’:
      borg6.c:2102: warning: suggest parentheses around && within ||
      borg6.c:2190: warning: suggest parentheses around && within ||
      borg6.c:2265: warning: suggest parentheses around && within ||
      borg6.c:2340: warning: suggest parentheses around && within ||
      borg6.c: In function ‘borg_caution’:
      borg6.c:3288: warning: suggest parentheses around && within ||
      borg6.c:3545: warning: implicit declaration of function ‘borg_count_sell’
      borg6.c: At top level:
      borg6.c:10136: warning: ‘static’ is not at beginning of declaration
      borg6.c: In function ‘borg_defend_aux_genocide’:
      borg6.c:11829: warning: array subscript has type ‘char’
      borg6.c:11832: warning: array subscript has type ‘char’
      borg6.c:11835: warning: array subscript has type ‘char’
      borg6.c:11843: warning: array subscript has type ‘char’
      borg6.c:11843: warning: array subscript has type ‘char’
      borg6.c:11880: warning: array subscript has type ‘char’
      borg6.c:11884: warning: array subscript has type ‘char’
      borg6.c:11884: warning: array subscript has type ‘char’
      borg6.c: In function ‘borg_defend_aux_destruction’:
      borg6.c:12169: warning: suggest parentheses around && within ||
      borg6.c: In function ‘borg_flow_recover’:
      borg6.c:16754: warning: unused variable ‘b_x’
      borg6.c:16754: warning: unused variable ‘b_y’
      borg6.c: In function ‘borg_flow_kill_direct’:
      borg6.c:17907: warning: unused variable ‘perma_grids’
      borg6.c:17906: warning: unused variable ‘b_x’
      borg6.c:17906: warning: unused variable ‘b_y’
      borg6.c: At top level:
      borg6.c:13898: warning: ‘borg_perma_aux_glyph’ defined but not used
      borg6.c: In function ‘borg_caution’:
      borg6.c:3895: warning: ‘b_p’ may be used uninitialized in this function
              CC borg7.c             
      borg7.c: In function ‘borg_test_stuff’:
      borg7.c:2692: warning: unused variable ‘OK_toID’
      borg7.c: In function ‘borg_test_stuff’:
      borg7.c:2692: warning: unused variable ‘OK_toID’
              CC borg8.c             
      borg8.c: In function ‘borg_object_similar’:
      borg8.c:260: warning: comparison between signed and unsigned
      borg8.c: In function ‘borg_think_home_sell_aux3’:
      borg8.c:681: warning: suggest parentheses around assignment used as truth value
      borg8.c: In function ‘borg_think_home_sell_aux’:
      borg8.c:767: warning: suggest parentheses around assignment used as truth value
      borg8.c: In function ‘borg_think_shop_buy_aux’:
      borg8.c:1447: warning: suggest parentheses around && within ||
      borg8.c: In function ‘borg_think_stair_scum’:
      borg8.c:2997: warning: suggest parentheses around && within ||
      borg8.c:3051: warning: implicit declaration of function ‘distance’
      borg8.c: In function ‘borg_think_dungeon_lunal’:
      borg8.c:3287: warning: suggest parentheses around && within ||
      borg8.c: In function ‘borg_think_dungeon_munchkin’:
      borg8.c:3670: warning: suggest parentheses around && within ||
      borg8.c: In function ‘borg_think_dungeon’:
      borg8.c:4169: warning: unused variable ‘feat’
      borg8.c: In function ‘borg_object_similar’:
      borg8.c:260: warning: comparison between signed and unsigned
      borg8.c: In function ‘borg_think_home_sell_aux3’:
      borg8.c:681: warning: suggest parentheses around assignment used as truth value
      borg8.c: In function ‘borg_think_home_sell_aux’:
      borg8.c:767: warning: suggest parentheses around assignment used as truth value
      borg8.c: In function ‘borg_think_shop_buy_aux’:
      borg8.c:1447: warning: suggest parentheses around && within ||
      borg8.c: In function ‘borg_think_stair_scum’:
      borg8.c:2997: warning: suggest parentheses around && within ||
      borg8.c:3051: warning: implicit declaration of function ‘distance’
      borg8.c: In function ‘borg_think_dungeon_lunal’:
      borg8.c:3287: warning: suggest parentheses around && within ||
      borg8.c: In function ‘borg_think_dungeon_munchkin’:
      borg8.c:3670: warning: suggest parentheses around && within ||
      borg8.c: In function ‘borg_think_dungeon’:
      borg8.c:4169: warning: unused variable ‘feat’
              CC borg9.c             
      borg9.c: In function ‘player_outfit_borg’:
      borg9.c:2989: warning: implicit declaration of function ‘inven_carry’
      borg9.c: In function ‘init_translate_visuals’:
      borg9.c:3857: warning: implicit declaration of function ‘feat_supports_lighting’
      borg9.c:3831: warning: unused variable ‘graf_david’
      borg9.c: In function ‘do_cmd_borg’:
      borg9.c:6494: warning: implicit declaration of function ‘print_rel’
      borg9.c:6503: warning: implicit declaration of function ‘prt_map’
      borg9.c:6518: warning: implicit declaration of function ‘target_get’
      borg9.c:6793: warning: implicit declaration of function ‘project’
      borg9.c:7430: warning: unused variable ‘i’
      borg9.c: In function ‘borg_write_map’:
      borg9.c:5025: warning: ‘borg_map_file’ may be used uninitialized in this function
      borg9.c: In function ‘player_outfit_borg’:
      borg9.c:2989: warning: implicit declaration of function ‘inven_carry’
      borg9.c: In function ‘init_translate_visuals’:
      borg9.c:3857: warning: implicit declaration of function ‘feat_supports_lighting’
      borg9.c:3831: warning: unused variable ‘graf_david’
      borg9.c: In function ‘do_cmd_borg’:
      borg9.c:6494: warning: implicit declaration of function ‘print_rel’
      borg9.c:6503: warning: implicit declaration of function ‘prt_map’
      borg9.c:6518: warning: implicit declaration of function ‘target_get’
      borg9.c:6793: warning: implicit declaration of function ‘project’
      borg9.c:7430: warning: unused variable ‘i’
      borg9.c: In function ‘borg_write_map’:
      borg9.c:5025: warning: ‘borg_map_file’ may be used uninitialized in this function
              CC z-bitflag.c         
              CC z-file.c            
              CC z-form.c            
              CC z-msg.c             
              CC z-quark.c           
              CC z-rand.c            
              CC z-term.c            
              CC z-type.c            
              CC z-util.c            
              CC z-virt.c            
              CC z-textblock.c       
      ld -r -arch ppc -o angband.o.ppc attack.o birth.o button.o cave.o cmd0.o cmd1.o cmd2.o cmd3.o cmd4.o cmd-misc.o cmd-obj.o death.o debug.o dungeon.o effects.o files.o game-cmd.o game-event.o generate.o history.o init2.o load.o load-old.o macro.o monster/melee1.o monster/melee2.o monster/monster1.o monster/monster2.o object/identify.o object/obj-desc.o object/obj-info.o object/obj-make.o object/obj-power.o object/obj-ui.o object/obj-util.o object/randart.o option.o parser.o randname.o pathfind.o prefs.o player/calcs.o player/player.o player/spell.o player/timed.o player/util.o score.o signals.o save.o savefile.o spells1.o spells2.o squelch.o store.o tables.o target.o trap.o ui.o ui-birth.o ui-knowledge.o ui-menu.o ui-options.o ui-spell.o util.o variable.o wiz-spoil.o wiz-stats.o wizard.o x-char.o x-spell.o xtra2.o xtra3.o borg1.o borg2.o borg3.o borg4.o borg5.o borg6.o borg7.o borg8.o borg9.o  z-bitflag.o z-file.o z-form.o z-msg.o z-quark.o z-rand.o z-term.o z-type.o z-util.o z-virt.o z-textblock.o
      ld -r -arch i386 -o angband.o.i386 attack.o birth.o button.o cave.o cmd0.o cmd1.o cmd2.o cmd3.o cmd4.o cmd-misc.o cmd-obj.o death.o debug.o dungeon.o effects.o files.o game-cmd.o game-event.o generate.o history.o init2.o load.o load-old.o macro.o monster/melee1.o monster/melee2.o monster/monster1.o monster/monster2.o object/identify.o object/obj-desc.o object/obj-info.o object/obj-make.o object/obj-power.o object/obj-ui.o object/obj-util.o object/randart.o option.o parser.o randname.o pathfind.o prefs.o player/calcs.o player/player.o player/spell.o player/timed.o player/util.o score.o signals.o save.o savefile.o spells1.o spells2.o squelch.o store.o tables.o target.o trap.o ui.o ui-birth.o ui-knowledge.o ui-menu.o ui-options.o ui-spell.o util.o variable.o wiz-spoil.o wiz-stats.o wizard.o x-char.o x-spell.o xtra2.o xtra3.o borg1.o borg2.o borg3.o borg4.o borg5.o borg6.o borg7.o borg8.o borg9.o  z-bitflag.o z-file.o z-form.o z-msg.o z-quark.o z-rand.o z-term.o z-type.o z-util.o z-virt.o z-textblock.o
      lipo -arch ppc angband.o.ppc -arch i386 angband.o.i386 -create -output angband.o
              CC main-crb.c           (objective-c)
      In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:41,
                       from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38,
                       from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
                       from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                       from main-crb.c:130:
      /usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
      main-crb.c: In function ‘install_handlers’:
      main-crb.c:2564: warning: comparison between signed and unsigned
      main-crb.c:2571: warning: comparison between signed and unsigned
      main-crb.c: In function ‘validate_menus’:
      main-crb.c:2626: warning: comparison between signed and unsigned
      main-crb.c: In function ‘OpenRecentCommand’:
      main-crb.c:2768: warning: comparison between signed and unsigned
      main-crb.c:2773: warning: comparison of unsigned expression < 0 is always false
      main-crb.c:2773: warning: comparison between signed and unsigned
      main-crb.c: In function ‘AngbandGame’:
      main-crb.c:2813: warning: comparison between signed and unsigned
      main-crb.c: In function ‘TileSizeCommand’:
      main-crb.c:3113: warning: comparison between signed and unsigned
      main-crb.c:3113: warning: comparison between signed and unsigned
      main-crb.c:3118: warning: comparison between signed and unsigned
      main-crb.c:3118: warning: comparison between signed and unsigned
      main-crb.c: In function ‘set_graphics_mode’:
      main-crb.c:3270: warning: comparison between signed and unsigned
      main-crb.c: In function ‘ToggleCommand’:
      main-crb.c:3338: warning: comparison between signed and unsigned
      main-crb.c: In function ‘quit_calmly’:
      main-crb.c:3699: warning: implicit declaration of function ‘save_game’
      main-crb.c: In function ‘init_paths’:
      main-crb.c:3887: warning: implicit declaration of function ‘init_file_paths’
      main-crb.c:3890: warning: implicit declaration of function ‘create_needed_dirs’
      main-crb.c: At top level:
      main-crb.c:1759: warning: ‘Term_xchar_mac’ defined but not used
      main-crb.c: In function ‘install_handlers’:
      main-crb.c:2564: warning: comparison between signed and unsigned
      main-crb.c:2571: warning: comparison between signed and unsigned
      main-crb.c: In function ‘validate_menus’:
      main-crb.c:2626: warning: comparison between signed and unsigned
      main-crb.c: In function ‘OpenRecentCommand’:
      main-crb.c:2768: warning: comparison between signed and unsigned
      main-crb.c:2773: warning: comparison of unsigned expression < 0 is always false
      main-crb.c:2773: warning: comparison between signed and unsigned
      main-crb.c: In function ‘AngbandGame’:
      main-crb.c:2813: warning: comparison between signed and unsigned
      main-crb.c: In function ‘TileSizeCommand’:
      main-crb.c:3113: warning: comparison between signed and unsigned
      main-crb.c:3113: warning: comparison between signed and unsigned
      main-crb.c:3118: warning: comparison between signed and unsigned
      main-crb.c:3118: warning: comparison between signed and unsigned
      main-crb.c: In function ‘set_graphics_mode’:
      main-crb.c:3270: warning: comparison between signed and unsigned
      main-crb.c: In function ‘ToggleCommand’:
      main-crb.c:3338: warning: comparison between signed and unsigned
      main-crb.c: In function ‘quit_calmly’:
      main-crb.c:3699: warning: implicit declaration of function ‘save_game’
      main-crb.c: In function ‘init_paths’:
      main-crb.c:3887: warning: implicit declaration of function ‘init_file_paths’
      main-crb.c:3890: warning: implicit declaration of function ‘create_needed_dirs’
      main-crb.c: At top level:
      main-crb.c:1759: warning: ‘Term_xchar_mac’ defined but not used
      gcc -I. -W -Wall -Wno-unused-parameter -Wno-missing-field-initializers -O2 -DMACH_O_CARBON -DHAVE_MKSTEMP -DPRIVATE_USER_PATH=\"~/Library/Preferences\" -DUSE_PRIVATE_PATHS -arch i386 -arch ppc -L/local/lib -L/opt/local/lib -o angband angband.o main-crb.o -framework CoreFoundation -framework QuickTime -framework Carbon -framework Cocoa 
      ld: warning: directory '/local/lib' following -L not found
      ld: warning: directory '/local/lib' following -L not found
      making directories...
      copying files...
      # 'optionally' install sound and graphics tiles, if present
      cp ../lib/xtra/graf/8x8.png ../lib/xtra/graf/8x16.png ../lib/xtra/graf/16x16.png ../lib/xtra/graf/32x32.png ../Angband.app/Contents/Resources/lib/xtra/graf
      cp ../lib/xtra/sound/*.wav ../Angband.app/Contents/Resources/lib/xtra/sound
      cp ../lib/xtra/sound/sound.cfg ../Angband.app/Contents/Resources/lib/xtra/sound
      install -m 755 angband ../Angband.app/Contents/MacOS
      install -m 644 osx/Angband.icns osx/Save.icns osx/Edit.icns osx/Data.icns ../Angband.app/Contents/Resources
      cp osx/English.lproj/main.nib/*ib ../Angband.app/Contents/Resources/English.lproj/main.nib
      sed -e 's/\$VERSION\$/3.2.0/' -e 's/\$COPYRIGHT\$/(c) 1995-2010 Angband contributors/' \
      		-e 's/\$NAME\$/Angband/' -e 's/\$EXECUTABLE\$/angband/' \
      		osx/Angband.xml > ../Angband.app/Contents/Info.plist
      SetFile -a B ../Angband.app
      JTWiMac:src jtw$
      All is now running, and it's compatibile with my prior 3.2.0 savefiles! Now where should the Borg.txt file go? I get a warning from the game that it should be in /Users/ but there is not that directory in the Angband.app package.

      Secondly, I have kept all the src files from this compile. Do you have a preference on where I should keep it for other Mac users to access?

      jtw

      jtw
      Last edited by jtwadsworth; April 17, 2011, 15:49.

      Comment

      • APWhite
        Adept
        • Jul 2007
        • 244

        #18
        The borg.txt file is placed in your angband's 'user' directory. Mine is in c:\games\ang320\lib\user

        As far as changes to the code, let me know what changes needed to be made to the code and I will include the list in the readme files.

        Remember that the borg does support extra term windows. So as the borg runs, you can have extra windows on screen and watch the inventory or other borg stat stuff.
        St George Chiropractor
        Angband Borg Homepage

        Comment

        • jtwadsworth
          Rookie
          • Apr 2011
          • 18

          #19
          Originally posted by APWhite
          The borg.txt file is placed in your angband's 'user' directory. Mine is in c:\games\ang320\lib\user

          As far as changes to the code, let me know what changes needed to be made to the code and I will include the list in the readme files.

          Remember that the borg does support extra term windows. So as the borg runs, you can have extra windows on screen and watch the inventory or other borg stat stuff.
          Well, the changes I made are all in this thread per your instructions.

          There is no /user/ directory in the app package contents. There is one under ./library/application support/angband I'll try there...well that didn't work; I even created a /user/ directory under the /lib directory from within the package, no luck. Looks like we need to tell the borg on the Mac .app compile a different place to find borg.txt.

          Also, Borg seems to get stuck when trying to brand arrows/missiles, and when trying to destroy an item; it just keeps sending the same instructions ad infinitum until interrupted and restarted. Seems that must be a global issue, not just a Mac compile.

          jtw
          Last edited by jtwadsworth; April 18, 2011, 01:17.

          Comment

          • APWhite
            Adept
            • Jul 2007
            • 244

            #20
            Originally posted by jtwadsworth
            Well, the changes I made are all in this thread per your instructions.

            There is no /user/ directory in the app package contents. There is one under ./library/application support/angband I'll try there...well that didn't work; I even created a /user/ directory under the /lib directory from within the package, no luck. Looks like we need to tell the borg on the Mac .app compile a different place to find borg.txt.

            Also, Borg seems to get stuck when trying to brand arrows/missiles, and when trying to destroy an item; it just keeps sending the same instructions ad infinitum until interrupted and restarted. Seems that must be a global issue, not just a Mac compile.

            jtw
            Where are your *.prf files stored? The .prf files manage all your changes for the keymaps or visual displays for Angband. The borg.txt would go in that directory.

            Look for where your ANGBAND_DIR_USER is defined. That is the right directory.
            St George Chiropractor
            Angband Borg Homepage

            Comment

            • jtwadsworth
              Rookie
              • Apr 2011
              • 18

              #21
              Originally posted by APWhite
              Where are your *.prf files stored? The .prf files manage all your changes for the keymaps or visual displays for Angband. The borg.txt would go in that directory.

              Look for where your ANGBAND_DIR_USER is defined. That is the right directory.
              Angband.app/Contents/Resources/lib/pref/ is where the .prf files are and placing borg.txt there does not work.

              jtw

              Comment

              • myshkin
                Angband Devteam member
                • Apr 2007
                • 334

                #22
                I haven't tried it yet, but you may want $HOME/Library/Preferences/Angband. (I wonder whether it is more idiomatic to use $HOME/Library/Application Support/Angband instead...)

                Comment

                • APWhite
                  Adept
                  • Jul 2007
                  • 244

                  #23
                  Originally posted by jtwadsworth
                  Angband.app/Contents/Resources/lib/pref/ is where the .prf files are and placing borg.txt there does not work.

                  jtw

                  After compiling the game with the borg enabled and you use ^zu what does the borg say in the log? Does it say something like 'no valid borg.txt file found'?
                  St George Chiropractor
                  Angband Borg Homepage

                  Comment

                  • Gorbad
                    Apprentice
                    • Sep 2008
                    • 74

                    #24
                    I now have the 3.20 version running in XScreensaver (on fedora core 13, I see no reason why other distros would differ in this case), with some judicious comparing from this thread: http://angband.oook.cz/forum/showthread.php?t=1598 and the suggestions from APWhite from this thread.

                    Minor pains:
                    - I seem to have broken the ^z key combo, but starting with -x does autostart the borg.
                    - I have not yet looked into getting multiple 'windows' on the root window.

                    Comment

                    • jtwadsworth
                      Rookie
                      • Apr 2011
                      • 18

                      #25
                      Originally posted by myshkin
                      I haven't tried it yet, but you may want $HOME/Library/Preferences/Angband. (I wonder whether it is more idiomatic to use $HOME/Library/Application Support/Angband instead...)
                      That's it! Placed it in $HOME/Library/Preferences/Angband and no more borg.txt warning. Great work

                      Now, why would i be getting an "Out of memory" window that pops up after about 6 hours causing the game to abort while borg is running (and not saving before it does). And is there a way (besides the screensaver) to get borg to respawn upon death?

                      jtw
                      Last edited by jtwadsworth; April 19, 2011, 03:35.

                      Comment

                      • Nick
                        Vanilla maintainer
                        • Apr 2007
                        • 9637

                        #26
                        Originally posted by Gorbad
                        I now have the 3.20 version running in XScreensaver (on fedora core 13, I see no reason why other distros would differ in this case), with some judicious comparing from this thread: http://angband.oook.cz/forum/showthread.php?t=1598 and the suggestions from APWhite from this thread.

                        Minor pains:
                        - I seem to have broken the ^z key combo, but starting with -x does autostart the borg.
                        - I have not yet looked into getting multiple 'windows' on the root window.
                        That is awesome - I have an old (3.0.5) version like this, but would *love* this. Could you post it (or a patch) somewhere?
                        One for the Dark Lord on his dark throne
                        In the Land of Mordor where the Shadows lie.

                        Comment

                        • Gorbad
                          Apprentice
                          • Sep 2008
                          • 74

                          #27
                          Steps:

                          # Get the borg src (320borg.zip)
                          mkdir ./borg-src
                          cd ./borg-src
                          # Lower case extract files
                          unzip -L -a path/to/320borg.zip
                          # change all '#include "tvalsval.h"' in .h and .c files to '#include "object/tvalsval.h"'
                          # copy all files that do not exist in angband source tree to it
                          # get vroot.h from somewhere (I took it from Nick's files in http://angband.oook.cz/forum/showthread.php?t=1598)

                          # personally, I just did a make install eventually, and put
                          # '/usr/local/games/angband -x \n\' in my XScreensaver files
                          # (see the above mentioned thread for details.)

                          Most thanks actually go to 'JoeB' and Nick for doing the work in 2009!


                          diffs (Large!):

                          One change in the borg files:

                          Code:
                          diff --exclude *.o ../angband-3.2.0-borg/src/borg9.c ./original-borg-src/borg9.c
                          5c5
                          < #include "object/tvalsval.h"
                          ---
                          > #include "tvalsval.h"
                          6035d6034
                          < 	if (auto_start_borg) cmd = 'z';
                          6052,6057c6051
                          < 
                          < 	/* Hack -- don't run this if auto_start_borg is TRUE */
                          < 		if (auto_start_borg == FALSE)
                          < 		{	
                          < 		    if (!get_com("Borg command: ", &cmd)) return;
                          < 		}
                          ---
                          >     if (!get_com("Borg command: ", &cmd)) return;

                          Changes to original Angband 3.2.0 sources:

                          Code:
                          diff --exclude *.o ../angband-3.2.0-borg/src/birth.c ../angband-3.2.0/src/birth.c
                          496d495
                          <  * apw -- screensaver needs extern
                          498c497
                          < extern void wield_all(struct player *p)
                          ---
                          > static void wield_all(struct player *p)
                          1065,1146d1063
                          < #ifdef ALLOW_BORG
                          <       /* Generate our first borg */
                          <       if (screensaver)
                          <       {
                          <               player_init(p_ptr);
                          <               do_birth_reset(quickstart_allowed, &quickstart_prev);
                          <               rolled_stats = FALSE;
                          <               
                          <               /* Male */
                          <               p_ptr->psex = 1; 
                          <               player_generate(p_ptr, NULL, NULL, NULL);
                          <               /* Human */
                          <               p_ptr->prace = 0;
                          <               player_generate(p_ptr, NULL, NULL, NULL);
                          <               reset_stats(stats, points_spent, &points_left);
                          <               generate_stats(stats, points_spent, &points_left);
                          <               rolled_stats = FALSE;
                          <               /* Warrior */
                          <               p_ptr->pclass = 0;
                          <               player_generate(p_ptr, NULL, NULL, NULL);
                          <               reset_stats(stats, points_spent, &points_left);
                          <               generate_stats(stats, points_spent, &points_left);
                          <               rolled_stats = FALSE;
                          < 
                          <               /* Set adult options from birth options */
                          <               for (i = OPT_BIRTH; i < OPT_CHEAT; i++)
                          <               {
                          <                       op_ptr->opt[OPT_ADULT + (i - OPT_BIRTH)] =
                          <                               op_ptr->opt[i];
                          <               }
                          < 
                          <               /* Reset score options from cheat options */
                          <               for (i = OPT_CHEAT; i < OPT_ADULT; i++)
                          <               {
                          <                       op_ptr->opt[OPT_SCORE + (i - OPT_CHEAT)] =
                          <                               op_ptr->opt[i];
                          <               }
                          < 
                          <               /* Get a new character */
                          <               get_stats(stats);
                          < 
                          <               /* Update stats with bonuses, etc. */
                          <               get_bonuses();
                          < 
                          <               /* There's no real need to do this here, but it's tradition. */
                          <               get_ahw();
                          <               get_history();
                          < 
                          <               roll_hp();
                          < 
                          <               squelch_birth_init();
                          < 
                          <               /* Clear old messages, add new starting message */
                          <               history_clear();
                          <               history_add("Began the quest to destroy Morgoth.", HISTORY_PLAYER_BIRTH, 0);
                          < 
                          <               /* Reset message prompt (i.e. no extraneous -more-s) */
                          <               msg_flag = TRUE;
                          < 
                          <               /* Note player birth in the message recall */
                          <               message_add(" ", MSG_GENERIC);
                          <               message_add("  ", MSG_GENERIC);
                          <               message_add("====================", MSG_GENERIC);
                          <               message_add("  ", MSG_GENERIC);
                          <               message_add(" ", MSG_GENERIC);
                          < 
                          <               /* Give the player some money */
                          <               get_money();
                          < 
                          <               /* Outfit the player, if they can sell the stuff */
                          <               if (!OPT(adult_no_selling)) player_outfit(p_ptr);
                          < 
                          <               /* Initialise the stores */
                          <               store_reset();
                          < 
                          <               /* Now we're really done.. */
                          <               event_signal(EVENT_LEAVE_BIRTH);
                          < 
                          <               return;
                          <       }
                          < 
                          < #endif /* ALLOW_BORG */
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/cmd-misc.c ../angband-3.2.0/src/cmd-misc.c
                          90c90,91
                          <       if (!screensaver)
                          ---
                          >       /* Ask first time */
                          >       if (!(p_ptr->noscore & NOSCORE_BORG))
                          92,106c93,103
                          <               /* Ask first time */
                          <               if (!(p_ptr->noscore & NOSCORE_BORG))
                          <               {
                          <                       /* Mention effects */
                          <                       msg_print("You are about to use the dangerous, unsupported, borg commands!");
                          <                       msg_print("Your machine may crash, and your savefile may become corrupted!");
                          <                       message_flush();
                          < 
                          <                       /* Verify request */
                          <                       if (!get_check("Are you sure you want to use the borg commands? "))
                          <                               return;
                          < 
                          <                       /* Mark savefile */
                          <                       p_ptr->noscore |= NOSCORE_BORG;
                          <               }
                          ---
                          >               /* Mention effects */
                          >               msg_print("You are about to use the dangerous, unsupported, borg commands!");
                          >               msg_print("Your machine may crash, and your savefile may become corrupted!");
                          >               message_flush();
                          > 
                          >               /* Verify request */
                          >               if (!get_check("Are you sure you want to use the borg commands? "))
                          >                       return;
                          > 
                          >               /* Mark savefile */
                          >               p_ptr->noscore |= NOSCORE_BORG;
                          189d185
                          < #ifndef ALLOW_BORG  /* apw --borg uses ESC and Space which trigger this. */
                          191d186
                          < #endif
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/config.h ../angband-3.2.0/src/config.h
                          100c100
                          < #define ALLOW_BORG
                          ---
                          > /* #define ALLOW_BORG */
                          103c103
                          < #define SCORE_BORGS
                          ---
                          > /* #define SCORE_BORGS */
                          105,106d104
                          < /* Allow the borg to runs as XScreenSaver */
                          < #define XSCREENSAVER
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/dungeon.c ../angband-3.2.0/src/dungeon.c
                          1390d1389
                          < #ifndef ALLOW_BORG /* APW, not a good idea with the borg.  He jumps levels too quickly.  Burn up your drive. */
                          1392d1390
                          < #endif
                          1484,1485d1481
                          <       /* Hack -- Start the Borg is auto_start_borg is TRUE */
                          <       if (auto_start_borg) do_cmd_borg();
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/externs.h ../angband-3.2.0/src/externs.h
                          8,27d7
                          < #ifdef ALLOW_BORG
                          < /* Screensaver variables for the borg.  apw */
                          < extern bool screensaver;
                          < extern char screensaver_inkey_hack_buffer[1024]; /* apw */
                          < extern int screensaver_inkey_hack_size;
                          < 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[];
                          < extern void wield_all(struct player *p);
                          < #endif /* ALLOW_BORG */
                          < 
                          190d169
                          < extern bool auto_start_borg;
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/init2.c ../angband-3.2.0/src/init2.c
                          3646,3664d3645
                          < #ifdef ALLOW_BORG /* apw */
                          <       /* Allow the screensaver to do its work  */
                          <       if (screensaver)
                          <       {
                          <               /* Start new character */
                          <               if (!file_exists(savefile))
                          <               {
                          <                       event_signal(EVENT_LEAVE_INIT);
                          <                       return TRUE;
                          <               }
                          <               else
                          <               /* Load existing character */
                          <               {
                          <                       event_signal(EVENT_LEAVE_INIT);
                          <                       return FALSE;
                          <               }
                          <       }
                          < #endif /* ALLOW_BORG */
                          <
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/main.c ../angband-3.2.0/src/main.c
                          209c209
                          <       if (auto_start_borg == FALSE) pause_line(Term->hgt - 1);
                          ---
                          >       pause_line(Term->hgt - 1);
                          352,359d351
                          <             case 'X':
                          <                       case 'x':
                          <                               /* debug_opt(arg);
                          <                               continue; */
                          <                       {
                          <                               auto_start_borg = TRUE;
                          <                               break;
                          <                       }
                          360a353,355
                          >                       case 'x':
                          >                               debug_opt(arg);
                          >                               continue;
                          380,381c375
                          <       /*                      puts("  -x<opt>        Debug options; see -xhelp"); */
                          <                               puts("  -x             Auto-start Borg");
                          ---
                          >                               puts("  -x<opt>        Debug options; see -xhelp");
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/main-win.c ../angband-3.2.0/src/main-win.c
                          467c467
                          < /* static bool screensaver = FALSE; /* /* apw moved to externs */
                          ---
                          > static bool screensaver = FALSE;
                          3224c3224,3231
                          <        * Either start a new character or load up the old one
                          ---
                          >        * If no savefile is present or then go through the steps necessary
                          >        * to create a random character.  If a savefile already is present
                          >        * then the simulated keypresses will either clean away any [-more-]
                          >        * prompts (if the character is alive), or create a new random
                          >        * character.
                          >        *
                          >        * Luckily it's possible to send the same keypresses no matter if
                          >        * the character is alive, dead, or not even yet created.
                          3226c3233,3239
                          <       if (!file_exist)
                          ---
                          >       screensaver_inkey_hack_buffer[j++] = ESCAPE; /* Gender */
                          >       screensaver_inkey_hack_buffer[j++] = ESCAPE; /* Race */
                          >       screensaver_inkey_hack_buffer[j++] = ESCAPE; /* Class */
                          >       screensaver_inkey_hack_buffer[j++] = 'n'; /* Modify options */
                          >       screensaver_inkey_hack_buffer[j++] = '\r'; /* Reroll */
                          > 
                          >       if (!file_exists)
                          3227a3241
                          >               /* Savefile name */
                          3229,3238c3243,3244
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Return */
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Character info */
                          <       }
                          <       else /* Savefile present, get past the start up screens */
                          <       {
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Character info */
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Character info */
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Character info */
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Character info */
                          <               screensaver_inkey_hack_buffer[j++] = ' '; /* Character info */
                          ---
                          >               for (i = 0; i < n; i++)
                          >                       screensaver_inkey_hack_buffer[j++] = saverfilename[i];
                          3240a3247,3249
                          >       screensaver_inkey_hack_buffer[j++] = '\r'; /* Return */
                          >       screensaver_inkey_hack_buffer[j++] = ESCAPE; /* Character info */
                          > 
                          3249a3259,3272
                          >        * Make sure the "OPT(cheat_live)" option is set, so that the Borg can
                          >        * automatically restart.
                          >        */
                          >       screensaver_inkey_hack_buffer[j++] = '5'; /* Cheat options */
                          > 
                          >       /* Cursor down to "cheat live" */
                          >       for (i = 0; i < OPT_OPT(cheat_live) - OPT_CHEAT; i++)
                          >               screensaver_inkey_hack_buffer[j++] = '2';
                          > 
                          >       screensaver_inkey_hack_buffer[j++] = 'y'; /* Switch on "OPT(cheat_live)" */
                          >       screensaver_inkey_hack_buffer[j++] = ESCAPE; /* Leave cheat options */
                          >       screensaver_inkey_hack_buffer[j++] = ESCAPE; /* Leave options */
                          > 
                          >       /*
                          3963,3964c3986
                          <       /* td = (term_data *)GetWindowLong(hWnd, 0); */
                          <       td = (term_data *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
                          ---
                          >       td = (term_data *)GetWindowLong(hWnd, 0);
                          4009,4010c4031,4032
                          <       /* td = (term_data *)GetWindowLong(hWnd, 0); */
                          <       td = (term_data *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
                          ---
                          >       td = (term_data *)GetWindowLong(hWnd, 0);
                          > 
                          4017,4022c4039
                          <                       /* SetWindowLong(hWnd, 0, (LONG)(my_td)); */
                          < #ifdef _WIN64
                          <                        SetWindowLongPtr(hWnd, GWLP_USERDATA, my_td);
                          < #else
                          <                        SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)(my_td));
                          < #endif
                          ---
                          >                       SetWindowLong(hWnd, 0, (LONG)(my_td));
                          4352,4353c4369
                          <       /* td = (term_data *)GetWindowLong(hWnd, 0); */
                          <       td = (term_data *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
                          ---
                          >       td = (term_data *)GetWindowLong(hWnd, 0);
                          4361,4366c4377
                          <                       /* SetWindowLong(hWnd, 0, (LONG)(my_td)); */
                          < #ifdef _WIN64
                          <                       SetWindowLongPtr(hWnd, GWLP_USERDATA, my_td);
                          < #else
                          <                       SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)(my_td));
                          < #endif
                          ---
                          >                       SetWindowLong(hWnd, 0, (LONG)(my_td));
                          5183,5189d5193
                          <               /* Set command hook (apw)*/
                          <               cmd_get_hook = win_get_cmd;
                          < 
                          <               /* Set up the display handlers and things. (apw)*/
                          <               init_display();
                          <               initialized = TRUE;
                          <
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/main-x11.c ../angband-3.2.0/src/main-x11.c
                          110,111d109
                          < #include "vroot.h"
                          < #include "main.h"
                          113,115c111
                          < #ifdef XSCREENSAVER
                          < #include <signal.h>
                          < #endif /* XCREENSAVER */
                          ---
                          > #include "main.h"
                          2026,2041d2021
                          < /*static int verify_special = 0;
                          < 
                          < extern char (*inkey_hack)(int flush_first);
                          < static char screensaver_inkey_hack_buffer[1024];
                          < static int screensaver_inkey_hack_index = 0;
                          < static char screensaver_inkey_hack(int flush_first)
                          < {
                          <       verify_special = 0;
                          <       return screensaver_inkey_hack_buffer[screensaver_inkey_hack_index++];
                          < }*/
                          < 
                          < static int exit_now = 0;
                          < void shutdown_xscreensaver(int x)
                          < {
                          <       exit_now = 1;
                          < }
                          2048,2058d2027
                          < #ifdef XSCREENSAVER
                          <       static int first_time = 1;
                          < 
                          <       if (exit_now)
                          <       {
                          <               exit_now = 0;
                          <               do_cmd_save_game();
                          <               exit(0);
                          <       }
                          < #endif
                          < 
                          2072,2123c2041
                          <               case TERM_XTRA_EVENT: 
                          < 
                          < #ifdef XSCREENSAVER
                          < 
                          <                 if (first_time)
                          <                 {
                          < 
                          < #if 0
                          <                   int i, j;
                          < 
                          <                   /* Mega hack - try to start the borg
                          <                    *
                          <                    * The simulated keypresses will be processed when
                          <                    * play_game() is called. */
                          < 
                          <                   inkey_hack = screensaver_inkey_hack;
                          < 
                          <                   j = 0;
                          < 
                          <                   screensaver_inkey_hack_buffer[j++] = '*'; /* Gender */
                          <                   screensaver_inkey_hack_buffer[j++] = '*'; /* Race */
                          <                   screensaver_inkey_hack_buffer[j++] = '*'; /* Class */
                          <                   screensaver_inkey_hack_buffer[j++] = '*'; /* Class */
                          <                   screensaver_inkey_hack_buffer[j++] = '*'; /* Class */
                          <                   screensaver_inkey_hack_buffer[j++] = '\r'; /* Reroll */
                          <                   screensaver_inkey_hack_buffer[j++] = '\r'; /* Name */
                          <                   screensaver_inkey_hack_buffer[j++] = '\r'; /* Start */
                          < 
                          <                   /* 
                          <                    * Now start the borg */
                          < 
                          <                   screensaver_inkey_hack_buffer[j++] = KTRL('Z');
                          <                   for (i = 0; i < 10; i++)
                          <                     screensaver_inkey_hack_buffer[j++] = ESCAPE;
                          <                   screensaver_inkey_hack_buffer[j++] = KTRL('Z'); 
                          <                   screensaver_inkey_hack_buffer[j++] = 'z'; 
                          < 
                          <                   Term_keypress('\n');
                          <                   Term_keypress(27);
                          <                   Term_keypress(27);
                          <                   Term_keypress(27);
                          <                   Term_keypress(27);
                          <                   Term_keypress(26);
                          <                   Term_keypress('z');
                          < #endif
                          < 
                          <                   first_time = 0;
                          <                   signal(SIGTERM, shutdown_xscreensaver);
                          <                   return 0;
                          <                 }
                          < #endif
                          <                 return (CheckEvent(v));
                          ---
                          >               case TERM_XTRA_EVENT: return (CheckEvent(v));
                          2132,2136c2050
                          <               case TERM_XTRA_CLEAR: Infowin_wipe(); 
                          < #ifdef XSCREENSAVER
                          <                 //x11_selection->drawn = FALSE; 
                          < #endif
                          <                 return (0);
                          ---
                          >               case TERM_XTRA_CLEAR: Infowin_wipe(); return (0);
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/Makefile.src ../angband-3.2.0/src/Makefile.src
                          14,22d13
                          <       borg1.h \
                          <       borg2.h \
                          <       borg3.h \
                          <       borg4.h \
                          <       borg5.h \
                          <       borg6.h \
                          <       borg7.h \
                          <       borg8.h \
                          <       borg9.h \
                          69,77d59
                          <       borg1.o \
                          <       borg2.o \
                          <       borg3.o \
                          <       borg4.o \
                          <       borg5.o \
                          <       borg6.o \
                          <       borg7.o \
                          <       borg8.o \
                          <       borg9.o \
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/variable.c ../angband-3.2.0/src/variable.c
                          46,51d45
                          < #ifdef ALLOW_BORG
                          < /* Screensaver borg things.   apw*/
                          < bool screensaver = FALSE;
                          < bool auto_start_borg = FALSE;
                          < #endif /* ALLOW_BORG */
                          <
                          Code:
                          diff --exclude '*.o' ../angband-3.2.0-borg/src/z-virt.h ../angband-3.2.0/src/z-virt.h
                          51,58d50
                          < /* Allocate a wiped array of type T[N], assign to pointer P */
                          < /* apw --screensaver begin */
                          < #define C_MAKE(P, N, T) \
                          <               ((P) = C_ZNEW(N, T))
                          < /* Allocate a wiped thing of type T, assign to pointer P */
                          < #define MAKE(P, T) \
                          <               ((P) = ZNEW(T))
                          < /* apw -- screensaver end*/

                          Comment

                          • Nick
                            Vanilla maintainer
                            • Apr 2007
                            • 9637

                            #28
                            Cool - me of 2009 was clearly smarter than the current version...
                            One for the Dark Lord on his dark throne
                            In the Land of Mordor where the Shadows lie.

                            Comment

                            • Estie
                              Veteran
                              • Apr 2008
                              • 2347

                              #29
                              I installed the borg again, but seeing him maltreat a priest by running around with shiny newly enchanted heavy metal armour but at -1 speed and with only 2 spell points at level 9 breaks my heart.

                              Setting his evaluation of all AC to zero should instantly boost performance.

                              Comment

                              • Magnate
                                Angband Devteam member
                                • May 2007
                                • 5110

                                #30
                                Originally posted by Estie
                                I installed the borg again, but seeing him maltreat a priest by running around with shiny newly enchanted heavy metal armour but at -1 speed and with only 2 spell points at level 9 breaks my heart.

                                Setting his evaluation of all AC to zero should instantly boost performance.
                                If the Borg's evaluation of AC is hard-coded (i.e. using specific values rather than parsing k_info for the available range of AC on armour), then he will be going berserk over heavy armours since they now offer roughly twice the AC that they did last time he was alive.
                                "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                                Comment

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