Example #1
0
func init() {
	runtime.LockOSThread()
	sys = system.Make(gos.GetSystemInterface())

	rand.Seed(100)
	// TODO: This should not be OS-specific
	datadir = filepath.Join(os.Args[0], "..", "..")
	base.SetDatadir(datadir)
	base.Log().Printf("Setting datadir: %s", datadir)
	err := house.SetDatadir(datadir)
	if err != nil {
		panic(err.Error())
	}

	var key_binds base.KeyBinds
	base.LoadJson(filepath.Join(datadir, "key_binds.json"), &key_binds)
	key_map = key_binds.MakeKeyMap()
	base.SetDefaultKeyMap(key_map)

	wdx = 1024
	wdy = 750
}
Example #2
0
func loadTags() error {
	return base.LoadJson(filepath.Join(datadir, "tags.json"), &tags)
}