Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
Added 7 Easy levels
Added 8 Medium levels
Added 10 Hard levels
New 2 themes (RedBlack & CreamCoffee)
Added Alpha channel to palette
Added 4 Extra Slots for Color palette
Added Milliseconds to timers
Added Undo/Redo function to Create mode
Added Score (Counting cleared levels)
Added Preview feature to see level if it's cleared
Added full localization (even standart levels (not names but "level01"->"Level - 01"))
Added Level Generator
Added Path to custom level selection
Added "5 skip" to level selection by pressing Left or Right
Added Random Hint
Added Animation to pencil
Changed readFile algorythm in libraries (Less lags)
Changed size of lines in palette
Changed design of pen and square textures
Reduced distance between hints (left-bottom corner hints)
Moved Localization to new library
Fixed bug when screen freezes at start of the game (not readFile issue)
A lot of fixes
  • Loading branch information
Creckeryop committed Aug 2, 2018
1 parent b6ff35c commit 7473b28
Show file tree
Hide file tree
Showing 94 changed files with 2,992 additions and 1,590 deletions.
98 changes: 33 additions & 65 deletions data/lib/cfg.lua
@@ -1,67 +1,35 @@
function readCfg (_path, _table) --loads cfg file to Options table

if System.doesFileExist(_path) then

local cfg = System.openFile(_path, FREAD)
local cfg_size = System.sizeFile(cfg)
local k,key,value = true,"",""

for i = 1, cfg_size do

local str = System.readFile(cfg, 1)

if string.byte(str) ~= 13 and string.byte(str)~=10 then

if str == ' ' then

k = false

else

if k then

key = key..str

else

value = value..str

end

end

elseif string.byte(str) == 10 then

k = true
if tonumber(value)~=nil then
_table[key] = tonumber(value)
else
_table[key] = value
end
key = ''
value = ''

end

end

_table[key] = value
System.closeFile(cfg)

end

function readCfg(p,b)
if System.doesFileExist(p) then
local c=System.openFile(p,FREAD)
local f=System.readFile(c,System.sizeFile(c))
System.closeFile(c)
local t,k,v,s=true,'',''
for i=1,f:len() do
s=f:sub(i,i)
if s~='\r' and s~='\n' then
if s==' ' and t then
t=false
else
if t then
k=k..s
else
v=v..s
end
function updateCfg (_path, table) --updates cfg file with table value

System.deleteFile(_path)
local cfg = System.openFile(_path, FCREATE)

for k,v in pairs(table) do

System.writeFile(cfg, k.." "..v.."\n", string.len(k.." "..v.."\n"))

end

System.closeFile(cfg)

