aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/prelude.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lisp/prelude.rs b/src/lisp/prelude.rs
index fee787e..d0667d8 100644
--- a/src/lisp/prelude.rs
+++ b/src/lisp/prelude.rs
@@ -1,6 +1,7 @@
1use crate::{ 1use crate::{
2 bitmap::MapPoint, 2 bitmap::MapPoint,
3 brush::Brush, 3 brush::Brush,
4 grid::{Grid, GridKind},
4 guide::Guide, 5 guide::Guide,
5 lisp::{ 6 lisp::{
6 error::{EvalError, LispError}, 7 error::{EvalError, LispError},
@@ -257,6 +258,16 @@ pub fn new_env() -> Result<Environment, LispError> {
257 Ok(LispExpr::Unit) 258 Ok(LispExpr::Unit)
258 }); 259 });
259 260
261 primitive!(env, Arity::Exact(0), "grid-rectangle", |_, app| {
262 app.grid.kind = GridKind::Rectangle;
263 Ok(LispExpr::Unit)
264 });
265
266 primitive!(env, Arity::Exact(0), "grid-isometric", |_, app| {
267 app.grid.kind = GridKind::Isometric;
268 Ok(LispExpr::Unit)
269 });
270
260 primitive!(env, Arity::Exact(0), "brush-fill", |_, app| { 271 primitive!(env, Arity::Exact(0), "brush-fill", |_, app| {
261 app.brush = Brush::Fill; 272 app.brush = Brush::Fill;
262 Ok(LispExpr::Unit) 273 Ok(LispExpr::Unit)