--- /dev/null
+(define-module (dungeon-master plugins default)
+ #:use-module ((dungeon-master) #:prefix dm:))
+
+(define (random-bool)
+ (= (random 2) 1))
+
+(define pi 3.141592654)
+
+(define (city-map-generator patches)
+ "City generator from https://github.com/watabou/TownGeneratorOS/blob/master/Source/com/watabou/towngenerator/building/Model.hx"
+ (set! *random-state* (random-state-from-platform))
+ (when (= patches -1) (set! patches 15))
+ (build-patches patches))
+
+(define (build-patches patches)
+ (define* (get-points n seed #:optional (l '()))
+ (cond ((> n 0)
+ (let* ((a (+ seed (* (sqrt n) 5)))
+ (r (if (= n 0)
+ 0
+ (+ 10 (* n (+ 2 (random:exp))))))
+ (point (list
+ (* (cos a) r)
+ (* (sin a) r))))
+ (get-points (- n 1) seed (cons point l))))
+ (else
+ l)))
+
+ (let* ((sa (* (random:exp) 2 pi))
+ (points (get-points (* 8 patches) sa)))
+ (display points)
+ (newline)))
+
+(dm:register-generator "city-map-generator" city-map-generator)
-bin_PROGRAMS = DungeonMaster
-DungeonMaster_SOURCES = main.cpp
-DungeonMaster_CPPFLAGS = @GUILE_CFLAGS@
-DungeonMaster_LDFLAGS = @GUILE_LIBS@
+bin_PROGRAMS = $(top_builddir)/DungeonMaster
+__top_builddir__DungeonMaster_SOURCES = main.cpp
+__top_builddir__DungeonMaster_CPPFLAGS = @GUILE_CFLAGS@
+__top_builddir__DungeonMaster_LDFLAGS = @GUILE_LIBS@
{
scm_init_guile();
scm_init_dungeon_master_module();
- scm_primitive_load(scm_from_locale_string("plugins/default/main.scm"));
+ scm_primitive_load(scm_from_locale_string("mods/default/main.scm"));
IrrlichtDevice* device =
createDevice(EDT_OPENGL,
+++ /dev/null
-(define-module (dungeon-master plugins default)
- #:use-module ((dungeon-master) #:prefix dm:))
-
-(define (random-bool)
- (= (random 2) 1))
-
-(define pi 3.141592654)
-
-(define (city-map-generator patches)
- "City generator from https://github.com/watabou/TownGeneratorOS/blob/master/Source/com/watabou/towngenerator/building/Model.hx"
- (set! *random-state* (random-state-from-platform))
- (when (= patches -1) (set! patches 15))
- (build-patches patches))
-
-(define (build-patches patches)
- (define* (get-points n seed #:optional (l '()))
- (cond ((> n 0)
- (let* ((a (+ seed (* (sqrt n) 5)))
- (r (if (= n 0)
- 0
- (+ 10 (* n (+ 2 (random:exp))))))
- (point (list
- (* (cos a) r)
- (* (sin a) r))))
- (get-points (- n 1) seed (cons point l))))
- (else
- l)))
-
- (let* ((sa (* (random:exp) 2 pi))
- (points (get-points (* 8 patches) sa)))
- (display points)
- (newline)))
-
-(dm:register-generator "city-map-generator" city-map-generator)