From 8905ed98cbb372fb1eac5948891e5a1294766a99 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 30 Jun 2017 00:05:27 -0400 Subject: [PATCH 1/4] reorganize directory structure to better understand codebase --- .DS_Store | Bin 0 -> 6148 bytes GARBAGE.txt | 48 -------- README | 3 - README.md | 105 ++++++++++++++++++ THANKS | 3 - build.sh | 2 +- conf.lua | 27 ----- differences.txt | 36 ------ garbage.py | 15 --- {V3PdP source => ref}/Game.vc | 0 ...ngine before emulation of the crazy bug.vc | 0 {V3PdP source => ref}/engine.vc | 0 {V3PdP source => ref}/graphics.vc | 0 {V3PdP source => ref}/input.vc | 0 {V3PdP source => ref}/sound.vc | 0 {V3PdP source => ref}/stage.vc | 0 {V3PdP source => ref}/stage_Lakitu.vc | 0 {V3PdP source => ref}/stage_Yoshi.vc | 0 {V3PdP source => ref}/system.vc | 0 {V3PdP source => ref}/title.vc | 0 server.py => script/server.py | 0 src/.DS_Store | Bin 0 -> 6148 bytes {assets => src/assets}/blueend10.png | Bin {assets => src/assets}/blueend11.png | Bin {assets => src/assets}/blueface1.png | Bin {assets => src/assets}/bluemid1.png | Bin {assets => src/assets}/bluepop.png | Bin {assets => src/assets}/chain00.png | Bin {assets => src/assets}/chain02.png | Bin {assets => src/assets}/chain03.png | Bin {assets => src/assets}/chain04.png | Bin {assets => src/assets}/chain05.png | Bin {assets => src/assets}/chain06.png | Bin {assets => src/assets}/chain07.png | Bin {assets => src/assets}/chain08.png | Bin {assets => src/assets}/chain09.png | Bin {assets => src/assets}/chain10.png | Bin {assets => src/assets}/chain11.png | Bin {assets => src/assets}/chain12.png | Bin {assets => src/assets}/chain13.png | Bin {assets => src/assets}/chain14.png | Bin {assets => src/assets}/chain15.png | Bin {assets => src/assets}/chain16.png | Bin {assets => src/assets}/chain17.png | Bin {assets => src/assets}/chain18.png | Bin {assets => src/assets}/chain19.png | Bin {assets => src/assets}/combo04.png | Bin {assets => src/assets}/combo05.png | Bin {assets => src/assets}/combo06.png | Bin {assets => src/assets}/combo07.png | Bin {assets => src/assets}/combo08.png | Bin {assets => src/assets}/combo09.png | Bin {assets => src/assets}/combo10.png | Bin {assets => src/assets}/combo11.png | Bin {assets => src/assets}/combo12.png | Bin {assets => src/assets}/combo13.png | Bin {assets => src/assets}/combo14.png | Bin {assets => src/assets}/combo15.png | Bin {assets => src/assets}/combo16.png | Bin {assets => src/assets}/combo17.png | Bin {assets => src/assets}/combo18.png | Bin {assets => src/assets}/combo19.png | Bin {assets => src/assets}/combo20.png | Bin {assets => src/assets}/combo21.png | Bin {assets => src/assets}/combo22.png | Bin {assets => src/assets}/combo23.png | Bin {assets => src/assets}/combo24.png | Bin {assets => src/assets}/combo25.png | Bin {assets => src/assets}/combo26.png | Bin {assets => src/assets}/combo27.png | Bin {assets => src/assets}/combo28.png | Bin {assets => src/assets}/combo29.png | Bin {assets => src/assets}/combo30.png | Bin {assets => src/assets}/combo31.png | Bin {assets => src/assets}/combo32.png | Bin {assets => src/assets}/combo33.png | Bin {assets => src/assets}/combo34.png | Bin {assets => src/assets}/combo35.png | Bin {assets => src/assets}/combo36.png | Bin {assets => src/assets}/combo37.png | Bin {assets => src/assets}/combo38.png | Bin {assets => src/assets}/combo39.png | Bin {assets => src/assets}/combo40.png | Bin {assets => src/assets}/combo41.png | Bin {assets => src/assets}/combo42.png | Bin {assets => src/assets}/combo43.png | Bin {assets => src/assets}/combo44.png | Bin {assets => src/assets}/combo45.png | Bin {assets => src/assets}/combo46.png | Bin {assets => src/assets}/combo47.png | Bin {assets => src/assets}/combo48.png | Bin {assets => src/assets}/combo49.png | Bin {assets => src/assets}/combo50.png | Bin {assets => src/assets}/combo51.png | Bin {assets => src/assets}/combo52.png | Bin {assets => src/assets}/combo53.png | Bin {assets => src/assets}/combo54.png | Bin {assets => src/assets}/combo55.png | Bin {assets => src/assets}/combo56.png | Bin {assets => src/assets}/combo57.png | Bin {assets => src/assets}/combo58.png | Bin {assets => src/assets}/combo59.png | Bin {assets => src/assets}/combo60.png | Bin {assets => src/assets}/combo61.png | Bin {assets => src/assets}/combo62.png | Bin {assets => src/assets}/combo63.png | Bin {assets => src/assets}/combo64.png | Bin {assets => src/assets}/combo65.png | Bin {assets => src/assets}/combo66.png | Bin {assets => src/assets}/cur0.png | Bin {assets => src/assets}/cur1.png | Bin {assets => src/assets}/elias/bot.png | Bin {assets => src/assets}/elias/botleft.png | Bin {assets => src/assets}/elias/botright.png | Bin {assets => src/assets}/elias/doubleface.png | Bin {assets => src/assets}/elias/face.png | Bin {assets => src/assets}/elias/filler1.png | Bin {assets => src/assets}/elias/filler2.png | Bin {assets => src/assets}/elias/flash.png | Bin {assets => src/assets}/elias/left.png | Bin {assets => src/assets}/elias/pop.png | Bin {assets => src/assets}/elias/portrait.png | Bin {assets => src/assets}/elias/right.png | Bin {assets => src/assets}/elias/top.png | Bin {assets => src/assets}/elias/topleft.png | Bin {assets => src/assets}/elias/topright.png | Bin {assets => src/assets}/flare/bot.png | Bin {assets => src/assets}/flare/botleft.png | Bin {assets => src/assets}/flare/botright.png | Bin {assets => src/assets}/flare/doubleface.png | Bin {assets => src/assets}/flare/face.png | Bin {assets => src/assets}/flare/filler1.png | Bin {assets => src/assets}/flare/filler2.png | Bin {assets => src/assets}/flare/flash.png | Bin {assets => src/assets}/flare/left.png | Bin {assets => src/assets}/flare/pop.png | Bin {assets => src/assets}/flare/portrait.png | Bin {assets => src/assets}/flare/right.png | Bin {assets => src/assets}/flare/top.png | Bin {assets => src/assets}/flare/topleft.png | Bin {assets => src/assets}/flare/topright.png | Bin {assets => src/assets}/frame.png | Bin {assets => src/assets}/garbage.png | Bin {assets => src/assets}/garbageflash.png | Bin {assets => src/assets}/lip/bot.png | Bin {assets => src/assets}/lip/botleft.png | Bin {assets => src/assets}/lip/botright.png | Bin {assets => src/assets}/lip/doubleface.png | Bin {assets => src/assets}/lip/face.png | Bin {assets => src/assets}/lip/filler1.png | Bin {assets => src/assets}/lip/filler2.png | Bin {assets => src/assets}/lip/flash.png | Bin {assets => src/assets}/lip/left.png | Bin {assets => src/assets}/lip/pop.png | Bin {assets => src/assets}/lip/portrait.png | Bin {assets => src/assets}/lip/right.png | Bin {assets => src/assets}/lip/top.png | Bin {assets => src/assets}/lip/topleft.png | Bin {assets => src/assets}/lip/topright.png | Bin {assets => src/assets}/metalend0.png | Bin {assets => src/assets}/metalend1.png | Bin {assets => src/assets}/metalmid.png | Bin {assets => src/assets}/neris/bot.png | Bin {assets => src/assets}/neris/botleft.png | Bin {assets => src/assets}/neris/botright.png | Bin {assets => src/assets}/neris/doubleface.png | Bin {assets => src/assets}/neris/face.png | Bin {assets => src/assets}/neris/filler1.png | Bin {assets => src/assets}/neris/filler2.png | Bin {assets => src/assets}/neris/flash.png | Bin {assets => src/assets}/neris/left.png | Bin {assets => src/assets}/neris/pop.png | Bin {assets => src/assets}/neris/portrait.png | Bin {assets => src/assets}/neris/right.png | Bin {assets => src/assets}/neris/top.png | Bin {assets => src/assets}/neris/topleft.png | Bin {assets => src/assets}/neris/topright.png | Bin {assets => src/assets}/panel00.png | Bin {assets => src/assets}/panel11.png | Bin {assets => src/assets}/panel12.png | Bin {assets => src/assets}/panel13.png | Bin {assets => src/assets}/panel14.png | Bin {assets => src/assets}/panel15.png | Bin {assets => src/assets}/panel16.png | Bin {assets => src/assets}/panel17.png | Bin {assets => src/assets}/panel21.png | Bin {assets => src/assets}/panel22.png | Bin {assets => src/assets}/panel23.png | Bin {assets => src/assets}/panel24.png | Bin {assets => src/assets}/panel25.png | Bin {assets => src/assets}/panel26.png | Bin {assets => src/assets}/panel27.png | Bin {assets => src/assets}/panel31.png | Bin {assets => src/assets}/panel32.png | Bin {assets => src/assets}/panel33.png | Bin {assets => src/assets}/panel34.png | Bin {assets => src/assets}/panel35.png | Bin {assets => src/assets}/panel36.png | Bin {assets => src/assets}/panel37.png | Bin {assets => src/assets}/panel41.png | Bin {assets => src/assets}/panel42.png | Bin {assets => src/assets}/panel43.png | Bin {assets => src/assets}/panel44.png | Bin {assets => src/assets}/panel45.png | Bin {assets => src/assets}/panel46.png | Bin {assets => src/assets}/panel47.png | Bin {assets => src/assets}/panel51.png | Bin {assets => src/assets}/panel52.png | Bin {assets => src/assets}/panel53.png | Bin {assets => src/assets}/panel54.png | Bin {assets => src/assets}/panel55.png | Bin {assets => src/assets}/panel56.png | Bin {assets => src/assets}/panel57.png | Bin {assets => src/assets}/panel61.png | Bin {assets => src/assets}/panel62.png | Bin {assets => src/assets}/panel63.png | Bin {assets => src/assets}/panel64.png | Bin {assets => src/assets}/panel65.png | Bin {assets => src/assets}/panel66.png | Bin {assets => src/assets}/panel67.png | Bin {assets => src/assets}/panel71.png | Bin {assets => src/assets}/panel72.png | Bin {assets => src/assets}/panel73.png | Bin {assets => src/assets}/panel74.png | Bin {assets => src/assets}/panel75.png | Bin {assets => src/assets}/panel76.png | Bin {assets => src/assets}/panel77.png | Bin {assets => src/assets}/panel81.png | Bin {assets => src/assets}/panel82.png | Bin {assets => src/assets}/panel83.png | Bin {assets => src/assets}/panel84.png | Bin {assets => src/assets}/panel85.png | Bin {assets => src/assets}/panel86.png | Bin {assets => src/assets}/panel87.png | Bin {assets => src/assets}/redend10.png | Bin {assets => src/assets}/redend11.png | Bin {assets => src/assets}/redface1.png | Bin {assets => src/assets}/redmid1.png | Bin {assets => src/assets}/redpop.png | Bin {assets => src/assets}/ruby/bot.png | Bin {assets => src/assets}/ruby/botleft.png | Bin {assets => src/assets}/ruby/botright.png | Bin {assets => src/assets}/ruby/doubleface.png | Bin {assets => src/assets}/ruby/face.png | Bin {assets => src/assets}/ruby/filler1.png | Bin {assets => src/assets}/ruby/filler2.png | Bin {assets => src/assets}/ruby/flash.png | Bin {assets => src/assets}/ruby/left.png | Bin {assets => src/assets}/ruby/pop.png | Bin {assets => src/assets}/ruby/portrait.png | Bin {assets => src/assets}/ruby/right.png | Bin {assets => src/assets}/ruby/top.png | Bin {assets => src/assets}/ruby/topleft.png | Bin {assets => src/assets}/ruby/topright.png | Bin {assets => src/assets}/seren/bot.png | Bin {assets => src/assets}/seren/botleft.png | Bin {assets => src/assets}/seren/botright.png | Bin {assets => src/assets}/seren/doubleface.png | Bin {assets => src/assets}/seren/face.png | Bin {assets => src/assets}/seren/filler1.png | Bin {assets => src/assets}/seren/filler2.png | Bin {assets => src/assets}/seren/flash.png | Bin {assets => src/assets}/seren/left.png | Bin {assets => src/assets}/seren/pop.png | Bin {assets => src/assets}/seren/portrait.png | Bin {assets => src/assets}/seren/right.png | Bin {assets => src/assets}/seren/top.png | Bin {assets => src/assets}/seren/topleft.png | Bin {assets => src/assets}/seren/topright.png | Bin {assets => src/assets}/sherbet/bot.png | Bin {assets => src/assets}/sherbet/botleft.png | Bin {assets => src/assets}/sherbet/botright.png | Bin {assets => src/assets}/sherbet/doubleface.png | Bin {assets => src/assets}/sherbet/face.png | Bin {assets => src/assets}/sherbet/filler1.png | Bin {assets => src/assets}/sherbet/filler2.png | Bin {assets => src/assets}/sherbet/flash.png | Bin {assets => src/assets}/sherbet/left.png | Bin {assets => src/assets}/sherbet/pop.png | Bin {assets => src/assets}/sherbet/portrait.png | Bin {assets => src/assets}/sherbet/right.png | Bin {assets => src/assets}/sherbet/top.png | Bin {assets => src/assets}/sherbet/topleft.png | Bin {assets => src/assets}/sherbet/topright.png | Bin {assets => src/assets}/thiana/bot.png | Bin {assets => src/assets}/thiana/botleft.png | Bin {assets => src/assets}/thiana/botright.png | Bin {assets => src/assets}/thiana/doubleface.png | Bin {assets => src/assets}/thiana/face.png | Bin {assets => src/assets}/thiana/filler1.png | Bin {assets => src/assets}/thiana/filler2.png | Bin {assets => src/assets}/thiana/flash.png | Bin {assets => src/assets}/thiana/left.png | Bin {assets => src/assets}/thiana/pop.png | Bin {assets => src/assets}/thiana/portrait.png | Bin {assets => src/assets}/thiana/right.png | Bin {assets => src/assets}/thiana/top.png | Bin {assets => src/assets}/thiana/topleft.png | Bin {assets => src/assets}/thiana/topright.png | Bin {assets => src/assets}/wall.png | Bin {assets => src/assets}/windy/bot.png | Bin {assets => src/assets}/windy/botleft.png | Bin {assets => src/assets}/windy/botright.png | Bin {assets => src/assets}/windy/doubleface.png | Bin {assets => src/assets}/windy/face.png | Bin {assets => src/assets}/windy/filler1.png | Bin {assets => src/assets}/windy/filler2.png | Bin {assets => src/assets}/windy/flash.png | Bin {assets => src/assets}/windy/left.png | Bin {assets => src/assets}/windy/pop.png | Bin {assets => src/assets}/windy/portrait.png | Bin {assets => src/assets}/windy/right.png | Bin {assets => src/assets}/windy/top.png | Bin {assets => src/assets}/windy/topleft.png | Bin {assets => src/assets}/windy/topright.png | Bin src/conf.lua | 27 +++++ puzzles.lua => src/data/puzzles.lua | 0 engine.lua => src/engine/engine.lua | 0 gen_panels.lua => src/engine/gen_panels.lua | 1 - globals.lua => src/engine/globals.lua | 0 graphics.lua => src/engine/graphics.lua | 17 +-- input.lua => src/engine/input.lua | 0 mainloop.lua => src/engine/mainloop.lua | 10 +- network.lua => src/engine/network.lua | 0 REALLYBAD.txt => src/engine/nextplay.txt | 0 save.lua => src/engine/save.lua | 0 class.lua => src/lib/class.lua | 0 dkjson.lua => src/lib/dkjson.lua | 0 facktabs.lua => src/lib/facktabs.lua | 0 queue.lua => src/lib/queue.lua | 0 stridx.lua => src/lib/stridx.lua | 0 util.lua => src/lib/util.lua | 0 main.lua => src/main.lua | 29 +++-- server.lua => src/server.lua | 23 ++-- 334 files changed, 176 insertions(+), 170 deletions(-) create mode 100644 .DS_Store delete mode 100644 GARBAGE.txt delete mode 100644 README create mode 100644 README.md delete mode 100644 THANKS delete mode 100644 conf.lua delete mode 100644 differences.txt delete mode 100644 garbage.py rename {V3PdP source => ref}/Game.vc (100%) rename {V3PdP source => ref}/engine before emulation of the crazy bug.vc (100%) rename {V3PdP source => ref}/engine.vc (100%) rename {V3PdP source => ref}/graphics.vc (100%) rename {V3PdP source => ref}/input.vc (100%) rename {V3PdP source => ref}/sound.vc (100%) rename {V3PdP source => ref}/stage.vc (100%) rename {V3PdP source => ref}/stage_Lakitu.vc (100%) rename {V3PdP source => ref}/stage_Yoshi.vc (100%) rename {V3PdP source => ref}/system.vc (100%) rename {V3PdP source => ref}/title.vc (100%) rename server.py => script/server.py (100%) create mode 100644 src/.DS_Store rename {assets => src/assets}/blueend10.png (100%) rename {assets => src/assets}/blueend11.png (100%) rename {assets => src/assets}/blueface1.png (100%) rename {assets => src/assets}/bluemid1.png (100%) rename {assets => src/assets}/bluepop.png (100%) rename {assets => src/assets}/chain00.png (100%) rename {assets => src/assets}/chain02.png (100%) rename {assets => src/assets}/chain03.png (100%) rename {assets => src/assets}/chain04.png (100%) rename {assets => src/assets}/chain05.png (100%) rename {assets => src/assets}/chain06.png (100%) rename {assets => src/assets}/chain07.png (100%) rename {assets => src/assets}/chain08.png (100%) rename {assets => src/assets}/chain09.png (100%) rename {assets => src/assets}/chain10.png (100%) rename {assets => src/assets}/chain11.png (100%) rename {assets => src/assets}/chain12.png (100%) rename {assets => src/assets}/chain13.png (100%) rename {assets => src/assets}/chain14.png (100%) rename {assets => src/assets}/chain15.png (100%) rename {assets => src/assets}/chain16.png (100%) rename {assets => src/assets}/chain17.png (100%) rename {assets => src/assets}/chain18.png (100%) rename {assets => src/assets}/chain19.png (100%) rename {assets => src/assets}/combo04.png (100%) rename {assets => src/assets}/combo05.png (100%) rename {assets => src/assets}/combo06.png (100%) rename {assets => src/assets}/combo07.png (100%) rename {assets => src/assets}/combo08.png (100%) rename {assets => src/assets}/combo09.png (100%) rename {assets => src/assets}/combo10.png (100%) rename {assets => src/assets}/combo11.png (100%) rename {assets => src/assets}/combo12.png (100%) rename {assets => src/assets}/combo13.png (100%) rename {assets => src/assets}/combo14.png (100%) rename {assets => src/assets}/combo15.png (100%) rename {assets => src/assets}/combo16.png (100%) rename {assets => src/assets}/combo17.png (100%) rename {assets => src/assets}/combo18.png (100%) rename {assets => src/assets}/combo19.png (100%) rename {assets => src/assets}/combo20.png (100%) rename {assets => src/assets}/combo21.png (100%) rename {assets => src/assets}/combo22.png (100%) rename {assets => src/assets}/combo23.png (100%) rename {assets => src/assets}/combo24.png (100%) rename {assets => src/assets}/combo25.png (100%) rename {assets => src/assets}/combo26.png (100%) rename {assets => src/assets}/combo27.png (100%) rename {assets => src/assets}/combo28.png (100%) rename {assets => src/assets}/combo29.png (100%) rename {assets => src/assets}/combo30.png (100%) rename {assets => src/assets}/combo31.png (100%) rename {assets => src/assets}/combo32.png (100%) rename {assets => src/assets}/combo33.png (100%) rename {assets => src/assets}/combo34.png (100%) rename {assets => src/assets}/combo35.png (100%) rename {assets => src/assets}/combo36.png (100%) rename {assets => src/assets}/combo37.png (100%) rename {assets => src/assets}/combo38.png (100%) rename {assets => src/assets}/combo39.png (100%) rename {assets => src/assets}/combo40.png (100%) rename {assets => src/assets}/combo41.png (100%) rename {assets => src/assets}/combo42.png (100%) rename {assets => src/assets}/combo43.png (100%) rename {assets => src/assets}/combo44.png (100%) rename {assets => src/assets}/combo45.png (100%) rename {assets => src/assets}/combo46.png (100%) rename {assets => src/assets}/combo47.png (100%) rename {assets => src/assets}/combo48.png (100%) rename {assets => src/assets}/combo49.png (100%) rename {assets => src/assets}/combo50.png (100%) rename {assets => src/assets}/combo51.png (100%) rename {assets => src/assets}/combo52.png (100%) rename {assets => src/assets}/combo53.png (100%) rename {assets => src/assets}/combo54.png (100%) rename {assets => src/assets}/combo55.png (100%) rename {assets => src/assets}/combo56.png (100%) rename {assets => src/assets}/combo57.png (100%) rename {assets => src/assets}/combo58.png (100%) rename {assets => src/assets}/combo59.png (100%) rename {assets => src/assets}/combo60.png (100%) rename {assets => src/assets}/combo61.png (100%) rename {assets => src/assets}/combo62.png (100%) rename {assets => src/assets}/combo63.png (100%) rename {assets => src/assets}/combo64.png (100%) rename {assets => src/assets}/combo65.png (100%) rename {assets => src/assets}/combo66.png (100%) rename {assets => src/assets}/cur0.png (100%) rename {assets => src/assets}/cur1.png (100%) rename {assets => src/assets}/elias/bot.png (100%) rename {assets => src/assets}/elias/botleft.png (100%) rename {assets => src/assets}/elias/botright.png (100%) rename {assets => src/assets}/elias/doubleface.png (100%) rename {assets => src/assets}/elias/face.png (100%) rename {assets => src/assets}/elias/filler1.png (100%) rename {assets => src/assets}/elias/filler2.png (100%) rename {assets => src/assets}/elias/flash.png (100%) rename {assets => src/assets}/elias/left.png (100%) rename {assets => src/assets}/elias/pop.png (100%) rename {assets => src/assets}/elias/portrait.png (100%) rename {assets => src/assets}/elias/right.png (100%) rename {assets => src/assets}/elias/top.png (100%) rename {assets => src/assets}/elias/topleft.png (100%) rename {assets => src/assets}/elias/topright.png (100%) rename {assets => src/assets}/flare/bot.png (100%) rename {assets => src/assets}/flare/botleft.png (100%) rename {assets => src/assets}/flare/botright.png (100%) rename {assets => src/assets}/flare/doubleface.png (100%) rename {assets => src/assets}/flare/face.png (100%) rename {assets => src/assets}/flare/filler1.png (100%) rename {assets => src/assets}/flare/filler2.png (100%) rename {assets => src/assets}/flare/flash.png (100%) rename {assets => src/assets}/flare/left.png (100%) rename {assets => src/assets}/flare/pop.png (100%) rename {assets => src/assets}/flare/portrait.png (100%) rename {assets => src/assets}/flare/right.png (100%) rename {assets => src/assets}/flare/top.png (100%) rename {assets => src/assets}/flare/topleft.png (100%) rename {assets => src/assets}/flare/topright.png (100%) rename {assets => src/assets}/frame.png (100%) rename {assets => src/assets}/garbage.png (100%) rename {assets => src/assets}/garbageflash.png (100%) rename {assets => src/assets}/lip/bot.png (100%) rename {assets => src/assets}/lip/botleft.png (100%) rename {assets => src/assets}/lip/botright.png (100%) rename {assets => src/assets}/lip/doubleface.png (100%) rename {assets => src/assets}/lip/face.png (100%) rename {assets => src/assets}/lip/filler1.png (100%) rename {assets => src/assets}/lip/filler2.png (100%) rename {assets => src/assets}/lip/flash.png (100%) rename {assets => src/assets}/lip/left.png (100%) rename {assets => src/assets}/lip/pop.png (100%) rename {assets => src/assets}/lip/portrait.png (100%) rename {assets => src/assets}/lip/right.png (100%) rename {assets => src/assets}/lip/top.png (100%) rename {assets => src/assets}/lip/topleft.png (100%) rename {assets => src/assets}/lip/topright.png (100%) rename {assets => src/assets}/metalend0.png (100%) rename {assets => src/assets}/metalend1.png (100%) rename {assets => src/assets}/metalmid.png (100%) rename {assets => src/assets}/neris/bot.png (100%) rename {assets => src/assets}/neris/botleft.png (100%) rename {assets => src/assets}/neris/botright.png (100%) rename {assets => src/assets}/neris/doubleface.png (100%) rename {assets => src/assets}/neris/face.png (100%) rename {assets => src/assets}/neris/filler1.png (100%) rename {assets => src/assets}/neris/filler2.png (100%) rename {assets => src/assets}/neris/flash.png (100%) rename {assets => src/assets}/neris/left.png (100%) rename {assets => src/assets}/neris/pop.png (100%) rename {assets => src/assets}/neris/portrait.png (100%) rename {assets => src/assets}/neris/right.png (100%) rename {assets => src/assets}/neris/top.png (100%) rename {assets => src/assets}/neris/topleft.png (100%) rename {assets => src/assets}/neris/topright.png (100%) rename {assets => src/assets}/panel00.png (100%) rename {assets => src/assets}/panel11.png (100%) rename {assets => src/assets}/panel12.png (100%) rename {assets => src/assets}/panel13.png (100%) rename {assets => src/assets}/panel14.png (100%) rename {assets => src/assets}/panel15.png (100%) rename {assets => src/assets}/panel16.png (100%) rename {assets => src/assets}/panel17.png (100%) rename {assets => src/assets}/panel21.png (100%) rename {assets => src/assets}/panel22.png (100%) rename {assets => src/assets}/panel23.png (100%) rename {assets => src/assets}/panel24.png (100%) rename {assets => src/assets}/panel25.png (100%) rename {assets => src/assets}/panel26.png (100%) rename {assets => src/assets}/panel27.png (100%) rename {assets => src/assets}/panel31.png (100%) rename {assets => src/assets}/panel32.png (100%) rename {assets => src/assets}/panel33.png (100%) rename {assets => src/assets}/panel34.png (100%) rename {assets => src/assets}/panel35.png (100%) rename {assets => src/assets}/panel36.png (100%) rename {assets => src/assets}/panel37.png (100%) rename {assets => src/assets}/panel41.png (100%) rename {assets => src/assets}/panel42.png (100%) rename {assets => src/assets}/panel43.png (100%) rename {assets => src/assets}/panel44.png (100%) rename {assets => src/assets}/panel45.png (100%) rename {assets => src/assets}/panel46.png (100%) rename {assets => src/assets}/panel47.png (100%) rename {assets => src/assets}/panel51.png (100%) rename {assets => src/assets}/panel52.png (100%) rename {assets => src/assets}/panel53.png (100%) rename {assets => src/assets}/panel54.png (100%) rename {assets => src/assets}/panel55.png (100%) rename {assets => src/assets}/panel56.png (100%) rename {assets => src/assets}/panel57.png (100%) rename {assets => src/assets}/panel61.png (100%) rename {assets => src/assets}/panel62.png (100%) rename {assets => src/assets}/panel63.png (100%) rename {assets => src/assets}/panel64.png (100%) rename {assets => src/assets}/panel65.png (100%) rename {assets => src/assets}/panel66.png (100%) rename {assets => src/assets}/panel67.png (100%) rename {assets => src/assets}/panel71.png (100%) rename {assets => src/assets}/panel72.png (100%) rename {assets => src/assets}/panel73.png (100%) rename {assets => src/assets}/panel74.png (100%) rename {assets => src/assets}/panel75.png (100%) rename {assets => src/assets}/panel76.png (100%) rename {assets => src/assets}/panel77.png (100%) rename {assets => src/assets}/panel81.png (100%) rename {assets => src/assets}/panel82.png (100%) rename {assets => src/assets}/panel83.png (100%) rename {assets => src/assets}/panel84.png (100%) rename {assets => src/assets}/panel85.png (100%) rename {assets => src/assets}/panel86.png (100%) rename {assets => src/assets}/panel87.png (100%) rename {assets => src/assets}/redend10.png (100%) rename {assets => src/assets}/redend11.png (100%) rename {assets => src/assets}/redface1.png (100%) rename {assets => src/assets}/redmid1.png (100%) rename {assets => src/assets}/redpop.png (100%) rename {assets => src/assets}/ruby/bot.png (100%) rename {assets => src/assets}/ruby/botleft.png (100%) rename {assets => src/assets}/ruby/botright.png (100%) rename {assets => src/assets}/ruby/doubleface.png (100%) rename {assets => src/assets}/ruby/face.png (100%) rename {assets => src/assets}/ruby/filler1.png (100%) rename {assets => src/assets}/ruby/filler2.png (100%) rename {assets => src/assets}/ruby/flash.png (100%) rename {assets => src/assets}/ruby/left.png (100%) rename {assets => src/assets}/ruby/pop.png (100%) rename {assets => src/assets}/ruby/portrait.png (100%) rename {assets => src/assets}/ruby/right.png (100%) rename {assets => src/assets}/ruby/top.png (100%) rename {assets => src/assets}/ruby/topleft.png (100%) rename {assets => src/assets}/ruby/topright.png (100%) rename {assets => src/assets}/seren/bot.png (100%) rename {assets => src/assets}/seren/botleft.png (100%) rename {assets => src/assets}/seren/botright.png (100%) rename {assets => src/assets}/seren/doubleface.png (100%) rename {assets => src/assets}/seren/face.png (100%) rename {assets => src/assets}/seren/filler1.png (100%) rename {assets => src/assets}/seren/filler2.png (100%) rename {assets => src/assets}/seren/flash.png (100%) rename {assets => src/assets}/seren/left.png (100%) rename {assets => src/assets}/seren/pop.png (100%) rename {assets => src/assets}/seren/portrait.png (100%) rename {assets => src/assets}/seren/right.png (100%) rename {assets => src/assets}/seren/top.png (100%) rename {assets => src/assets}/seren/topleft.png (100%) rename {assets => src/assets}/seren/topright.png (100%) rename {assets => src/assets}/sherbet/bot.png (100%) rename {assets => src/assets}/sherbet/botleft.png (100%) rename {assets => src/assets}/sherbet/botright.png (100%) rename {assets => src/assets}/sherbet/doubleface.png (100%) rename {assets => src/assets}/sherbet/face.png (100%) rename {assets => src/assets}/sherbet/filler1.png (100%) rename {assets => src/assets}/sherbet/filler2.png (100%) rename {assets => src/assets}/sherbet/flash.png (100%) rename {assets => src/assets}/sherbet/left.png (100%) rename {assets => src/assets}/sherbet/pop.png (100%) rename {assets => src/assets}/sherbet/portrait.png (100%) rename {assets => src/assets}/sherbet/right.png (100%) rename {assets => src/assets}/sherbet/top.png (100%) rename {assets => src/assets}/sherbet/topleft.png (100%) rename {assets => src/assets}/sherbet/topright.png (100%) rename {assets => src/assets}/thiana/bot.png (100%) rename {assets => src/assets}/thiana/botleft.png (100%) rename {assets => src/assets}/thiana/botright.png (100%) rename {assets => src/assets}/thiana/doubleface.png (100%) rename {assets => src/assets}/thiana/face.png (100%) rename {assets => src/assets}/thiana/filler1.png (100%) rename {assets => src/assets}/thiana/filler2.png (100%) rename {assets => src/assets}/thiana/flash.png (100%) rename {assets => src/assets}/thiana/left.png (100%) rename {assets => src/assets}/thiana/pop.png (100%) rename {assets => src/assets}/thiana/portrait.png (100%) rename {assets => src/assets}/thiana/right.png (100%) rename {assets => src/assets}/thiana/top.png (100%) rename {assets => src/assets}/thiana/topleft.png (100%) rename {assets => src/assets}/thiana/topright.png (100%) rename {assets => src/assets}/wall.png (100%) rename {assets => src/assets}/windy/bot.png (100%) rename {assets => src/assets}/windy/botleft.png (100%) rename {assets => src/assets}/windy/botright.png (100%) rename {assets => src/assets}/windy/doubleface.png (100%) rename {assets => src/assets}/windy/face.png (100%) rename {assets => src/assets}/windy/filler1.png (100%) rename {assets => src/assets}/windy/filler2.png (100%) rename {assets => src/assets}/windy/flash.png (100%) rename {assets => src/assets}/windy/left.png (100%) rename {assets => src/assets}/windy/pop.png (100%) rename {assets => src/assets}/windy/portrait.png (100%) rename {assets => src/assets}/windy/right.png (100%) rename {assets => src/assets}/windy/top.png (100%) rename {assets => src/assets}/windy/topleft.png (100%) rename {assets => src/assets}/windy/topright.png (100%) create mode 100644 src/conf.lua rename puzzles.lua => src/data/puzzles.lua (100%) rename engine.lua => src/engine/engine.lua (100%) rename gen_panels.lua => src/engine/gen_panels.lua (99%) rename globals.lua => src/engine/globals.lua (100%) rename graphics.lua => src/engine/graphics.lua (96%) rename input.lua => src/engine/input.lua (100%) rename mainloop.lua => src/engine/mainloop.lua (99%) rename network.lua => src/engine/network.lua (100%) rename REALLYBAD.txt => src/engine/nextplay.txt (100%) rename save.lua => src/engine/save.lua (100%) rename class.lua => src/lib/class.lua (100%) rename dkjson.lua => src/lib/dkjson.lua (100%) rename facktabs.lua => src/lib/facktabs.lua (100%) rename queue.lua => src/lib/queue.lua (100%) rename stridx.lua => src/lib/stridx.lua (100%) rename util.lua => src/lib/util.lua (100%) rename main.lua => src/main.lua (76%) rename server.lua => src/server.lua (96%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b11b5f20663f59ae563420b308a4df364746451c GIT binary patch literal 6148 zcmeHKxlRKy5S>XP6p1DslrCxc11kze>NJ#)a5Sr|lm%-44u6urO5PkuSaBN!Xl7+U zA8*F?lhy|j@%;VimS{#qQzSu_Lc^rF*)?+V1jriWjfQ2{Z`NJEZUp*`O)~cjdZYp0 zGu87KQ9hAw4r)66G3~&6`L;^1_=;$BU$F-8HVxMPl=ZRNZM%N^iuh15EEEU@LV-{q z6gaa2e%eeg&pb|q4+TPjzo&rg4+%*yI~GITI*{oT04UdJHI(JrEI!FGI~GIqz}Q@Y z=F0xWU~@-%a$a^UhUQM}j}P{dzaB5Fqa%J&I&n6PJQN58Y6ZqtoyqxshhL`o$gf?Z z77By{|4ad%ELMv-7UgH_$@1i^O-K(&V!|s@fT3Jn0#K2C$9>{tvXinOac PFfIZrNMxbF4=8X1z>hWK literal 0 HcmV?d00001 diff --git a/GARBAGE.txt b/GARBAGE.txt deleted file mode 100644 index 5037e42c..00000000 --- a/GARBAGE.txt +++ /dev/null @@ -1,48 +0,0 @@ -Garbage works more or less like this. - -When a player makes a combo or chain, garbage is sent to the opponent. -Garbage blocks will be named Kb for a 1xK rod, or KRb for a block of K rows. -Rb rods made of metal are denoted M. - -The amount of garbage is as follows: - -4-combo: 3b -5-combo: 4b -6-combo: 5b -7-combo: Rb -8-combo: 3b + 4b -9-combo: 2 * 4b -10-combo: 2 * 5b -11-combo: 5b + Rb -12-combo: 2 * Rb -13-combo: 3 * Rb -14-to-19-combo: 4 * Rb -20-to-24-combo: 6 * Rb -K-chain: (K-1)Rb -K metal blocks in combo: (K-2)M in addition to normal combo garbage - -For the purposes of this document, assume P1 is dropping garbage on P2. - -The garbage is not dropped instantly once it is awarded. -It is, however, displayed above P2's -stack N frames after it is awarded. #TODO: find N. - -First, the garbage will wait for P1's chain to end. - -Then all the garbage that was created during P1's chain will wait until -the most recent combo or chain (in this set of garbage) -was at least M frames ago. #TODO: find M. - -Then, all the garbage will wait until P2's chain to end. - -At this time, after Q frames, the #TODO: find Q. -garbage will fall into P2's stack. - -A few things worth noting about the above process: -- It is possible to skip the second stage altogether if P1's - chain is of any respectable length. -- Multiple chains worth of garbage may accumulate in the third - stage if P1 makes short chains or unchained combos - while P2 is making a long chain. - -To find precise garbage timings I will probably have to use a debugger. diff --git a/README b/README deleted file mode 100644 index 60f98b7e..00000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -1. Install love (http://love2d.org/) -2. cd Panel-Attack - love ./ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..0c50b5ff --- /dev/null +++ b/README.md @@ -0,0 +1,105 @@ +# Panel Attack + +## /ref + +This engine is based off V3PdP engine by Brandon Lockaby - gbrandon at gmail dot com . There is lots of commentary which is worth keeping the codebase around in the repo. + +## How to run the source code + +1. Install love v0.9 (http://love2d.org/) +2. `cd panel-attack` +3. `love ./src` + +## How to run the web-server + +`python script/server.py` + +## Gameplay Mechanics + +### How garbage blocks works + +When a player makes a combo or chain, garbage is sent to the opponent. +Garbage blocks will be named Kb for a 1xK rod, or KRb for a block of K rows. +Rb rods made of metal are denoted M. + +The amount of garbage is as follows: + +4-combo: 3b +5-combo: 4b +6-combo: 5b +7-combo: Rb +8-combo: 3b + 4b +9-combo: 2 * 4b +10-combo: 2 * 5b +11-combo: 5b + Rb +12-combo: 2 * Rb +13-combo: 3 * Rb +14-to-19-combo: 4 * Rb +20-to-24-combo: 6 * Rb +K-chain: (K-1)Rb +K metal blocks in combo: (K-2)M in addition to normal combo garbage + +For the purposes of this document, assume P1 is dropping garbage on P2. + +The garbage is not dropped instantly once it is awarded. +It is, however, displayed above P2's +stack N frames after it is awarded. #TODO: find N. + +First, the garbage will wait for P1's chain to end. + +Then all the garbage that was created during P1's chain will wait until +the most recent combo or chain (in this set of garbage) +was at least M frames ago. #TODO: find M. + +Then, all the garbage will wait until P2's chain to end. + +At this time, after Q frames, the #TODO: find Q. +garbage will fall into P2's stack. + +A few things worth noting about the above process: +- It is possible to skip the second stage altogether if P1's + chain is of any respectable length. +- Multiple chains worth of garbage may accumulate in the third + stage if P1 makes short chains or unchained combos + while P2 is making a long chain. + +To find precise garbage timings I will probably have to use a debugger. + +### Difference from Tetris Attack + +In Tetris Attack, it seems like a panel cannot match in the same frame +that it does some other state transition. This is implemented in panel +attack by performing the matches check before the other state transitions. +The result is very dirty... + +In Tetris Attack, the rising of the stack is not smooth around displacement=0. +This part of the animation takes just as long regardless of speed. +This is most noticeable if you use L or R, the stack will sort of jitter on +its way up. I have no plans to implement this. + +In Tetris Attack, only one pair of panels can be swaping at any time, and +the new swap can only be created in some frames of the old swap. In +panel-attack, swaps cannot occur on consecutive frames, but I think +this is less strict than the rule enforced by Tetris Attack about the +timing of back-to-back swaps. + +In Tetris Attack, you get nothing for chains past 13. I will probably +implement things for chains past 13. + +The procedures for generating initial configurations of panels and clusters +of [!] blocks bear only a superficial resemblance to the ones employed in +Tetris Attack. Many fewer initial configurations are posible in Tetris Attack, +and Tetris Attack's procedure for [!] blocks is based on how many +panels the player clears, while panel-attack's is not. + + + +In Tetris Attack, a stack of garbage that should all begin falling at the same +time will occasionally separate. panel-attack will not implement this bug. + +In Panel de Pon (but not in Tetris Attack), a manual rise that is interrupted +by a match will finish after the match and rise lock end. panel-attack +will not implement this bug. + +In Panel de Pon (but not in Tetris Attack), a 32 combo gives too many points. +panel-attack will not implement this bug. diff --git a/THANKS b/THANKS deleted file mode 100644 index c465696b..00000000 --- a/THANKS +++ /dev/null @@ -1,3 +0,0 @@ -This or some other file should thank the people whose work I depend on: - love devs - love2d.org - Brandon Lockaby, author of the original game engine - gbrandon at gmail dot com diff --git a/build.sh b/build.sh index c2298530..fcef5d84 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -rm panel-attack.love panel.zip panel.exe +rm ./bin/panel-attack.love ./bin/panel.zip ./bin/panel.exe zip -r panel-attack.love *.lua *.txt README THANKS COPYING server.py build.sh assets/*.png assets/*/*png echo "Build windows exe" cat /Users/sharpobject/repos/sgre/windows/love.exe panel-attack.love > panel.exe diff --git a/conf.lua b/conf.lua deleted file mode 100644 index 5e4e226d..00000000 --- a/conf.lua +++ /dev/null @@ -1,27 +0,0 @@ -function love.conf(t) - t.title = "Panel Attack" - t.author = "sharpobject@gmail.com" - t.url = "https://github.com/sharpobject/panel-attack" - t.window.width = 819 - t.window.height = 612 - t.modules.audio = false - t.modules.mouse = true - t.modules.sound = false - t.modules.physics = false - t.identity = "Panel Attack" - t.version = "0.9.0" - t.release = false - - -- DEFAULTS FROM HERE DOWN - local window = t.window or t.screen - window.vsync = true -- Enable vertical sync (boolean) - window.fullscreen = false -- Enable fullscreen (boolean) - window.fsaa = 0 -- The number of FSAA-buffers (number) - t.console = false -- Attach a console (boolean, Windows only) - t.modules.joystick = true - t.modules.timer = true -- Enable the timer module (boolean) - t.modules.image = true -- Enable the image module (boolean) - t.modules.graphics = true -- Enable the graphics module (boolean) - t.modules.keyboard = true -- Enable the keyboard module (boolean) - t.modules.event = true -end diff --git a/differences.txt b/differences.txt deleted file mode 100644 index 46851709..00000000 --- a/differences.txt +++ /dev/null @@ -1,36 +0,0 @@ -In Tetris Attack, it seems like a panel cannot match in the same frame -that it does some other state transition. This is implemented in panel -attack by performing the matches check before the other state transitions. -The result is very dirty... - -In Tetris Attack, the rising of the stack is not smooth around displacement=0. -This part of the animation takes just as long regardless of speed. -This is most noticeable if you use L or R, the stack will sort of jitter on -its way up. I have no plans to implement this. - -In Tetris Attack, only one pair of panels can be swaping at any time, and -the new swap can only be created in some frames of the old swap. In -panel-attack, swaps cannot occur on consecutive frames, but I think -this is less strict than the rule enforced by Tetris Attack about the -timing of back-to-back swaps. - -In Tetris Attack, you get nothing for chains past 13. I will probably -implement things for chains past 13. - -The procedures for generating initial configurations of panels and clusters -of [!] blocks bear only a superficial resemblance to the ones employed in -Tetris Attack. Many fewer initial configurations are posible in Tetris Attack, -and Tetris Attack's procedure for [!] blocks is based on how many -panels the player clears, while panel-attack's is not. - - - -In Tetris Attack, a stack of garbage that should all begin falling at the same -time will occasionally separate. panel-attack will not implement this bug. - -In Panel de Pon (but not in Tetris Attack), a manual rise that is interrupted -by a match will finish after the match and rise lock end. panel-attack -will not implement this bug. - -In Panel de Pon (but not in Tetris Attack), a 32 combo gives too many points. -panel-attack will not implement this bug. diff --git a/garbage.py b/garbage.py deleted file mode 100644 index 8d4f43dd..00000000 --- a/garbage.py +++ /dev/null @@ -1,15 +0,0 @@ -from PIL import Image -img = Image.open("5x.png") -w,h = img.size -img.crop((0,0,8,3)).save("topleft.png") -img.crop((w-8,0,w,3)).save("topright.png") -img.crop((0,h-3,8,h)).save("botleft.png") -img.crop((w-8,h-3,w,h)).save("botright.png") -img.crop((0,6,8,7)).save("left.png") -img.crop((w-8,6,w,7)).save("right.png") -img.crop((17,0,18,2)).save("top.png") -img.crop((17,h-2,18,h)).save("bot.png") -img.crop((24,16,40,32)).save("filler1.png") -img.crop((8,16,24,32)).save("filler2.png") -img.crop((40,16,56,48)).save("doubleface.png") -img.crop((40,24,56,40)).save("face.png") diff --git a/V3PdP source/Game.vc b/ref/Game.vc similarity index 100% rename from V3PdP source/Game.vc rename to ref/Game.vc diff --git a/V3PdP source/engine before emulation of the crazy bug.vc b/ref/engine before emulation of the crazy bug.vc similarity index 100% rename from V3PdP source/engine before emulation of the crazy bug.vc rename to ref/engine before emulation of the crazy bug.vc diff --git a/V3PdP source/engine.vc b/ref/engine.vc similarity index 100% rename from V3PdP source/engine.vc rename to ref/engine.vc diff --git a/V3PdP source/graphics.vc b/ref/graphics.vc similarity index 100% rename from V3PdP source/graphics.vc rename to ref/graphics.vc diff --git a/V3PdP source/input.vc b/ref/input.vc similarity index 100% rename from V3PdP source/input.vc rename to ref/input.vc diff --git a/V3PdP source/sound.vc b/ref/sound.vc similarity index 100% rename from V3PdP source/sound.vc rename to ref/sound.vc diff --git a/V3PdP source/stage.vc b/ref/stage.vc similarity index 100% rename from V3PdP source/stage.vc rename to ref/stage.vc diff --git a/V3PdP source/stage_Lakitu.vc b/ref/stage_Lakitu.vc similarity index 100% rename from V3PdP source/stage_Lakitu.vc rename to ref/stage_Lakitu.vc diff --git a/V3PdP source/stage_Yoshi.vc b/ref/stage_Yoshi.vc similarity index 100% rename from V3PdP source/stage_Yoshi.vc rename to ref/stage_Yoshi.vc diff --git a/V3PdP source/system.vc b/ref/system.vc similarity index 100% rename from V3PdP source/system.vc rename to ref/system.vc diff --git a/V3PdP source/title.vc b/ref/title.vc similarity index 100% rename from V3PdP source/title.vc rename to ref/title.vc diff --git a/server.py b/script/server.py similarity index 100% rename from server.py rename to script/server.py diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Fri, 30 Jun 2017 00:06:33 -0400 Subject: [PATCH 2/4] update love version to 0.10.2 --- src/conf.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.lua b/src/conf.lua index de111584..b6df9023 100644 --- a/src/conf.lua +++ b/src/conf.lua @@ -9,7 +9,7 @@ function love.conf(t) t.modules.sound = false t.modules.physics = false t.identity = "Panel Attack" - t.version = "0.9.0" + t.version = "0.10.2" t.release = false -- DEFAULTS FROM HERE DOWN From 7afaf25c26723310b7a27cf38685e1b2d119b126 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 30 Jun 2017 00:14:41 -0400 Subject: [PATCH 3/4] divide up menu for easier readability --- src/engine/mainloop.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/engine/mainloop.lua b/src/engine/mainloop.lua index 2b49423f..abd3bfb2 100644 --- a/src/engine/mainloop.lua +++ b/src/engine/mainloop.lua @@ -84,12 +84,12 @@ function menu_key_func(fixed, configurable, rept) end end -menu_up = menu_key_func({"up"}, {"up"}, true) -menu_down = menu_key_func({"down"}, {"down"}, true) -menu_left = menu_key_func({"left"}, {"left"}, true) +menu_up = menu_key_func({"up"} , {"up"} , true) +menu_down = menu_key_func({"down"} , {"down"} , true) +menu_left = menu_key_func({"left"} , {"left"} , true) menu_right = menu_key_func({"right"}, {"right"}, true) -menu_enter = menu_key_func({"return","kenter","z"}, {"swap1"}, false) -menu_escape = menu_key_func({"escape","x"}, {"swap2"}, false) +menu_enter = menu_key_func({"return", "kenter" , "z"} , {"swap1"}, false) +menu_escape = menu_key_func({"escape", "x"} , {"swap2"}, false) do local active_idx = 1 @@ -97,11 +97,14 @@ do local items = {{"1P endless", main_select_speed_99, {main_endless}}, {"1P puzzle", main_select_puzz}, {"1P time attack", main_select_speed_99, {main_time_attack}}, - {"2P fakevs at burke.ro", main_net_vs_setup, {"burke.ro"}}, - {"2P fakevs local game", main_local_vs_setup}, + {"",nil}, + {"2P vs Server", main_net_vs_setup, {"burke.ro"}}, + {"2P vs Local", main_local_vs_setup}, + {"",nil}, {"Replay of 1P endless", main_replay_endless}, {"Replay of 1P puzzle", main_replay_puzzle}, - {"Replay of 2P fakevs", main_replay_vs}, + {"Replay of 2P vs", main_replay_vs}, + {"",nil}, {"Configure input", main_config_input}, {"Set name", main_set_name}, {"Quit", os.exit}} From f873d9d75e4a51a22e7a12ccf42776a3a0a217b1 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 8 Aug 2017 19:34:10 -0400 Subject: [PATCH 4/4] move globals to data --- src/{engine => data}/globals.lua | 0 src/engine/engine.lua | 79 +++++++++++++++----------------- src/main.lua | 2 +- 3 files changed, 39 insertions(+), 42 deletions(-) rename src/{engine => data}/globals.lua (100%) diff --git a/src/engine/globals.lua b/src/data/globals.lua similarity index 100% rename from src/engine/globals.lua rename to src/data/globals.lua diff --git a/src/engine/engine.lua b/src/engine/engine.lua index 5f247d3a..31e16662 100644 --- a/src/engine/engine.lua +++ b/src/engine/engine.lua @@ -21,8 +21,9 @@ Stack = class(function(s, which, mode, speed, difficulty) local level = speed or 5 s.character = (type(difficulty) == "string") and difficulty or s.character s.level = level - speed = level_to_starting_speed[level] + speed = level_to_starting_speed[level] difficulty = level_to_difficulty[level] + s.speed_times = {15*60, idx=1, delta=15*60} s.max_health = level_to_hang_time[level] if s.mode == "2ptime" then @@ -91,20 +92,20 @@ Stack = class(function(s, which, mode, speed, difficulty) -- unlocked. s.has_risen = false -- set once the stack rises once during the game - s.stop_time = 0 + s.stop_time = 0 s.stop_time_timer = 0 - s.NCOLORS = s.NCOLORS or 5 - s.score = 0 -- der skore + s.NCOLORS = s.NCOLORS or 5 + s.score = 0 -- der skore s.chain_counter = 0 -- how high is the current chain? s.panels_in_top_row = false -- boolean, for losing the game - s.danger = false -- boolean, panels in the top row (danger) - s.danger_music = false -- changes music state + s.danger = false -- boolean, panels in the top row (danger) + s.danger_music = false -- changes music state - s.n_active_panels = 0 + s.n_active_panels = 0 s.prev_active_panels = 0 - s.n_chain_panels= 0 + s.n_chain_panels = 0 -- These change depending on the difficulty and speed levels: s.FRAMECOUNT_HOVER = FC_HOVER[s.difficulty] @@ -165,13 +166,13 @@ function Stack.mkcpy(self, other) else end--]] - other.garbage_q = deepcpy(self.garbage_q) + other.garbage_q = deepcpy(self.garbage_q) other.garbage_to_send = deepcpy(self.garbage_to_send) - other.input_state = self.input_state - local height = self.height or other.height - local width = self.width or other.width - local height_to_cpy = #self.panels - other.panels = other.panels or {} + other.input_state = self.input_state + local height = self.height or other.height + local width = self.width or other.width + local height_to_cpy = #self.panels + other.panels = other.panels or {} for i=1,height_to_cpy do if other.panels[i] == nil then other.panels[i] = {} @@ -193,26 +194,26 @@ function Stack.mkcpy(self, other) other.panels[i][j]:clear() end end - other.CLOCK = self.CLOCK - other.displacement = self.displacement - other.speed_times = deepcpy(self.speed_times) - other.panels_to_speedup = self.panels_to_speedup - other.stop_time = self.stop_time - other.stop_time_timer = self.stop_time_timer - other.score = self.score - other.chain_counter = self.chain_counter - other.n_active_panels = self.n_active_panels - other.prev_active_panels = self.prev_active_panels - other.n_chain_panels = self.n_chain_panels - other.FRAMECOUNT_RISE = self.FRAMECOUNT_RISE - other.rise_timer = self.rise_timer - other.manual_raise_yet = self.manual_raise_yet + other.CLOCK = self.CLOCK + other.displacement = self.displacement + other.speed_times = deepcpy(self.speed_times) + other.panels_to_speedup = self.panels_to_speedup + other.stop_time = self.stop_time + other.stop_time_timer = self.stop_time_timer + other.score = self.score + other.chain_counter = self.chain_counter + other.n_active_panels = self.n_active_panels + other.prev_active_panels = self.prev_active_panels + other.n_chain_panels = self.n_chain_panels + other.FRAMECOUNT_RISE = self.FRAMECOUNT_RISE + other.rise_timer = self.rise_timer + other.manual_raise_yet = self.manual_raise_yet other.prevent_manual_raise = self.prevent_manual_raise - other.cur_timer = self.cur_timer - other.cur_dir = self.cur_dir - other.cur_row = self.cur_row - other.cur_col = self.cur_col - other.card_q = deepcpy(self.card_q) + other.cur_timer = self.cur_timer + other.cur_dir = self.cur_dir + other.cur_row = self.cur_row + other.cur_col = self.cur_col + other.card_q = deepcpy(self.card_q) return other end @@ -265,21 +266,18 @@ end -- chaining do - local exclude_hover_set = {matched=true, popping=true, popped=true, - hovering=true, falling=true} + local exclude_hover_set = {matched=true, popping=true, popped=true, hovering=true, falling=true} function Panel.exclude_hover(self) return exclude_hover_set[self.state] or self.garbage end - local exclude_match_set = {swapping=true, matched=true, popping=true, - popped=true, dimmed=true, falling=true} + local exclude_match_set = {swapping=true, matched=true, popping=true, popped=true, dimmed=true, falling=true} function Panel.exclude_match(self) return exclude_match_set[self.state] or self.color == 0 or self.color == 9 or (self.state == "hovering" and not self.match_anyway) end - local exclude_swap_set = {matched=true, popping=true, popped=true, - hovering=true, dimmed=true} + local exclude_swap_set = {matched=true, popping=true, popped=true, hovering=true, dimmed=true} function Panel.exclude_swap(self) return exclude_swap_set[self.state] or self.dont_swap or self.garbage end @@ -292,8 +290,7 @@ do -- "falling-ness should not propogate up through this panel" -- We need this because garbage doesn't hover, it just falls -- opportunistically. - local block_garbage_fall_set = {matched=true, popping=true, - popped=true, hovering=true, swapping=true} + local block_garbage_fall_set = {matched=true, popping=true, popped=true, hovering=true, swapping=true} function Panel.block_garbage_fall(self) return block_garbage_fall_set[self.state] or self.color == 0 end diff --git a/src/main.lua b/src/main.lua index e7623584..f0606fa5 100644 --- a/src/main.lua +++ b/src/main.lua @@ -6,10 +6,10 @@ require("lib.class") require("lib.queue") -- data +require("data.globals") require("data.puzzles") -- engine -require("engine.globals") require("engine.save") require("engine.engine") require("engine.graphics")