Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 15, 2011, 21:06   #1
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
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
APWhite is offline   Reply With Quote
Old January 15, 2011, 22:27   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,110
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by APWhite View Post
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 ...
Magnate is offline   Reply With Quote
Old April 9, 2011, 09:02   #3
jtwadsworth
Rookie
 
Join Date: Apr 2011
Posts: 18
jtwadsworth is on a distinguished road
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
jtwadsworth is offline   Reply With Quote
Old April 11, 2011, 20:30   #4
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by jtwadsworth View Post
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
APWhite is offline   Reply With Quote
Old April 13, 2011, 01:20   #5
jtwadsworth
Rookie
 
Join Date: Apr 2011
Posts: 18
jtwadsworth is on a distinguished road
Quote:
Originally Posted by APWhite View Post
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.
jtwadsworth is offline   Reply With Quote
Old April 13, 2011, 06:37   #6
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 58
Posts: 9,560
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by jtwadsworth View Post
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.
Nick is offline   Reply With Quote
Old April 13, 2011, 06:39   #7
Timo Pietilä
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
Timo Pietilä is on a distinguished road
Quote:
Originally Posted by Nick View Post
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?
Timo Pietilä is offline   Reply With Quote
Old April 13, 2011, 06:45   #8
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 58
Posts: 9,560
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by Timo Pietilä View Post
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.
Nick is offline   Reply With Quote
Old April 13, 2011, 16:05   #9
jtwadsworth
Rookie
 
Join Date: Apr 2011
Posts: 18
jtwadsworth is on a distinguished road
Quote:
Originally Posted by Nick View Post
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$
jtwadsworth is offline   Reply With Quote
Old April 16, 2011, 05:04   #10
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by jtwadsworth View Post
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?
APWhite is offline   Reply With Quote
Reply

Tags
borg screensaver apwhite


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Borg for 320 is running. APWhite Development 200 January 12, 2012 10:46
Screensaver for 320 almost ready! APWhite Development 1 January 14, 2011 15:36
Screensaver needs to rewrite some code APWhite Vanilla 0 October 16, 2007 21:19


All times are GMT +1. The time now is 17:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.