diff --git a/bitsy/game.json b/bitsy/game.json index f76b3f5..551a56e 100644 --- a/bitsy/game.json +++ b/bitsy/game.json @@ -1 +1 @@ -{"tiles":[{"gfx":"8080808080808080808080808080808080808080808080808080808080808080","word":"","label":"","flags":{"walkable":true}},{"gfx":"8080C0C0C0C0E0F0F8FCE6E6E0B0B0B0808183838383878F9FBFE7E7868C8C8C","word":"","label":"player-frame1","flags":[]},{"gfx":"8080808084CCFCFCFCFCFCF8F0B0B0B080808080E1E1E1F1B99F9F8F8F8C8C8C","word":"","label":"","flags":[]},{"gfx":"D5D55555D5D55555D5D55555D5D555552A2AAAAA2A2AAAAA2A2AAAAA2A2AAAAA","word":"","label":"","flags":[]},{"gfx":"8080D4D0D0D0D4D45454D4D4D4D0808080808A8282828A8A8A0A0A8A8A828080","word":"pot","label":"","flags":[]},{"gfx":"8080808080D490948484A48494D080808080808080AA88A8A0A5A5A0A88A8080","word":"","label":"","flags":[]},{"gfx":"808080F8F89898989898989E9F9E80808080809F9F9898989898989E9F9E8080","word":"","label":"","flags":[]},{"gfx":"000000A0908884827E0A0A0A0000000000000000201008040785858500000000","word":"","label":"","flags":[]},{"gfx":"000014040414500000000000A888A8800000282020280A010101010195919580","word":"","label":"","flags":[]},{"gfx":"00008C92921C60105010781C0E070300000098A4A41C030504050F1C38706000","word":"","label":"","flags":[]},{"gfx":"000000004040000000D4D4ECECECD480000000000202010101AAAAB6B6B6AA80","word":"","label":"","flags":[]},{"gfx":"0000000000004828282828482800000000000000000004050505050405000000","word":"","label":"","flags":[]},{"flags":{"walkable":true},"word":"","label":"","gfx":"000000002020202020000A080808000000000000000000415111111111110100"},{"flags":[],"word":"","label":"","gfx":"00002028282A2A2A2820A0A0A0A0A08000000515155555151505858585858580"},{"flags":[],"word":"","label":"","gfx":"8080808080F8FCFC9C9CBCFEE6E6E68080808287878780818784848484848480"},{"flags":[],"word":"","label":"","gfx":"C0C0D0D0D4D4D4D5D5D080C0D0D4D4D08282828080828AAAAA8A8A8A82808282"},{"flags":{},"word":"","label":"stickbob","gfx":"E090B090A0C0A8D0D0A8C0E0B0988080838486848281958A8A958183868C8080"},{"flags":[],"word":"","label":"","gfx":"8080808080A0A8A8A0A0A0A8A8A8A08081818181818594948585859594948580"},{"flags":[],"word":"","label":"","gfx":"008AA88A000020282A0A0A0A2A28000000151115140505010000101014150500"},{"flags":[],"word":"","label":"","gfx":"000000002028381828282020202028000000000005151D191515040404041400"}],"levels":[{"loadword":"","map":"000000000000000000000000000000000000000000606060606060606060606060606060606060000060000000000000000000000000000000006000006000000000000000000000000000000000600000600000A00000000000000000004000000060600060000000000000000000000000000000000000006000000000000000000000000000000000606000600000000000000000000000000000000060000060000000000000000080808080800000006000006000000000000000000000000000000000600000606060606060606060606060606060606060000000000000000000000000000000000000000000","player":{"y":4,"x":5},"tickword":"","moveword":"","objects":[{"x":15,"func":"cat","linkentity":"","y":8,"linkword":"","name":"","steps":[{"action":"say","character":"cat","lines":["I'm a cat.","","",""]},{"lines":["","Nice kitty!","",""],"action":"say","character":"player"}]},{"x":5,"y":8,"linkentity":"","func":"fish","name":"","linkword":"","steps":[{"lines":["","","Grr! Go away!",""],"action":"say","character":"angryfish"}]},{"x":13,"y":4,"linkentity":"","func":"pot","linkword":"","name":"","steps":[{"character":"player","lines":["","Just another empty pot.","",""],"action":"say"}]},{"x":12,"y":4,"linkentity":"","func":"suspiciouspot","linkword":"","name":"","steps":[{"lines":["","","",""],"action":"disappear","character":"player"},{"lines":["","Whoops, I broke it!","",""],"action":"say","character":"player"}]},{"x":11,"y":4,"linkentity":"","func":"pot","name":"","linkword":"","steps":[{"character":"player","lines":["","It's a plain old empty pot.","",""],"action":"say"}]},{"x":14,"y":4,"linkentity":"","func":"pot","name":"","linkword":"","steps":[{"character":"player","lines":["","Nothing special about these pots.","",""],"action":"say"}]},{"x":15,"y":4,"linkentity":"","func":"pot","name":"","linkword":"","steps":[{"character":"player","lines":["","This one has a million dollars","inside!!",""],"action":"say"},{"character":"player","lines":["","Oh, no, wait. That was just","a dust bunny.",""],"action":"say"},{"character":"player","lines":["","There's really nothing special","about this pot.",""],"action":"say"},{"character":"player","lines":["","Probably.","",""],"action":"say"},{"action":"say","character":"snake","lines":["","There's a snake though.","",""],"condition":"has glasses"},{"action":"say","character":"glasses","lines":["","aaack!","",""],"condition":"has glasses"}]},{"func":"","x":20,"y":7,"steps":[{"position":1537,"character":"player","lines":["","","",""],"action":"warp","map":"map2"}]}]},{"loadword":"","objects":[{"func":"","x":1,"y":7,"steps":[{"position":1554,"character":"player","lines":["","","",""],"action":"warp","map":"map1"}]},{"func":"","x":18,"y":2,"steps":[{"lines":["","Neat, it's a pair of 3D glasses!","I wonder what I can see with","these..."],"action":"say","character":"player"},{"lines":["","","",""],"action":"disappear","character":"player"},{"flag":"has glasses","action":"set-flag","lines":["","","",""],"rhs":{"label":"","value":65535},"character":"player"}]},{"func":"","x":10,"y":7,"steps":[{"character":"old man","lines":["","I am but a weary old man,","living alone in these woods.",""],"action":"say"},{"action":"say","character":"player","lines":["","Cool story. Any words of wisdom","for me?",""]},{"action":"say","character":"old man","lines":["","Not really.","",""]},{"condition":"has glasses","character":"glasses","lines":["Holy cow!!","","This \"old man\" is actually","an alien!!"],"action":"say"}]},{"func":"","x":20,"y":7,"steps":[{"position":1537,"character":"player","lines":["","","",""],"action":"warp","map":"map3"}]},{"func":"","x":10,"y":1,"steps":[{"position":2057,"character":"player","action":"warp","lines":["","","",""],"map":"map4"}]},{"func":"","x":16,"y":10,"steps":[{"lines":["","Would you be my friend?","",""],"action":"say","character":"charismatic frog"},{"lines":["","OF COURSE!","",""],"action":"say","character":"player"}]}],"tickword":"","moveword":"","map":"A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1000000A1A1A1A10000818181818181A1A1A10000000000A1A1A1000000818181628181A1A1A1000000000000A1A100000000818181818100A160600000000000000000000000000081000000A1000000000000000000C10000000000000000000060600000000000000000000000000000000000A1A1000081818100000000000000A1A100000000A1A10081818181810000000000A1A1A1A1000000A1A100818181818100000000A1A1A1A1A1A10000A1A10000008181000000000000A1A1A1A1A1E0A1A1A1A1A1A1A1A1A1A1A100A1A1A1A1A1A1A1A1A1A1"},{"loadword":"","map":"A1A1A1A1A1818181818181E1E181818181818181A1A1A1A18181818181818181E181818181818181A1A181818142810000008181E1E1818181000000A1000081818100000000818181E1E18181000000A100000000000000000000818181E181818100000000000000000000000000008181E18181810000A181810000000000000000000000E10062000000A181818181000000A10000818181E18181000000A1818181810000000000008181E1E18181000000A1A181818100000000818181E1E1818181818181A1A1A1818181000081818181E181818181818181A1A1A1A18181818181818181E181818181818181","tickword":"","moveword":"","objects":[{"func":"","x":1,"y":7,"steps":[{"position":1554,"character":"player","lines":["","","",""],"action":"warp","map":"map2"}]},{"func":"","x":9,"y":5,"steps":[{"action":"say","character":"player","lines":["","This wood would be perfect to","build a bridge with!",""]},{"action":"say","character":"player","lines":["","Haha, \"wood would\". Wood would","wood would.",""]},{"action":"say","character":"player","lines":["","Hey, I bet I could cut down this","tree with my cool time scissors!",""],"condition":"has scissors"},{"action":"disappear","character":"player","lines":["","","",""],"condition":"has scissors"},{"action":"say","character":"player","lines":["","Haha, awesome.","",""],"condition":"has scissors"},{"condition":"has scissors","flag":"has wood","character":"player","lines":["","","",""],"rhs":{"label":"","value":65535},"action":"set-flag"}]},{"func":"","x":15,"y":6,"steps":[{"action":"say","character":"player","lines":["","If only there was some convenient","way to cross this ankle-deep","stream!"]},{"condition":"has wood","character":"player","lines":["","Guess I'll just have to build a","raft and sail it across.",""],"action":"say"},{"condition":"has wood","character":"player","lines":["","","",""],"action":"disappear"}]},{"func":"","x":6,"y":10,"steps":[{"character":"snake","lines":["","Badger badger badger badger","badger badger badger badger","badger badger badger badger"],"action":"say"},{"character":"player","lines":["","A snake! A snake!","",""],"action":"say"}]},{"func":"","x":17,"y":6,"steps":[{"lines":["","Ribbit.","",""],"action":"say","character":"charismatic frog"},{"lines":["","I thought you'd be more","charismatic.",""],"action":"say","character":"player"}]}]},{"loadword":"","map":"000000000000000000000000000000000000000000000000000000000000000000000000000000000000A1A1A1A1A1A1600060A1A1A1A1A1A10000000000606060606060600060606060606060000000000060C00000000000000000000000C060000000000060000000000000000000000000006000000000006000000000000002000000000000600000000000600000000000000000000000000060000000000060C00000210000000000220000C060000000000060606060606060606060606060606000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","tickword":"","moveword":"","objects":[{"func":"","x":10,"y":6,"steps":[{"lines":["","Would you like to hear a jig","and a reel?",""],"action":"say","character":"stick bob"},{"lines":["","Do you play the theremin?","",""],"action":"say","character":"player"},{"lines":["","I can play anything!","",""],"action":"say","character":"stick bob"}]},{"func":"","x":10,"y":10,"steps":[{"position":265,"character":"player","action":"warp","lines":["","","",""],"map":"map2"}]},{"func":"","x":13,"y":4,"steps":[{"lines":["","It's a fiddle. I promise.","I worked hard to draw it.",""],"action":"say","character":"player"}]},{"func":"","x":7,"y":4,"steps":[{"lines":["","Scissors with a clock on them?","They're super sharp!",""],"action":"say","character":"player"},{"lines":["","I'm sure they'll come in handy!","",""],"action":"say","character":"player"},{"flag":"has scissors","character":"player","lines":["","","",""],"rhs":{"label":"","value":65535},"action":"set-flag"},{"lines":["","","",""],"action":"disappear","character":"player"}]}]}],"flags":["has wood","has scissors","","has glasses"],"portraits":[{"gfx":"000000000000000000000000000000000000007C7C7E7E7E7E7E7E7E7E7E7E7E00000000707F7F7F7F7F7F7F7F7F7F7F7E7E7E7E7F7F7F7F7F7F7F7F7F7F7F7F0000000F0F1F1F1F1F1F1F1F1F1F1F1F000000000000000000000000000000001F1F1F1F7F7F7F7F7F7F7F7F7F7F7F7F00000000077F7F7F7F7F7F7F7F7F7F7F","label":"player","flags":[]},{"gfx":"00000000004040606060707070707070000000000000010103037F7F7F7F7F7F707060604000000000000000000000007F7F7F7F7F7F7800004040406060606000000000001018383C3C7F7F7F7F7F7F000000000000000000000000000000007F7F7F3F0F67717C7F7F7F7F7F7F7F7F00007C7E7F7F7F7F7F7F7F7F7F7F7F7F","label":"cat","flags":[]},{"gfx":"80808080808080808080D5818181858480808080808080808080AA80808080808484848484A4848484A48484848494D0809090D0D4F5D5D5D5D5D480808080AA80808080808080808080D5808080808080808080808080808080AAA0A0A0A888808080808AA8AAAAAA828080808080D588888888888889898888888888888A82","label":"angryfish","flags":[]},{"flags":[],"label":"old man","gfx":"0000000000000000000000000000000000000000000000707C7872737373736300000000303F3F3F7F7F7F7F7F7F7F7F0F7F7F7F7E7E7E7E7C7C79797979797300000000000000073F3F7F7F7F7F7F60000000000000000000000000000000000E7F3F3F3F3F7F7F7F7F7F7F7F3F1F1F00000000000000000004040C0C1C1E1F"},{"flags":[],"label":"stick bob","gfx":"808080808080808080A0A8E8E8F0F0F08080808080C0D4D5FDFFFFF3F1F1FFFFF0F0E0E0C08080808080808080808080FFFFF983FFBFBEFCF4D4D4D4D4D4D4D480808080808AAAABAFBFFFE7C7C7FFFF80808080808080808185858583838383FFFFCFE0FFFEBE8F8B8A8A8A8A8A8A8A83838383818080808080808080808080"},{"flags":[],"label":"snake","gfx":"000000000000808080808AA88A8080000000000000000014557155455054545000000020202020202020000000000000505455150505050505155554545040000000000000000000000202020202020200000000000000000000000000000000002020202000000000000002022A2A2A00000001010505051514141414150505"},{"flags":[],"label":"glasses","gfx":"000000000000000000000000000000000000007C7C7E7E7E7E555555757E7E7E00000000707F7F7F7F7F7F7F7F7F7F7F7E7E7E7E7F7F7F7F7F7F7F7F7F7F7F7F0000000F0F1F1F1F9FAAAAAAAB1F1F1F000000000000000000000000000000001F1F1F1F7F7F7F7F7F7F7F7F7F7F7F7F00000000077F7F7F7F7F7F7F7F7F7F7F"},{"flags":[],"label":"charismatic frog","gfx":"00000000000020202020202020202000000000005455555F47475555050055550000000000000000002820282028000054040404040404040405050505010000000000002A2A2A7A62622A2A2A002A2A000000000001050505050505050405012A20202020202020202020202000000000000000000000000015051505150000"}],"font":[{"flags":[],"gfx":"0000000000000000"},{"flags":[],"gfx":"081C1C1C08000800"},{"flags":[],"gfx":"3636241200000000"},{"flags":[],"gfx":"123F1212123F1200"},{"flags":[],"gfx":"083C0A1C281E0800"},{"flags":[],"gfx":"0026160834320000"},{"flags":[],"gfx":"0E1B1B062F1B3600"},{"flags":[],"gfx":"0C0C080400000000"},{"flags":[],"gfx":"180C0606060C1800"},{"flags":[],"gfx":"0C18303030180C00"},{"flags":[],"gfx":"082A1C081C2A0800"},{"flags":[],"gfx":"000C0C3F3F0C0C00"},{"flags":[],"gfx":"000000000C0C0804"},{"flags":[],"gfx":"0000001E1E000000"},{"flags":[],"gfx":"00000000000C0C00"},{"flags":[],"gfx":"002030180C060200"},{"flags":[],"gfx":"1C26263E26261C00"},{"flags":[],"gfx":"181C181818183C00"},{"flags":[],"gfx":"1C2620180C063E00"},{"flags":[],"gfx":"1C26201820261C00"},{"flags":[],"gfx":"2626263C30303000"},{"flags":[],"gfx":"3E061E2020201E00"},{"flags":[],"gfx":"1C26061E26261C00"},{"flags":[],"gfx":"3E2630180C0C0C00"},{"flags":[],"gfx":"1C26261C26261C00"},{"flags":[],"gfx":"1C26263C20201C00"},{"flags":[],"gfx":"000C0C000C0C0000"},{"flags":[],"gfx":"000C0C000C0C0804"},{"flags":[],"gfx":"30180C060C183000"},{"flags":[],"gfx":"00003E003E000000"},{"flags":[],"gfx":"060C1830180C0600"},{"flags":[],"gfx":"1C3630180C000C00"},{"flags":[],"gfx":"1E33212D3D011E00"},{"flags":[],"gfx":"1C3E26263E262600"},{"flags":[],"gfx":"1E26261E26261E00"},{"flags":[],"gfx":"1C26060606261C00"},{"flags":[],"gfx":"1E26262626261E00"},{"flags":[],"gfx":"3E06061E06063E00"},{"flags":[],"gfx":"3E06061E06060600"},{"flags":[],"gfx":"1C26063626263C00"},{"flags":[],"gfx":"2626263E26262600"},{"flags":[],"gfx":"3C18181818183C00"},{"flags":[],"gfx":"3C30303036361C00"},{"flags":[],"gfx":"2626261E26262600"},{"flags":[],"gfx":"0606060606063E00"},{"flags":[],"gfx":"373F2B2B23232300"},{"flags":[],"gfx":"26262E3626262600"},{"flags":[],"gfx":"1C26262626261C00"},{"flags":[],"gfx":"1E26261E06060600"},{"flags":[],"gfx":"1C26262626363C00"},{"flags":[],"gfx":"1E26261E26262600"},{"flags":[],"gfx":"3C26061C20221E00"},{"flags":[],"gfx":"3F0C0C0C0C0C0C00"},{"flags":[],"gfx":"2626262626261C00"},{"flags":[],"gfx":"2626261C1C1C0800"},{"flags":[],"gfx":"2323232B2B2A3600"},{"flags":[],"gfx":"2626261C26262600"},{"flags":[],"gfx":"2626261C18181800"},{"flags":[],"gfx":"3E3E30180C063E00"},{"flags":[],"gfx":"1C0C0C0C0C0C1C00"},{"flags":[],"gfx":"0002060C18302000"},{"flags":[],"gfx":"1C18181818181C00"},{"flags":[],"gfx":"081C260000000000"},{"flags":[],"gfx":"0000000000003E00"},{"flags":[],"gfx":"0C0C100000000000"}], "brushes": [{"mask":"FFFFFFFFFFFFFFFF","gfx":"D5D5D5D5D5D5D5D5","flags":[]},{"mask":"00008F8F8F000000","gfx":"00000A0A0A000000","flags":[]},{"mask":"0000BFBFBFBF0000","gfx":"0000AAAAAAAA0000","flags":[]},{"mask":"0000BCBCBC000000","gfx":"0000141414000000","flags":[]},{"mask":"0000BCBCBC000000","gfx":"0000949494000000","flags":[]},{"mask":"0000000C0C000000","gfx":"0000000C0C000000","flags":[]},{"mask":"00000C1E1E0C0000","flags":[],"gfx":"0000000000000000"},{"mask":"3E7F7F7F7F7F7F3E","gfx":"3E7F7F7F7F7F7F3E","flags":[]}]} +{"tiles":[{"gfx":"8080808080808080808080808080808080808080808080808080808080808080","word":"","label":"","flags":{"walkable":true}},{"gfx":"8080C0C0C0C0E0F0F8FCE6E6E0B0B0B0808183838383878F9FBFE7E7868C8C8C","word":"","label":"player-frame1","flags":[]},{"gfx":"8080808084CCFCFCFCFCFCF8F0B0B0B080808080E1E1E1F1B99F9F8F8F8C8C8C","word":"","label":"","flags":[]},{"gfx":"D5D55555D5D55555D5D55555D5D555552A2AAAAA2A2AAAAA2A2AAAAA2A2AAAAA","word":"","label":"","flags":[]},{"gfx":"8080D4D0D0D0D4D45454D4D4D4D0808080808A8282828A8A8A0A0A8A8A828080","word":"pot","label":"","flags":[]},{"gfx":"8080808080D490948484A48494D080808080808080AA88A8A0A5A5A0A88A8080","word":"","label":"","flags":[]},{"gfx":"808080F8F89898989898989E9F9E80808080809F9F9898989898989E9F9E8080","word":"","label":"","flags":[]},{"gfx":"000000A0908884827E0A0A0A0000000000000000201008040785858500000000","word":"","label":"","flags":[]},{"gfx":"000014040414500000000000A888A8800000282020280A010101010195919580","word":"","label":"","flags":[]},{"gfx":"00008C92921C60105010781C0E070300000098A4A41C030504050F1C38706000","word":"","label":"","flags":[]},{"gfx":"000000004040000000D4D4ECECECD480000000000202010101AAAAB6B6B6AA80","word":"","label":"","flags":[]},{"gfx":"0000000000004828282828482800000000000000000004050505050405000000","word":"","label":"","flags":[]},{"flags":{"walkable":true},"word":"","label":"","gfx":"000000002020202020000A080808000000000000000000415111111111110100"},{"flags":[],"word":"","label":"","gfx":"00002028282A2A2A2820A0A0A0A0A08000000515155555151505858585858580"},{"flags":[],"word":"","label":"","gfx":"8080808080F8FCFC9C9CBCFEE6E6E68080808287878780818784848484848480"},{"flags":[],"word":"","label":"","gfx":"C0C0D0D0D4D4D4D5D5D080C0D0D4D4D08282828080828AAAAA8A8A8A82808282"},{"flags":{},"word":"","label":"stickbob","gfx":"E090B090A0C0A8D0D0A8C0E0B0988080838486848281958A8A958183868C8080"},{"flags":[],"word":"","label":"","gfx":"8080808080A0A8A8A0A0A0A8A8A8A08081818181818594948585859594948580"},{"flags":[],"word":"","label":"","gfx":"008AA88A000020282A0A0A0A2A28000000151115140505010000101014150500"},{"flags":[],"word":"","label":"","gfx":"000000002028381828282020202028000000000005151D191515040404041400"}],"levels":[{"loadword":"","objects":[{"y":8,"x":15,"advanced":false,"linkentity":"","func":"","name":"","linkword":"","steps":[{"character":"cat","lines":["I'm a cat.","","",""],"action":"say"},{"action":"say","character":"player","lines":["","Nice kitty!","",""]}]},{"x":5,"func":"","linkentity":"","y":8,"linkword":"","name":"","steps":[{"action":"say","character":"angryfish","lines":["","","Grr! Go away!",""]}]},{"x":13,"func":"","linkentity":"","y":4,"name":"","linkword":"","steps":[{"lines":["","Just another empty pot.","",""],"action":"say","character":"player"}]},{"x":12,"func":"","linkentity":"","y":4,"name":"","linkword":"","steps":[{"action":"disappear","character":"player","lines":["","","",""]},{"action":"say","character":"player","lines":["","Whoops, I broke it!","",""]}]},{"x":11,"func":"","linkentity":"","y":4,"linkword":"","name":"","steps":[{"lines":["","It's a plain old empty pot.","",""],"action":"say","character":"player"}]},{"x":14,"func":"","linkentity":"","y":4,"linkword":"","name":"","steps":[{"lines":["","Nothing special about these pots.","",""],"action":"say","character":"player"}]},{"x":15,"func":"","linkentity":"","y":4,"linkword":"","name":"","steps":[{"lines":["","This one has a million dollars","inside!!",""],"action":"say","character":"player"},{"lines":["","Oh, no, wait. That was just","a dust bunny.",""],"action":"say","character":"player"},{"lines":["","There's really nothing special","about this pot.",""],"action":"say","character":"player"},{"lines":["","Probably.","",""],"action":"say","character":"player"},{"condition":"has glasses","character":"snake","lines":["","There's a snake though.","",""],"action":"say"},{"condition":"has glasses","character":"glasses","lines":["","aaack!","",""],"action":"say"}]},{"func":"","x":20,"y":7,"steps":[{"position":1537,"character":"player","action":"warp","lines":["","","",""],"map":"map2"}]}],"player":{"y":4,"x":5},"tickword":"","moveword":"","map":"000000000000000000000000000000000000000000606060606060606060606060606060606060000060000000000000000000000000000000006000006000000000000000000000000000000000600000600000A00000000000000000004000000060600060000000000000000000000000000000000000006000000000000000000000000000000000606000600000000000000000000000000000000060000060000000000000000080808080800000006000006000000000000000000000000000000000600000606060606060606060606060606060606060000000000000000000000000000000000000000000"},{"loadword":"","map":"A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1000000A1A1A1A10000818181818181A1A1A10000000000A1A1A1000000818181628181A1A1A1000000000000A1A100000000818181818100A160600000000000000000000000000081000000A1000000000000000000C10000000000000000000060600000000000000000000000000000000000A1A1000081818100000000000000A1A100000000A1A10081818181810000000000A1A1A1A1000000A1A100818181818100000000A1A1A1A1A1A10000A1A10000008181000000000000A1A1A1A1A1E0A1A1A1A1A1A1A1A1A1A1A100A1A1A1A1A1A1A1A1A1A1","tickword":"","moveword":"","objects":[{"func":"","x":1,"y":7,"steps":[{"position":1554,"character":"player","action":"warp","lines":["","","",""],"map":"map1"}]},{"func":"","x":18,"y":2,"steps":[{"action":"say","character":"player","lines":["","Neat, it's a pair of 3D glasses!","I wonder what I can see with","these..."]},{"action":"disappear","character":"player","lines":["","","",""]},{"flag":"has glasses","character":"player","lines":["","","",""],"rhs":{"label":"","value":65535},"action":"set-flag"}]},{"func":"","x":10,"y":7,"steps":[{"lines":["","I am but a weary old man,","living alone in these woods.",""],"action":"say","character":"old man"},{"character":"player","lines":["","Cool story. Any words of wisdom","for me?",""],"action":"say"},{"character":"old man","lines":["","Not really.","",""],"action":"say"},{"action":"say","character":"glasses","lines":["Holy cow!!","","This \"old man\" is actually","an alien!!"],"condition":"has glasses"}]},{"func":"","x":20,"y":7,"steps":[{"position":1537,"character":"player","action":"warp","lines":["","","",""],"map":"map3"}]},{"func":"","x":10,"y":1,"steps":[{"position":2057,"character":"player","lines":["","","",""],"action":"warp","map":"map4"}]},{"func":"","x":16,"y":10,"steps":[{"action":"say","character":"charismatic frog","lines":["","Would you be my friend?","",""]},{"action":"say","character":"player","lines":["","OF COURSE!","",""]}]}]},{"loadword":"","objects":[{"func":"","x":1,"y":7,"steps":[{"position":1554,"character":"player","action":"warp","lines":["","","",""],"map":"map2"}]},{"func":"","x":9,"y":5,"steps":[{"character":"player","lines":["","This wood would be perfect to","build a bridge with!",""],"action":"say"},{"character":"player","lines":["","Haha, \"wood would\". Wood would","wood would.",""],"action":"say"},{"condition":"has scissors","character":"player","lines":["","Hey, I bet I could cut down this","tree with my cool time scissors!",""],"action":"say"},{"condition":"has scissors","character":"player","lines":["","","",""],"action":"disappear"},{"condition":"has scissors","character":"player","lines":["","Haha, awesome.","",""],"action":"say"},{"condition":"has scissors","flag":"has wood","action":"set-flag","lines":["","","",""],"rhs":{"label":"","value":65535},"character":"player"}]},{"func":"","x":15,"y":6,"steps":[{"character":"player","lines":["","If only there was some convenient","way to cross this ankle-deep","stream!"],"action":"say"},{"action":"say","character":"player","lines":["","Guess I'll just have to build a","raft and sail it across.",""],"condition":"has wood"},{"action":"disappear","character":"player","lines":["","","",""],"condition":"has wood"}]},{"func":"","x":6,"y":10,"steps":[{"lines":["","Badger badger badger badger","badger badger badger badger","badger badger badger badger"],"action":"say","character":"snake"},{"lines":["","A snake! A snake!","",""],"action":"say","character":"player"}]},{"func":"","x":17,"y":6,"steps":[{"action":"say","character":"charismatic frog","lines":["","Ribbit.","",""]},{"action":"say","character":"player","lines":["","I thought you'd be more","charismatic.",""]}]}],"tickword":"","moveword":"","map":"A1A1A1A1A1818181818181E1E181818181818181A1A1A1A18181818181818181E181818181818181A1A181818142810000008181E1E1818181000000A1000081818100000000818181E1E18181000000A100000000000000000000818181E181818100000000000000000000000000008181E18181810000A181810000000000000000000000E10062000000A181818181000000A10000818181E18181000000A1818181810000000000008181E1E18181000000A1A181818100000000818181E1E1818181818181A1A1A1818181000081818181E181818181818181A1A1A1A18181818181818181E181818181818181"},{"loadword":"","objects":[{"func":"","x":10,"y":6,"steps":[{"action":"say","character":"stick bob","lines":["","Would you like to hear a jig","and a reel?",""]},{"action":"say","character":"player","lines":["","Do you play the theremin?","",""]},{"action":"say","character":"stick bob","lines":["","I can play anything!","",""]}]},{"func":"","x":10,"y":10,"steps":[{"position":265,"character":"player","lines":["","","",""],"action":"warp","map":"map2"}]},{"func":"","x":13,"y":4,"steps":[{"action":"say","character":"player","lines":["","It's a fiddle. I promise.","I worked hard to draw it.",""]}]},{"func":"","x":7,"y":4,"steps":[{"action":"say","character":"player","lines":["","Scissors with a clock on them?","They're super sharp!",""]},{"action":"say","character":"player","lines":["","I'm sure they'll come in handy!","",""]},{"flag":"has scissors","action":"set-flag","lines":["","","",""],"rhs":{"label":"","value":65535},"character":"player"},{"action":"disappear","character":"player","lines":["","","",""]}]}],"tickword":"","moveword":"","map":"000000000000000000000000000000000000000000000000000000000000000000000000000000000000A1A1A1A1A1A1600060A1A1A1A1A1A10000000000606060606060600060606060606060000000000060C00000000000000000000000C060000000000060000000000000000000000000006000000000006000000000000002000000000000600000000000600000000000000000000000000060000000000060C00000210000000000220000C060000000000060606060606060606060606060606000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}],"flags":["has wood","has scissors","","has glasses"],"font":[{"flags":[],"gfx":"0000000000000000"},{"flags":[],"gfx":"081C1C1C08000800"},{"flags":[],"gfx":"3636241200000000"},{"flags":[],"gfx":"123F1212123F1200"},{"flags":[],"gfx":"083C0A1C281E0800"},{"flags":[],"gfx":"0026160834320000"},{"flags":[],"gfx":"0E1B1B062F1B3600"},{"flags":[],"gfx":"0C0C080400000000"},{"flags":[],"gfx":"180C0606060C1800"},{"flags":[],"gfx":"0C18303030180C00"},{"flags":[],"gfx":"082A1C081C2A0800"},{"flags":[],"gfx":"000C0C3F3F0C0C00"},{"flags":[],"gfx":"000000000C0C0804"},{"flags":[],"gfx":"0000001E1E000000"},{"flags":[],"gfx":"00000000000C0C00"},{"flags":[],"gfx":"002030180C060200"},{"flags":[],"gfx":"1C26263E26261C00"},{"flags":[],"gfx":"181C181818183C00"},{"flags":[],"gfx":"1C2620180C063E00"},{"flags":[],"gfx":"1C26201820261C00"},{"flags":[],"gfx":"2626263C30303000"},{"flags":[],"gfx":"3E061E2020201E00"},{"flags":[],"gfx":"1C26061E26261C00"},{"flags":[],"gfx":"3E2630180C0C0C00"},{"flags":[],"gfx":"1C26261C26261C00"},{"flags":[],"gfx":"1C26263C20201C00"},{"flags":[],"gfx":"000C0C000C0C0000"},{"flags":[],"gfx":"000C0C000C0C0804"},{"flags":[],"gfx":"30180C060C183000"},{"flags":[],"gfx":"00003E003E000000"},{"flags":[],"gfx":"060C1830180C0600"},{"flags":[],"gfx":"1C3630180C000C00"},{"flags":[],"gfx":"1E33212D3D011E00"},{"flags":[],"gfx":"1C3E26263E262600"},{"flags":[],"gfx":"1E26261E26261E00"},{"flags":[],"gfx":"1C26060606261C00"},{"flags":[],"gfx":"1E26262626261E00"},{"flags":[],"gfx":"3E06061E06063E00"},{"flags":[],"gfx":"3E06061E06060600"},{"flags":[],"gfx":"1C26063626263C00"},{"flags":[],"gfx":"2626263E26262600"},{"flags":[],"gfx":"3C18181818183C00"},{"flags":[],"gfx":"3C30303036361C00"},{"flags":[],"gfx":"2626261E26262600"},{"flags":[],"gfx":"0606060606063E00"},{"flags":[],"gfx":"373F2B2B23232300"},{"flags":[],"gfx":"26262E3626262600"},{"flags":[],"gfx":"1C26262626261C00"},{"flags":[],"gfx":"1E26261E06060600"},{"flags":[],"gfx":"1C26262626363C00"},{"flags":[],"gfx":"1E26261E26262600"},{"flags":[],"gfx":"3C26061C20221E00"},{"flags":[],"gfx":"3F0C0C0C0C0C0C00"},{"flags":[],"gfx":"2626262626261C00"},{"flags":[],"gfx":"2626261C1C1C0800"},{"flags":[],"gfx":"2323232B2B2A3600"},{"flags":[],"gfx":"2626261C26262600"},{"flags":[],"gfx":"2626261C18181800"},{"flags":[],"gfx":"3E3E30180C063E00"},{"flags":[],"gfx":"1C0C0C0C0C0C1C00"},{"flags":[],"gfx":"0002060C18302000"},{"flags":[],"gfx":"1C18181818181C00"},{"flags":[],"gfx":"081C260000000000"},{"flags":[],"gfx":"0000000000003E00"},{"flags":[],"gfx":"0C0C100000000000"}],"portraits":[{"gfx":"000000000000000000000000000000000000007C7C7E7E7E7E7E7E7E7E7E7E7E00000000707F7F7F7F7F7F7F7F7F7F7F7E7E7E7E7F7F7F7F7F7F7F7F7F7F7F7F0000000F0F1F1F1F1F1F1F1F1F1F1F1F000000000000000000000000000000001F1F1F1F7F7F7F7F7F7F7F7F7F7F7F7F00000000077F7F7F7F7F7F7F7F7F7F7F","label":"player","flags":[]},{"gfx":"00000000004040606060707070707070000000000000010103037F7F7F7F7F7F707060604000000000000000000000007F7F7F7F7F7F7800004040406060606000000000001018383C3C7F7F7F7F7F7F000000000000000000000000000000007F7F7F3F0F67717C7F7F7F7F7F7F7F7F00007C7E7F7F7F7F7F7F7F7F7F7F7F7F","label":"cat","flags":[]},{"gfx":"80808080808080808080D5818181858480808080808080808080AA80808080808484848484A4848484A48484848494D0809090D0D4F5D5D5D5D5D480808080AA80808080808080808080D5808080808080808080808080808080AAA0A0A0A888808080808AA8AAAAAA828080808080D588888888888889898888888888888A82","label":"angryfish","flags":[]},{"flags":[],"label":"old man","gfx":"0000000000000000000000000000000000000000000000707C7872737373736300000000303F3F3F7F7F7F7F7F7F7F7F0F7F7F7F7E7E7E7E7C7C79797979797300000000000000073F3F7F7F7F7F7F60000000000000000000000000000000000E7F3F3F3F3F7F7F7F7F7F7F7F3F1F1F00000000000000000004040C0C1C1E1F"},{"flags":[],"label":"stick bob","gfx":"808080808080808080A0A8E8E8F0F0F08080808080C0D4D5FDFFFFF3F1F1FFFFF0F0E0E0C08080808080808080808080FFFFF983FFBFBEFCF4D4D4D4D4D4D4D480808080808AAAABAFBFFFE7C7C7FFFF80808080808080808185858583838383FFFFCFE0FFFEBE8F8B8A8A8A8A8A8A8A83838383818080808080808080808080"},{"flags":[],"label":"snake","gfx":"000000000000808080808AA88A8080000000000000000014557155455054545000000020202020202020000000000000505455150505050505155554545040000000000000000000000202020202020200000000000000000000000000000000002020202000000000000002022A2A2A00000001010505051514141414150505"},{"flags":[],"label":"glasses","gfx":"000000000000000000000000000000000000007C7C7E7E7E7E555555757E7E7E00000000707F7F7F7F7F7F7F7F7F7F7F7E7E7E7E7F7F7F7F7F7F7F7F7F7F7F7F0000000F0F1F1F1F9FAAAAAAAB1F1F1F000000000000000000000000000000001F1F1F1F7F7F7F7F7F7F7F7F7F7F7F7F00000000077F7F7F7F7F7F7F7F7F7F7F"},{"flags":[],"label":"charismatic frog","gfx":"00000000000020202020202020202000000000005455555F47475555050055550000000000000000002820282028000054040404040404040405050505010000000000002A2A2A7A62622A2A2A002A2A000000000001050505050505050405012A20202020202020202020202000000000000000000000000015051505150000"}],"brushes":[{"mask":"FFFFFFFFFFFFFFFF","gfx":"D5D5D5D5D5D5D5D5","flags":[]},{"mask":"00008F8F8F000000","gfx":"00000A0A0A000000","flags":[]},{"mask":"0000BFBFBFBF0000","gfx":"0000AAAAAAAA0000","flags":[]},{"mask":"0000BCBCBC000000","gfx":"0000141414000000","flags":[]},{"mask":"0000BCBCBC000000","gfx":"0000949494000000","flags":[]},{"mask":"0000000C0C000000","gfx":"0000000C0C000000","flags":[]},{"mask":"00000C1E1E0C0000","flags":[],"gfx":"0000000000000000"},{"mask":"3E7F7F7F7F7F7F3E","gfx":"3E7F7F7F7F7F7F3E","flags":[]}]} \ No newline at end of file diff --git a/editor/8bitsy.fnl b/editor/8bitsy.fnl index f1256c6..c04df16 100644 --- a/editor/8bitsy.fnl +++ b/editor/8bitsy.fnl @@ -30,8 +30,8 @@ (let [maps (icollect [imap _ (ipairs files.game.levels)] (.. :map imap)) map (or action.map (. maps 1)) y (+ y style.padding.y) - map (dropdown view [:warp :map i] map maps x y 100) - (position-string y) (textbox view [:warp :loc i] (string.format "%x" (or action.position 0)) (+ x 150) y 150) + map (dropdown view [:warp :map i] map maps x y (* 100 SCALE)) + (position-string y) (textbox view [:warp :loc i] (string.format "%x" (or action.position 0)) (+ x (* 150 SCALE)) y (* 150 SCALE)) position (or (tonumber position-string 16) action.position)] (set action.map map) (set action.position position) @@ -47,13 +47,13 @@ (let [y (+ y style.padding.y) x (renderer.draw_text style.font "Set " x y style.text) flag (or action.flag (. files.game.flags 1)) - flag (dropdown view [:set-flag :flag i] flag files.game.flags x y 100) - x (renderer.draw_text style.font " to " (+ x 100) y style.text) + flag (dropdown view [:set-flag :flag i] flag files.game.flags x y (* 100 SCALE)) + x (renderer.draw_text style.font " to " (+ x (* 100 SCALE)) y style.text) options (lume.concat [{:label "" :value 0xffff} {:label "" :value 0}] (icollect [_ flag (ipairs files.game.flags)] {:label flag :value (.. :cond- flag)})) rhs (or action.rhs (. options 1)) - (rhs y) (dropdown view [:set-flag :rhs i] rhs options x y 100)] + (rhs y) (dropdown view [:set-flag :rhs i] rhs options x y (* 100 SCALE))] (set action.flag flag) (set action.rhs rhs) y)) diff --git a/editor/imstate.fnl b/editor/imstate.fnl index e8ae68f..8192b0c 100644 --- a/editor/imstate.fnl +++ b/editor/imstate.fnl @@ -102,10 +102,10 @@ (values (button view label x y w h) (+ y h))) (fn checkbox [view name isset x y ?tag] - (love.graphics.rectangle (if isset :fill :line) x y 12 12) - (local xEnd (renderer.draw_text style.font name (+ x 16) y style.text)) + (love.graphics.rectangle (if isset :fill :line) x y (* 12 SCALE) (* 12 SCALE)) + (local xEnd (renderer.draw_text style.font name (+ x (* 16 SCALE)) y style.text)) (love.graphics.setColor 1 1 1 1) - (button view (or ?tag name) x y (- xEnd x) 12)) + (button view (or ?tag name) x y (- xEnd x) (* 12 SCALE))) (fn focused? [view tag] (= (make-tag tag) (-?> view.imstate.focus (. :tag)))) (fn focus [view tag x y w h opts] diff --git a/editor/mapedit.fnl b/editor/mapedit.fnl index 0e286f9..0c218b7 100644 --- a/editor/mapedit.fnl +++ b/editor/mapedit.fnl @@ -66,7 +66,7 @@ level-count (length files.game.levels) _ (do (for [i 1 level-count] (tset options i i)) (table.insert options :New)) - (ilevel yNext) (dropdown self :map-selector self.ilevel options (+ x 50) y 100)] + (ilevel yNext) (dropdown self :map-selector self.ilevel options (+ x (* 50 SCALE)) y (* 100 SCALE))] (when (not= ilevel self.ilevel) (set self.ilevel (if (= ilevel :New) (+ level-count 1) ilevel)) (self:load-level)) @@ -170,13 +170,13 @@ (var istep-to-delete nil) (when (not object.steps) (set object.steps [])) (each [istep step (ipairs object.steps)] - (when (textbutton self "X" (+ x 280) y) + (when (textbutton self "X" (+ x (* 280 SCALE)) y) (set istep-to-delete istep)) (set step.condition (. (dropdown self [:code-condition istep] (condition-label step.condition) (condition-options) - (+ x 100 style.padding.x) y 100) + (+ x (* 100 SCALE) style.padding.x) y (* 100 SCALE)) :flag)) - (set (step.action y) (dropdown self [:code-action istep] (or step.action (. actions.actionlist 1)) actions.actionlist x y 100)) - (set y (actions.edit step self x y 300 istep)) + (set (step.action y) (dropdown self [:code-action istep] (or step.action (. actions.actionlist 1)) actions.actionlist x y (* 100 SCALE))) + (set y (actions.edit step self x y (* 300 SCALE) istep)) (set y (+ y style.padding.y))) (when istep-to-delete (table.remove object.steps istep-to-delete)) (let [(do-new y) (textbutton self "+ New Step" x (+ y style.padding.y))] @@ -190,11 +190,11 @@ (not= object.func nil)))) (fn MapEditView.draw-object-advanced-editor [self object x y] - (let [(func y) (textfield self "Word" object.func x y 100 200) - (name y) (textfield self "Name" object.name x (+ y style.padding.y) 100 200) - (linkword y) (textfield self "Link word" object.linkword x (+ y style.padding.y) 100 200) + (let [(func y) (textfield self "Word" object.func x y (* 100 SCALE) (* 200 SCALE)) + (name y) (textfield self "Name" object.name x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE)) + (linkword y) (textfield self "Link word" object.linkword x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE)) (do-unlink y) (if object.link (textbutton self "Unlink" x (+ y style.padding.y)) (values false y)) - (linkentity y) (if object.link (values object.linkentity y) (textfield self "Link entity" object.linkentity x (+ y style.padding.y) 100 200))] + (linkentity y) (if object.link (values object.linkentity y) (textfield self "Link entity" object.linkentity x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE)))] (lume.extend object {: func : name : linkword : linkentity}) (when do-unlink (set object.link nil)) y)) @@ -204,10 +204,10 @@ y (if (advanced? object) (self:draw-object-advanced-editor object x y) (self:draw-object-code-editor object x y)) - new-flag-name (textbox self :new-flag-name self.new-flag-name x (+ y style.padding.y) 200) - (mk-new-flag y) (textbutton self "+ New Flag" (+ x 200 style.padding.x) (+ y style.padding.y)) - do-delete (textbutton self "Delete" x (+ y 40)) - (do-advanced y) (textbutton self (if (advanced? object) "Simple" "Advanced") (+ x 150) (+ y 40))] + new-flag-name (textbox self :new-flag-name self.new-flag-name x (+ y style.padding.y) (* 200 SCALE)) + (mk-new-flag y) (textbutton self "+ New Flag" (+ x (* 200 SCALE) style.padding.x) (+ y style.padding.y)) + do-delete (textbutton self "Delete" x (+ y (* style.padding.y 2))) + (do-advanced y) (textbutton self (if (advanced? object) "Simple" "Advanced") (+ x (* 150 SCALE)) (+ y (* style.padding.y 2)))] (set self.new-flag-name new-flag-name) (when mk-new-flag (when (= files.game.flags nil) @@ -237,14 +237,16 @@ (self:draw_background style.background) (self:draw_scrollbar) (local ytop y) + (local editor-on-side (> self.size.x (+ (* tilew mapw) (* 300 SCALE)))) (set y (+ y (self:draw-map-selector x y) style.padding.y)) (self:draw-map-editor x y) (set y (+ y (* tileh maph) style.padding.y)) - (set y (+ y (self:draw-tile-selector x y (- self.size.x (* style.padding.x 2))))) + (set y (+ y (self:draw-tile-selector x y (if editor-on-side (* tilew mapw) + (- self.size.x (* style.padding.x 2)))))) - (set (self.level.tickword y) (textfield self "Tick word" self.level.tickword x (+ y style.padding.y) 100 200)) - (set (self.level.moveword y) (textfield self "Move word" self.level.moveword x (+ y style.padding.y) 100 200)) - (set (self.level.loadword y) (textfield self "Load word" self.level.loadword x (+ y style.padding.y) 100 200)) + (set (self.level.tickword y) (textfield self "Tick word" self.level.tickword x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE))) + (set (self.level.moveword y) (textfield self "Move word" self.level.moveword x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE))) + (set (self.level.loadword y) (textfield self "Load word" self.level.loadword x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE))) (let [(checked y-new) (checkbox self "Edit objects" (= self.itile nil) x (+ y style.padding.y)) _ (when checked (set self.itile nil) @@ -261,11 +263,11 @@ (when checked (tset self.level levelflag (not (. self.level levelflag)))) (set y y-new))) (when self.iobject - (set y (math.max y (if (> self.size.x (+ (* tilew mapw) 300)) + (set y (math.max y (if editor-on-side (self:draw-object-editor (+ x (* tilew mapw) style.padding.x) ytop) (self:draw-object-editor x (+ y style.padding.y)))))) - (set self.scrollheight (- y (+ self.position.y style.padding.y (- self.scroll.y))))) + (set self.scrollheight (+ y (- self.position.y) self.scroll.y style.padding.y))) (fn MapEditView.get_name [self] (.. "Map " self.ilevel)) diff --git a/editor/tileedit.fnl b/editor/tileedit.fnl index 049d5bc..f274d42 100644 --- a/editor/tileedit.fnl +++ b/editor/tileedit.fnl @@ -74,16 +74,18 @@ (fn TileView.draw-tile-flag [self flagname x y] (local flags (-?> self.tilecache.tiles (. self.itile) (. :flags))) (local flagset (if flags (. flags flagname) false)) - (when (checkbox self flagname flagset x y) - (tset flags flagname (if flagset nil true)))) + (let [(checked yNew) (checkbox self flagname flagset x y)] + (when checked (tset flags flagname (if flagset nil true))) + yNew)) (fn TileView.draw-tile-flags [self x y] (local tile (-?> self.tilecache.tiles (. self.itile))) + (var y y) (when tile - (set tile.word (textfield self "Default word" tile.word x y 100 200)) - (set tile.label (textfield self "Label" tile.label x (+ y pixel-size 4) 100 200))) + (set (tile.word y) (textfield self "Default word" tile.word x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE))) + (set (tile.label y) (textfield self "Label" tile.label x (+ y style.padding.y) (* 100 SCALE) (* 200 SCALE)))) (each [iflag flagname (ipairs (tiles.flags))] - (self:draw-tile-flag flagname x (+ y (* (+ iflag 1) (+ pixel-size 4)))))) + (set y (self:draw-tile-flag flagname x (+ y style.padding.y))))) (fn TileView.update-tile [self newtile] (self.tilecache:update-tile self.itile newtile self.tilekey)) diff --git a/presentation/commands.fnl b/presentation/commands.fnl index 2446b9e..43b3785 100644 --- a/presentation/commands.fnl +++ b/presentation/commands.fnl @@ -2,11 +2,14 @@ (local core (require :core)) (local command (require :core.command)) (local keymap (require :core.keymap)) +(local style (require :core.style)) (local SlideshowView (require :presentation.engine)) (fn set-scale [multiplier] (set _G.SCALE (* (love.graphics.getDPIScale) multiplier)) - (util.hotswap :core.style)) + (util.hotswap :core.style) + (when (= multiplier 1) + (set style.code_font (renderer.font.load (.. EXEDIR "/data/fonts/monospace.ttf") 15)))) (command.add nil { "presentation:start" (fn [] diff --git a/presentation/pics/bsod.png b/presentation/pics/bsod.png new file mode 100644 index 0000000..1ce057a Binary files /dev/null and b/presentation/pics/bsod.png differ diff --git a/presentation/slides.fnl b/presentation/slides.fnl index 0ffecb3..4b0b6c1 100644 --- a/presentation/slides.fnl +++ b/presentation/slides.fnl @@ -42,9 +42,9 @@ (when ?split (core.set_active_view focused-view)) ; don't switch focus #(view-cleanup view))) -(fn openview [f ?split] {:action #(split-and-open f ?split)}) -(fn openfile [filename ?split] - (openview #(core.root_view:open_doc (core.open_doc filename)) ?split)) +(fn openview [f ?extra] (lume.merge {:action #(split-and-open f $1.split)} (or ?extra {}))) +(fn openfile [filename ?extra] + (openview #(core.root_view:open_doc (core.open_doc filename)) ?extra)) (parse [ [h "" "" "" @@ -78,7 +78,7 @@ "* How can I leverage emulation?"] [h "Step 1: Assembler" ** "Represent instructions using Fennel data literals" - (openfile :asm/asm.fnl :right) + (openfile :asm/asm.fnl {:split :right}) " [:lda 0xff]" "Represent labels with Fennel strings" " :loop [:bne :loop]" @@ -128,5 +128,35 @@ "Map editor" (openview #(MapEditView)) "Screen editor" - (lume.merge (openview #(ScreenEditView :neuttower/title.screen)) {:pause-after true})] + (openview #(ScreenEditView :neuttower/title.screen) {:pause-after true}) + (openfile :presentation/slides.fnl {:split :right :line 133}) + "Presentation viewer!?"] + [h "Editing Editors With My Editor" + ** "Lua provides a very dynamic environment that allows me tremendous flexibility" + (openview #(MapEditView)) + (openfile :editor/mapedit.fnl {:split :right}) + "Downside:" + {:image "presentation/pics/bsod.png" :justify :center :pause-after true}] + [h "Step 4: Emulator Integration" + ** "Directly inspired by Dagen Brock's 2016 KFest talk on GSPlus" + "Ended up using MAME - has a full Lua plugin system" + "What if I could poke my program directly into an emulator's memory?" + "What if I could preserve the current runtime state but rewrite the code?" + "... even if the data has moved?" + "What if I could interactively try out new code while my game was running?"] + [h "Step 5: Running on Hardware" + ** "I have a IIgs with a serial cable - I can poke bytes in directly from the monitor" + "]IN#2\n]PR#2\n]CALL-151" + "Easy to send bytes faster than the monitor can process them"] + [h "Audio" + ** "I have a II+ with a cassette port" + "LÖVE2D is a game engine - my editor can generate audio and play it back immediately" + "Need to generate a BASIC program to bootstrap my machine code" + (openfile :asm/tape.fnl {:split :right}) + " [:basic [10 :call :2061]]" + "Future work: Apple Game Server fastloader"] + [h "ProDOS" + ** "Eventually we'll want a disk image for release"] + + ])