end
elseif s=='\n' then
b[k]=tonumber(v) or v
k,v,t='','',true
end
end
b[k]=v
end
end
function updateCfg(p,t)
System.deleteFile(p)
local c,a=System.openFile(p,FCREATE)
for k,v in pairs(t) do
a=k.." "..v.."\n"
System.writeFile(c,a,a:len())
end
System.closeFile(c)
end
2 changes: 1 addition & 1 deletion data/lib/fnt.lua
Expand Up @@ -27,7 +27,7 @@ FontLib = {
"0","1","2","3","4","5","6","7","8","9",
"A","B","V","G","D","E","J","Z","I","~","K","L","M","N","O","P","R","S","T","U","F","H","C","X","W","Y","\"","}","Q","{",
"a","b","v","g","d","e","j","z","i","`","k","l","m","n","o","p","r","s","t","u","f","h","c","x","w","y","'","]","q","[",
" ",".","!","?","-","+","(",")","%","$","#","|","~",":","/","<",">","^","@"
" ",".","!","?","-","+","(",")","%","$","#","|","~~",":","/","<",">","^","@"
}
},
[3]={
Expand Down
Binary file modified data/lib/fnt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
245 changes: 245 additions & 0 deletions data/lib/lang.lua
@@ -0,0 +1,245 @@
LOCALIZATION = {
OPTIONS = {
BUTTONS = {
{"Theme","Miss","Animation","Language: English","Reset saves","Back"},
{"Tema","Owibki","Animaci[","{zyk: Russki`","Sbros","Nazad"},
{"Thema","Error","Multiplicatio ","Lingua: Latina (by overmind98)","Reconstitere memoriam","Cessim"}
},
DOWN_BUTTONS = {
{
{"Back","Change option"},
{"Nazad","Izmenit'"},
{"Cessim","Succedere instrumentum"}
},
{
{"Select","Back"},
{"Vybrat'","Nazad"},
{"Seligere","Cessim"}
}
}
},
THEMES = {
DOWN_BUTTONS = {
{
{"Change color","Back","Scroll"},
{"Izmenit' cvet", "Nazad","Smenit' cvet"},
{"Succedere colorem","Cessim","Circumagere"}
},
{{"Accept","Cancel","Change color"},
{"Primenit'","Otmena","Izmenit' cvet"},
{"Approbare","Cancell|re","Succedere colorem"}
}
}
},
MENU = {
BUTTONS = {
{"Play", "Create", "Options", "Exit"},
{"Igrat'", "Sozdat'", "Nastro`ki", "Vyhod"},
{"Ludere", "Cre|re", "Instrumenti", "Exitus"}
},
DOWN_BUTTONS = {
{"Select"},
{"Vybrat'"},
{"Seligere"}
}
},
PAUSE = {
BUTTONS = {
{"Continue", "Options", "Main menu"},
{"Prodoljit'", "Nastro`ki", "Glavnoe menq"},
{"Continuare", "instrumenti", "Primus catalogus"}
},
DOWN_BUTTONS = {
{"Select","Back to game"},
{"Vybrat'","Nazad k igre"},
{"Seligere","In ludo redire"}
}
},
SELECTION = {
DOWN_BUTTONS = {
{
{"Close folder","Go to Standart levels folder","Back"},
{"Zakryt' papku","V standartnye urovni","Nazad"},
{"Claudere categoriam","@re categori| cum typicae tabulae","Cessim"}
},
{
{"Open folder","Go to Standart levels folder","Back"},
{"Otkryt' papku","V standartnye urovni","Nazad"},
{"Aper@re categoriam","@re categori| cum typicae tabulae","Cessim"}
},
{
{"Play level","Show/Hide preview","Go to Standart levels folder","Back"},
{"Igrat' uroven'","Pokazat'/Skryt' kartinku","V standartnye urovni","Nazad"},
{"Ludere tabulam","Spect|re/Abscondere Praev$sum","@re categori| cum typicae tabulae","Cessim"}
},
{
{"Go to Standart levels folder","Back"},
{"V standartnye urovni","Nazad"},
{"@re categori| cum typicae tabulae","Cessim"}
},
{
{"Close folder","Go to Custom levels folder","Back"},
{"Zakryt' papku","V kastomnye urovni","Nazad"},
{"Claudere categoriam","@re categori| cum factae tabulae","Cessim"}
},
{
{"Open folder","Go to Custom levels folder","Back"},
{"Otkryt' papku","V kastomnye urovni","Nazad"},
{"Aper@re categoriam","@re categori| cum factae tabulae","Cessim"}
},
{
{"Play level","Show/Hide preview","Go to Custom levels folder","Back"},
{"Igrat' uroven'","Pokazat'/Skryt' kartinku","V kastomnye urovni","Nazad"},
{"Ludere tabulam","Spect|re/Abscondere Praev$sum","@re categori| cum factae tabulae","Cessim"}
},
{
{"Go to Custom levels folder","Back"},
{"V kastomnye urovni","Nazad"},
{"@re categori| cum factae tabulae","Cessim"}
}
}
},
HEAD = {
HEAD = {
"PiCrest",
"PiKrest",
"PiCrux"
},
TEXT = {
"the nonogram game",
"nonogram igra",
"nonogramma Ludus"
}
},
CREATE = {
BUTTONS = {
{"Name","Width","Height","Create"},
{"Im[","Wirina","Vysota","Sozdat'"},
{"Nomen","Latitudo","Altitudo","Cre|tus"}
},
DOWN_BUTTONS = {
{
{"Change","Back"},
{"Izmenit'","Nazad"},
{"Succedere","Cessim"}
},
{
{"Change","Back"},
{"Izmenit'","Nazad"},
{"Succedere","Cessim"}
},
{
{"Select","Back"},
{"Vybrat'","Nazad"},
{"Seligere","Cessim"}
},
},
DOWN_BUTTONS2 = {
{
{"Undo","Redo","Show/Hide palette","Paint square","Go to map mode","Save"},
{"Otmenit'","Povtorit'","Otkryt'/Zakryt' palitru","Zakrasit' kvadrat","Rejim karty","Sohranit'"},
{"Und|re","Reagere","Spect|re/Abscondere pal|tum","Colōr|re quadratum","@re tabula modus","Memoria"}
},
{{"Add/Delete square","Go to paint mode","Save"},{"Postavit'/Ubrat' kvadrat","Rejim Raskraski","Sohranit'"},{"Addere/^r|dere quadratum","@re pictura modus","Memoria"}}
}
},
YESORNO = {
BUTTONS = {
{"Yes", "No"},
{"Da", "Net"},
{"Sic", "Non"}
},
TEXT = {
"Are you sure?",
"Vy uvereny?",
"Certus es tu?"
},
DOWN_BUTTONS = {
{{"Select","Cancel"},{"Vybrat'","Otmena"},{"Seligere","Cancell|re"}},
{{"Cancel"},{"Otmena"},{"Cancell|re"}}
}
},
ANIMATION = {
{"rescale", "fade", "rotating", "off"}, {"uvelixenie","skrytie","vrawenie", "net"},{"Resc|lere", "Marc^scere", "Rotatio", "Nihil"}
},
SAVING = {
"Saving",
"Sohranenie",
"Memoria"
},
MAKE_LEVEL = {
"Make level",
"Sozda` uroven'",
"Cre|re tabulam "
},
COLOR_LEVEL = {
"Color level",
"Raskras' uroven'",
"Colorare tabulam "
},
TIME_OVER = {
"Time Over",
"Vrem[ Vywlo",
"Tempus Exiebat"
},
CLEARED = {
"Cleared",
"Pro`deno",
"Purgatur"
},
RECORD = {
"Record",
"Rekord",
"Record|tus"
},
NEW_RECORD = {
"NEW RECORD",
"NOVY~ REKORD",
"Record|tus Novus"
},
TIME = {
"Time",
"Vrem[",
"Tempus"
},
INFO = {
"Info:",
"Info:",
"Info:"
},
NO_RECORD = {
"No Record",
"Net Rekorda",
"Non Record|tus"
},
FOLDER = {
"Folder",
"Papka",
"Categoriam"
},
GO_BACK = {
"Go Back",
"Nazad",
"Cessim"
},
USE_HINT = {
"Use Hint?",
"Podskazku?",
"Adhibere Auxilium?"
},
DIFFICULTIES = {
{"Easy", "Medium", "Hard", "Generate"},
{"Legki`", "Sredni`","Slojny`","Sgenerirovat'"},
{"Leva","Media","Difficila","Gener|re"}
},
LEVEL = {
"Level",
"Uroven'",
"Tabulam"
},
SCORE = {
"SCORE",
"OXKI",
"SUMMA"
}
}

0 comments on commit 7473b28

Please sign in to comment.