Skip to content

Instantly share code, notes, and snippets.

@stubb
stubb / UH_FIFE033_patch
Created June 26, 2011 22:03
patch for UH to get fife 0.3.3 compatibility
Index: ambientsound.py
===================================================================
--- ambientsound.py (revision 7764)
+++ ambientsound.py (working copy)
@@ -69,7 +69,7 @@
# set to current position
if(hasattr(self, 'position') and self.position != None and self.__positioning):
self.__emitter.setPosition(self.position.center().x, self.position.center().y, 1)
- self.__emitter.setSoundClip(horizons.main.fife.soundclippool.addResourceFromFile(soundfile))
+ self.__emitter.setSoundClip(horizons.main.fife.soundclipmanager.load(soundfile).getHandle())
@stubb
stubb / map_creator.pl
Created July 10, 2011 07:50
Grickit's map creator
#!/usr/bin/perl
# Copyright (C) 2011 by Derek Hoagland <grickit@gmail.com>
#
# UHpng2map is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# UHpng2map is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@stubb
stubb / scons-patch
Created August 24, 2011 20:05
FIFE - boost patch for sconstruct for Fife 0.3.3 branch
Index: SConstruct
===================================================================
--- SConstruct (revision 3733)
+++ SConstruct (working copy)
@@ -289,6 +289,7 @@
usercxxflags = Split(ARGUMENTS.get('CXXFLAGS'))
haveusercxxflags = True
+env.AppendUnique(CXXFLAGS=['-DBOOST_FILESYSTEM_VERSION=2'])
if debug:
Traceback (most recent call last):
File "run_uh.py", line 480, in <module>
main()
File "run_uh.py", line 212, in main
ret = horizons.main.start(options)
File "/home/kili/Repositories/unknown-horizons/horizons/main.py", line 170, in start
fife.run()
File "/home/kili/Repositories/unknown-horizons/horizons/engine.py", line 513, in run
self.loop()
File "/home/kili/Repositories/unknown-horizons/horizons/engine.py", line 527, in loop
Failed to load /home/kili/.unknown-horizons/save/quicksave/quicksave-1314537353.8295.sqlite
Traceback (most recent call last):
File "/home/kili/Repositories/unknown-horizons/horizons/main.py", line 229, in start_singleplayer
_modules.session.load(map_file, players, trader_enabled, pirate_enabled, is_scenario=is_scenario, campaign = campaign)
File "/home/kili/Repositories/unknown-horizons/horizons/spsession.py", line 53, in load
super(SPSession, self).load(*args, **kwargs)
File "/home/kili/Repositories/unknown-horizons/horizons/session.py", line 203, in load
self.world._init(savegame_db)
File "/home/kili/Repositories/unknown-horizons/horizons/world/__init__.py", line 240, in _init
self.trader = Trader.load(self.session, savegame_db, trader_id)[0][0]
git grep TODO
content/gui/xml/mainmenu/settings.xml:<!-- automatic is a shorthand for center:center #TODO get this working at all -->
content/gui/xml/mainmenu/singleplayer/sp_random.xml: <!--<HBox><Label text="TODO: all values below this aren't implemented
editor/plugins/ObjectSelector.py:# TODO:
editor/plugins/ObjectSelector.py: # TODO: Replace with SelectionEvent, once pychan supports it
editor/scripts/gui/layerdialog.py: # TODO: Add access method for adopted grid types?
editor/scripts/gui/layerdialog.py: # TODO: Ditto for pather?
editor/scripts/gui/mapeditor.py: self._debug = False # TODO: We should have a central system for activating debug messa
horizons/ai/aiplayer/building/fakeresourcedeposit.py: # TODO: use a better way of producing fake ProductionLine-s
horizons/ai/aiplayer/building/field.py: # TODO: fix the resource gathering code to request resources in larger chunks so this
Scheduler(t:559) calling Callback(<bound method Unit[1000005]._move_tick of <horizons.world.units.Unit[1000005] object at 0x16fb5e50>> on Pirate Ship(id=1000005;worldid=100003))
Pirate Ship(id=1000005;worldid=100003): movement finished. calling callbacks ['Callback(<bound method Pirate.send_ship of <horizons.ai.pirate.Pirate object at 0x16faef10>>, (<horizons.world.units.Unit[1000005] object at 0x16fb5e50>,), {})']
Pirate 99998: send_ship(Black Hawk) start transition: going_home
Pirate 99998: send_ship(Black Hawk) reached home
Pirate 99998: _chase_closest_ship(Black Hawk) caught Confidence
found path: [(-29, -11)]
Pirate Ship(id=1000005;worldid=100003): move to Circle(center=Point(-30, -11),radius=2); possible: True; is_moving: False
Pirate 99998: send_ship(Black Hawk) going home
Pirate 99998: send_ship(Black Hawk) new state: going_home
@stubb
stubb / gist:1208470
Created September 10, 2011 15:59
lib guichan not found!
file /home/kili/Reposorities/fifengine/trunk/SConstruct,line 179:
Configure(confdir = build/.sconf_temp)
scons: Configure: Checking for vorbisfile (using pkg-config)...
scons: Configure: "build/.sconf_temp/conftest_0" is up to date.
scons: Configure: The original builder output was:
|pkg-config --libs --cflags 'vorbisfile'
|
scons: Configure: (cached) yes
scons: Configure: Checking for openal (using pkg-config)...
@stubb
stubb / utf colelction
Created September 28, 2011 19:14
utf8 pychan
U+23CE⏎e2 8f 8e RETURN SYMBOL
U+21D0⇐e2 87 90 LEFTWARDS DOUBLE ARROW
U+21D1⇑e2 87 91 UPWARDS DOUBLE ARROW
U+21D2⇒e2 87 92 RIGHTWARDS DOUBLE ARROW
U+21D3⇓e2 87 93 DOWNWARDS DOUBLE ARROW
U+21EF⇯e2 87 af UPWARDS WHITE DOUBLE ARROW ON PEDESTAL
http://fife.trac.cvsdude.com/engine/browser/trunk/demos/pychan_demo/pychan_demo.py#L89
@stubb
stubb / license
Created October 11, 2011 20:38
fife
== GUI images ==
=== Crystal ===
Author:
Crystal user community
Download:
http://www.everaldo.com/crystal/crystal_project.tar.gz
License: