aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/space_vlaze
diff options
context:
space:
mode:
authorTeddy Wing2015-10-04 13:11:15 -0400
committerTeddy Wing2015-10-04 13:13:44 -0400
commit70ae783d2d78cc9c7b79f044b999c0ee150cf595 (patch)
tree1f1e2428caa0edef80a6bcf7fea3161a9907c779 /autoload/space_vlaze
parent7d905557a4e9e0969005886416a71fea8a1f952e (diff)
downloadvim-space-vlaze-70ae783d2d78cc9c7b79f044b999c0ee150cf595.tar.bz2
Connect in-game mappings
* Remove `<nowait>` since it isn't available in my version of Vim (7.3 2010 Aug 15, compiled Jun 20 2012 13:16:02) and breaks the mappings if it's included. * Create function stubs for all mappings * Add missing `<cr>`s to end of mappings to make them work * Initialise mappings when starting a game
Diffstat (limited to 'autoload/space_vlaze')
-rw-r--r--autoload/space_vlaze/game.vim9
-rw-r--r--autoload/space_vlaze/mappings.vim14
-rw-r--r--autoload/space_vlaze/player.vim21
3 files changed, 37 insertions, 7 deletions
diff --git a/autoload/space_vlaze/game.vim b/autoload/space_vlaze/game.vim
index 2b7b289..54fa6f9 100644
--- a/autoload/space_vlaze/game.vim
+++ b/autoload/space_vlaze/game.vim
@@ -4,6 +4,7 @@ function! space_vlaze#game#Init()
call space_vlaze#game#SetupWindow()
call space_vlaze#colors#Initialize()
call space_vlaze#game#InitializeBoard()
+ call space_vlaze#mappings#Initialize()
endfunction
@@ -51,3 +52,11 @@ function! space_vlaze#game#RenderBoard()
let i += 1
endwhile
endfunction
+
+
+function! space_vlaze#game#Quit()
+endfunction
+
+
+function! space_vlaze#game#Pause()
+endfunction
diff --git a/autoload/space_vlaze/mappings.vim b/autoload/space_vlaze/mappings.vim
index fdd2a37..65cfe6e 100644
--- a/autoload/space_vlaze/mappings.vim
+++ b/autoload/space_vlaze/mappings.vim
@@ -1,9 +1,9 @@
function! space_vlaze#mappings#Initialize()
- nnoremap <silent><buffer><nowait> q :call space_vlaze#game#Quit()
- nnoremap <silent><buffer><nowait> p :call space_vlaze#game#Pause()
- nnoremap <silent><buffer><nowait> h :call space_vlaze#player#MoveLeft()
- nnoremap <silent><buffer><nowait> j :call space_vlaze#player#MoveDown()
- nnoremap <silent><buffer><nowait> k :call space_vlaze#player#MoveUp()
- nnoremap <silent><buffer><nowait> l :call space_vlaze#player#MoveRight()
- nnoremap <silent><buffer><nowait> <space> :call space_vlaze#player#FireBlasters()
+ nnoremap <silent><buffer> q :call space_vlaze#game#Quit()<cr>
+ nnoremap <silent><buffer> p :call space_vlaze#game#Pause()<cr>
+ nnoremap <silent><buffer> h :call space_vlaze#player#MoveLeft()<cr>
+ nnoremap <silent><buffer> j :call space_vlaze#player#MoveDown()<cr>
+ nnoremap <silent><buffer> k :call space_vlaze#player#MoveUp()<cr>
+ nnoremap <silent><buffer> l :call space_vlaze#player#MoveRight()<cr>
+ nnoremap <silent><buffer> <space> :call space_vlaze#player#FireBlasters()<cr>
endfunction
diff --git a/autoload/space_vlaze/player.vim b/autoload/space_vlaze/player.vim
index 53583bd..17b0178 100644
--- a/autoload/space_vlaze/player.vim
+++ b/autoload/space_vlaze/player.vim
@@ -1,3 +1,24 @@
function! space_vlaze#player#PlayerCharacter()
return '◆'
endfunction
+
+
+function! space_vlaze#player#MoveLeft()
+endfunction
+
+
+function! space_vlaze#player#MoveDown()
+ echom 'booya'
+endfunction
+
+
+function! space_vlaze#player#MoveUp()
+endfunction
+
+
+function! space_vlaze#player#MoveRight()
+endfunction
+
+
+function! space_vlaze#player#FireBlasters()
+endfunction