Gone back (hopefully temporarily) to using collage load-image function
while I try to sort out the resources issue. This isn't very satisfactory, as the collage distribution is compiled using Java 7, which is going to break for some people, and because I'm bloating my code with two separate image libraries.
This commit is contained in:
parent
8e5b526c14
commit
7c0a64a6a9
4 changed files with 11 additions and 561 deletions
|
|
@ -1,8 +1,8 @@
|
|||
(ns mw-ui.render-world
|
||||
(:require [mw-engine.core :as engine]
|
||||
(:require [clojure.java.io :as jio]
|
||||
[mw-engine.core :as engine]
|
||||
[mw-engine.world :as world]
|
||||
[mw-engine.heightmap :as heightmap]
|
||||
[mw-engine.natural-rules :as rules]
|
||||
[mw-parser.bulk :as compiler]
|
||||
[hiccup.core :refer [html]]
|
||||
[noir.io :as io]
|
||||
|
|
@ -40,12 +40,8 @@
|
|||
"Render the world implied by the current session as a complete HTML table in a DIV."
|
||||
[]
|
||||
(let [world (or (session/get :world)
|
||||
(engine/transform-world
|
||||
(heightmap/apply-heightmap
|
||||
(io/get-resource "/img/heightmaps/small_hill.png")
|
||||
;; "resources/public/img/heightmaps/great_britain_and_ireland_small.png"
|
||||
)
|
||||
rules/init-rules))
|
||||
(heightmap/apply-heightmap
|
||||
(io/get-resource "/img/heightmaps/small_hill.png")))
|
||||
rules (or (session/get :rules)
|
||||
(do (session/put! :rules
|
||||
(compiler/compile-file
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
(if (not (= map ""))
|
||||
(session/put! :world
|
||||
(heightmap/apply-heightmap
|
||||
(io/get-resource (str "/img/heightmaps/" map ".png")))))
|
||||
(as-file (str "/img/heightmaps/" map ".png")))))
|
||||
(if (not (= rulefile ""))
|
||||
(do
|
||||
(session/put! :rule-text (io/slurp-resource rulepath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue