Fixed errors and adapted to new vim 8.1

This commit is contained in:
Linus Probert 2018-05-27 15:13:03 +02:00
parent 60052af7f5
commit be42981ff3
3 changed files with 23 additions and 19 deletions

8
.vimrc
View File

@ -1,6 +1,8 @@
nnoremap <F1> :Make<cr>
nnoremap <F2> :Make clean<cr>
nnoremap <F3> :Make lint test<cr>
nnoremap <F4> :!./_build/breakhack<cr>
nnoremap <F2> :Make lint test<cr>
nnoremap <F3> :Termdebug _build/breakhack<cr>
nnoremap <F4> :ter _build/breakhack<cr>
packadd termdebug
let g:termdebug_wide = 1
let g:syntastic_c_include_dirs = [ '_build', '/usr/include/SDL2' ]

View File

@ -155,7 +155,7 @@ end
local function add_pits_to_room(map)
if CURRENT_LEVEL < 2 then
if CURRENT_LEVEL < 3 then
return
elseif random(5) ~= 1 then
return
@ -171,7 +171,6 @@ local function add_pits_to_room(map)
end
end
local matrix = {}
for i=0, #cleanData-1 do
local c = cleanData:sub(i, i)
@ -183,11 +182,14 @@ local function add_pits_to_room(map)
if not matrix[layout][col] then matrix[layout][col] = {} end
if c == "#" then
matrix[layout][col][row] = true
elseif c == "-" then
else
matrix[layout][col][row] = false
end
end
-- Chose a random layout
matrix = matrix[random(#matrix)]
for i=2,13 do
for j=2,10 do
if not tile_occupied(map, (i), (j)) and matrix[i][j] then

View File

@ -150,7 +150,7 @@ local dogs = {
{ stats.dog, 16, 16, "An Angry Rabid Dog", behaviour.hostile };
}
for i=1,#dogs do
dogs[i] = concat({ texturePaths.dogs0, texturePaths.dogs1 }, dogs[i])
dogs[i] = concat({ texturePaths.dog0, texturePaths.dog1 }, dogs[i])
end
local reptile = {
@ -165,18 +165,6 @@ for i=1,#reptile do
reptile[i] = concat({ texturePaths.reptile0, texturePaths.reptile1 }, reptile[i])
end
local platino = {
{
texturePaths.reptile0,
texturePaths.reptile1,
stats.platino,
48,
12*16,
"Platino",
behaviour.sentinel
}
}
local demon = {
{ stats.default, 0, 0, "A Demon", behaviour.hostile };
{ stats.default, 16, 0, "A Demon", behaviour.hostile };
@ -191,6 +179,18 @@ for i=1,#demon do
demon[i] = concat({ texturePaths.demon0, texturePaths.demon1 }, demon[i])
end
local platino = {
{
texturePaths.reptile0,
texturePaths.reptile1,
stats.platino,
48,
12*16,
"Platino",
behaviour.sentinel
}
}
local function repack(data)
return {
texturePath1 = data[1],