Browse Source

initial commit

master
Victor Giers 5 years ago
commit
42484711d6
100 changed files with 559 additions and 0 deletions
  1. 41
    0
      Drop.pde
  2. 141
    0
      LICENSE
  3. 48
    0
      LoadAndSave.pde
  4. 163
    0
      Marker.pde
  5. 85
    0
      MouseAndKey.pde
  6. 33
    0
      README.md
  7. 41
    0
      View.pde
  8. BIN
      assets/background.jpg
  9. 7
    0
      data/save.gse
  10. BIN
      example_animation/action/frame0000.png
  11. BIN
      example_animation/action/frame0001.png
  12. BIN
      example_animation/action/frame0002.png
  13. BIN
      example_animation/action/frame0003.png
  14. BIN
      example_animation/action/frame0004.png
  15. BIN
      example_animation/action/frame0005.png
  16. BIN
      example_animation/action/frame0006.png
  17. BIN
      example_animation/action/frame0007.png
  18. BIN
      example_animation/action/frame0008.png
  19. BIN
      example_animation/action/frame0009.png
  20. BIN
      example_animation/action/frame0010.png
  21. BIN
      example_animation/action/frame0011.png
  22. BIN
      example_animation/action/frame0012.png
  23. BIN
      example_animation/action/frame0013.png
  24. BIN
      example_animation/action/frame0014.png
  25. BIN
      example_animation/action/frame0015.png
  26. BIN
      example_animation/action/frame0016.png
  27. BIN
      example_animation/action/frame0017.png
  28. BIN
      example_animation/action/frame0018.png
  29. BIN
      example_animation/action/frame0019.png
  30. BIN
      example_animation/action/frame0020.png
  31. BIN
      example_animation/action/frame0021.png
  32. BIN
      example_animation/action/frame0022.png
  33. BIN
      example_animation/action/frame0023.png
  34. BIN
      example_animation/action/frame0024.png
  35. BIN
      example_animation/action/frame0025.png
  36. BIN
      example_animation/action/frame0026.png
  37. BIN
      example_animation/action/frame0027.png
  38. BIN
      example_animation/action/frame0028.png
  39. BIN
      example_animation/action/frame0029.png
  40. BIN
      example_animation/action/frame0030.png
  41. BIN
      example_animation/action/frame0031.png
  42. BIN
      example_animation/action/frame0032.png
  43. BIN
      example_animation/action/frame0033.png
  44. BIN
      example_animation/action/frame0034.png
  45. BIN
      example_animation/action/frame0035.png
  46. BIN
      example_animation/action/frame0036.png
  47. BIN
      example_animation/action/frame0037.png
  48. BIN
      example_animation/action/frame0038.png
  49. BIN
      example_animation/action/frame0039.png
  50. BIN
      example_animation/action/frame0040.png
  51. BIN
      example_animation/action/frame0041.png
  52. BIN
      example_animation/action/frame0042.png
  53. BIN
      example_animation/action/frame0043.png
  54. BIN
      example_animation/action/frame0044.png
  55. BIN
      example_animation/action/frame0045.png
  56. BIN
      example_animation/action/frame0046.png
  57. BIN
      example_animation/action/frame0047.png
  58. BIN
      example_animation/action/frame0048.png
  59. BIN
      example_animation/action/frame0049.png
  60. BIN
      example_animation/action/frame0050.png
  61. BIN
      example_animation/action/frame0051.png
  62. BIN
      example_animation/action/frame0052.png
  63. BIN
      example_animation/action/frame0053.png
  64. BIN
      example_animation/action/frame0054.png
  65. BIN
      example_animation/action/frame0055.png
  66. BIN
      example_animation/action/frame0056.png
  67. BIN
      example_animation/action/frame0057.png
  68. BIN
      example_animation/action/frame0058.png
  69. BIN
      example_animation/action/frame0059.png
  70. BIN
      example_animation/action/frame0060.png
  71. BIN
      example_animation/action/frame0061.png
  72. BIN
      example_animation/action/frame0062.png
  73. BIN
      example_animation/action/frame0063.png
  74. BIN
      example_animation/action/frame0064.png
  75. BIN
      example_animation/action/frame0065.png
  76. BIN
      example_animation/action/frame0066.png
  77. BIN
      example_animation/action/frame0067.png
  78. BIN
      example_animation/action/frame0068.png
  79. BIN
      example_animation/action/frame0069.png
  80. BIN
      example_animation/action/frame0070.png
  81. BIN
      example_animation/action/frame0071.png
  82. BIN
      example_animation/action/frame0072.png
  83. BIN
      example_animation/action/frame0073.png
  84. BIN
      example_animation/action/frame0074.png
  85. BIN
      example_animation/action/frame0075.png
  86. BIN
      example_animation/action/frame0076.png
  87. BIN
      example_animation/action/frame0077.png
  88. BIN
      example_animation/action/frame0078.png
  89. BIN
      example_animation/action/frame0079.png
  90. BIN
      example_animation/action/frame0080.png
  91. BIN
      example_animation/action/frame0081.png
  92. BIN
      example_animation/action/frame0082.png
  93. BIN
      example_animation/action/frame0083.png
  94. BIN
      example_animation/action/frame0084.png
  95. BIN
      example_animation/action/frame0085.png
  96. BIN
      example_animation/action/frame0086.png
  97. BIN
      example_animation/action/frame0087.png
  98. BIN
      example_animation/action/frame0088.png
  99. BIN
      example_animation/action/frame0089.png
  100. 0
    0
      example_animation/action/frame0090.png

+ 41
- 0
Drop.pde View File

@@ -0,0 +1,41 @@
void dropEvent(DropEvent theDropEvent) {
if (theDropEvent.isFile()) {
File myFile = theDropEvent.file();
if (myFile.isDirectory()) {
File filesLevel0[];
filesLevel0 = theDropEvent.listFilesAsArray(myFile, 0);
boolean containsIdle = false;
boolean containsAction = false;
for (int i = 0; i < filesLevel0.length; i++) {
if (filesLevel0[i].getName().equals("action")) {
containsAction = true;
println("There is an \"action\"-folder. Assuming the idle animation to be interactive.");
}
if (filesLevel0[i].getName().equals("idle")) {
containsIdle = true;
println("There is an \"idle\"-folder. Treating this folder as image sequence container.");
}
}
if (containsIdle) {
File idleDir = new File(theDropEvent.filePath() + "/idle");
File[] idleFiles = idleDir.listFiles();
if (activeMarkers < 198) {
if (containsAction) {
File actionDir = new File(theDropEvent.filePath() + "/action");
File[] actionFiles = actionDir.listFiles();
marker[activeMarkers] = new Marker(activeMarkers, idleFiles, actionFiles, theDropEvent.x(), theDropEvent.y(),theDropEvent.filePath());
} else {
marker[activeMarkers] = new Marker(activeMarkers, idleFiles, theDropEvent.x(), theDropEvent.y(),theDropEvent.filePath());
}
activeMarkers++;
} else {
println("Maximum Amount of Animations reached.");
}
} else {
println("No \"idle\"-folder found. Breaking import...");
}
} else {
println("Drag and Drop a folder that contains at least an idle animation! That was not a folder!");
}
}
}

+ 141
- 0
LICENSE View File

@@ -0,0 +1,141 @@
sssssssssssssssssssssssssssysysssssyyyyyyyyyyyyyyyyyyyhyyyyyyyyyyyyyyyyyyyyyyyssssoosoys+yo/+/+/--.....:++++oosssoosoooooooooooooo+++++++++ooo+++++oooooooo+ooo++/------://::///--o//yoooooooooo++++sssssssoo++++++osssssssooosooosoossoo++oo+++++++++oooooo+++/+++ooooooooooooooooooooo
sssssssssssssssssssssssssyyyyyyyyyyyyyyyysyyssysyyyyyyyyyyyhyyyyyyyysoo+////+ooossssyyhs+yoossso///++////////osss+:--------.....--..................------:+oss+::::::::://::::///++:ys++++++ooooooosssssssoo++ooooosyysssssoossssssssssooooososooooooooosso+++++++ossssssssssssssssssss
sssssssssssssssssssssssssossyyssssyyyyyyyyyyyyysyyyyyyyyyyhhhyyyyyyysssssyyyyyhhyhhhhhhs+yo+yhyyo+++++////::://::------------........................---------::---::::::///+ssyo/++/syyysssssoooo++sssssssssssssssssssssoooooooooossssssssossosssoossssssso+++++++sssssssssssssssssssss
ssssssysssssssssssssssssooosyyssssssyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyssoooooo+++osyyyyyyhyshyoyhyso++++ooooooo+oooooooosssosssssssssssoooooooooooo+ooo+++++///++++++//////////+ooy+/ss+sssosssssssssosssssooossssyyyysssssssoosooooosssssssoooosoooooossssssso+++++++sssssssssssssssssssss
sssssssssssssssssssssssooossyysoooosyyyyyyyyyyyyyyyyyyyyhyyyhhhyyyyso/:::::/++/+yyyyyyhhhsysyyyssooooooosssssssssssssyyyyyyyyyyyyyyysssssssyyysssssssssoosoooooooooo++///+++++os+ssssysooooo+//::-::ssssssssssssssssssssssssssssssssssssooooosoo++oossssssso+++++++sssssssssssssssssssss
ysssssssssssssssssssssoosssyysssysssyyysyyyyyhyyyyyyyyyyyhhhyyyyyyyso/::::://+/+syyyyyssyo/ooo+++++++oosoosssssyyysssyyyyyyyyyyssssssssssossssssssssssssssssssooooooo+++///++ooooo/syyssooo+/::-----ssssssssoosssyysssssyyysssyyyysssssoooooosoooooossssssso+++++++ossssssssssssssssssss
yyssssssssssssssssssssssssyyyyoosyyyysoosssyyyyyyyyyyyyyyyhhyyhyyyyso+::::://+/++ooos+/:oo://+ssyyyyyyyyysyysyssssssssyssssssssossoo+o++o++o+oooooooosoooooossssossssooooooo++///::oos++++++/::::---ssssssssssossyssosyyysssssyyyssoosssosssooooossooossssso+++++++ossssssssssssssssssss
yyyyssysssssssssssssssssssyyyysoooooossosossyyyyyyyyyyyyyyhhsyyyyyyysoooooossssyysyyyyo/oo::+osoysossssssssssysssssssssssssssososo+o+o++o++o+o++oooooooooooooooooooooos+soooooo+/-:ooo+ssooo+++////+ssssssssssoossssoossssssssyssoooooososo++ooosssssoosssso++++//+ossssssssssssssssssss
yyyyysyssssssssssssssssssssssyssoo+++ooooossyyyyyyyyyyyyyyhyyyyyyyyyysssssossossssssyyo+oo//+ossyssssyssysssssssssssssssssosoos+oooooo++o++o+oooooooooooooooooooooosooo+ooooooo//::oooosssosoossossossssssssys++ssssoossssssssysoooooo++++++ssoooosssssosssoo+++//+ossssssssssssssssssss
yyyyyyysssssssysssssssssssssssssso+++++oooossyyyyysssyssyyyysyyyyyyyysyyyyssyssyssyyyys+oo//+osoysssssssyssssssssssssssssssssosossooosoosoososoosoooooooooooooooooossoo+ooosoos+/::oooosssosssssosssssssssssss+ossssssssssssssssooo++++++++osooo+osssssoosssso++///ossssssssssssssssssss
yyyyyyyysyssyyssssssssssssssssssso+//++++oossyyyysssssooyyyysyyyyyyyyssssssyyyysssyyyyo+so//+ossyssssyssyssysysssssssssssssssosossosossosoososoosooooooooooooosssssssos+ooooooo//::+ooosssssssssssssssssssssss++ssssossssssssssooo++++++/+ossooooossssssssssssoo//+sssssssssssssssssssss
yyyyyyyyysyyysssssssssssssssssssss+//+++++oosyyyyyssssooyyyssyyyyyyyysoossosysyysyyyyys+so//+ossysssssssyssysysssssssssssssssssossosossosoososoososooooooooossssssososs+oooooss++::+oossssossosooooosssssssssso+ossoossooosssssoo++++////+ossoo++osssssssssosssso++sssssssssssssssssssss
yyyyyyyyyyyyysssssssssssssossssssss//////+oosyyyyssssso+yyysosyyyyyyysssssssysyysyyyyys+so//+ossyssssyysyssssysysssssssssssssssossossssosoososoososoosooooossssssoosossosooosss++:-oosossssssossoosossssssssss+/osso+ssoosssssoo++///////ooosoo++ossssssssssosssssosssssssssssssssssssss
yyyyyyyyyyyyyyysssssssssssoossssssso/://///osysyyssssso/yyyo+syyyyyyyssssssyysyyyyyyyysoso//+ossyssssyssyysysyssssssssssssssssyossssssssysssssoososossosssssssssssosoosossosssso+::ooosssssssossoosossssssssss/:oss+/soooosssso++//:::::+sossoo++ossssssssssssssssssssssssssssssssssssss
yyyyyyyyyyyyyyyyyyyysssssssossssssss+//////+oysysooooso+syy+/shyyyyyyyyssssyyssyyyyyyysoso//+oysyssysyysyyyysyyyysyyssyssyssssyossssssssyssssssssssossosssssssssssosoososoosoos++/:oossssssssossssssssssssssos/-+ss+/oo+++ososo+/:::/::+oossso+++osssssssssoosssssssssssssssssssssssssss
yyyysyyyyysssyyyyyyysssssssoossssssso/::/::/+ssso++++oy+oys/:ohyssyyyyssyssyysyyyyyyyysoss/+osysyssysyssyssysysyysyysyyyyyssysysysssssysyssyssssssssssososssssssssooossossosoosoo/:oosssssssssssssssssssssooos:-/so++o+//++ooo+/::::::/ooossso+++osssssssssoooosssssssssssssssssssssssss
yyyyssyyysssssyyyyyysssssoooooooo+++/:--:::/ossso+++ooyyss+::+hyssssysyssssyyyyyyyyyyysoos/+ooysyysysyssysyysyyyyyyyyyyyyysyysysssssssssyssysssssssssssssssssssssssssssossossosoo/:oosssssssssssssssssssooooos:-:oo+oo+////+oo+/:-:--:/oooosso+++ossssssssssoooossssoossysssssssssssssss
yyyyssyyyssossyyyyyysysssoosso++/////:::::://////+++osyyyo:--+hssssssssssssyyyyyyyyyyyyoos/+oossyyyysysyyyyyyyyyyyyyyyyyyyyyyyysyssyssysyssyssssssssssssssssssssssossosossossssoo/:oosssssssssssoooosssooooooo-.-:ssso+////+++//:------:::///+++++sssssssssso+ooosssoosssyysssssssssssss
yyyyysyyssooossyyyyyyyssso+oosssosoo:--/://++++++++++oyyy+---/hsooossssssssyyyyyyyyyyysoos++osysyysyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysyssyyyssysssssssssssssyssssssssosssssssoo/:+osssssssssssoosooooooo++oo-..-ssso+//:/::::::------/////++++++osssssssssooooosssossyyyyyysssssssssss
yyyyyyyyssoooosyyyyyysssso++oossssoo-.-----::+++///:::+os+---/ysoooosssssysyyyyyyyyyyyssos++osysyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysysyyssssssssosssssssoo//+osssssssssssossosooooo++oo-..-sss+/:::////:----...-oooosso+/:+osssssssssoooooossosyyyyyyyysyssssssss
yyyyyyyyysoooosyyyyyyyssso/+oossssoo-......-::/::-----/+s+.-./ysooooossssssyyyyyyyyyyyysosoossyyhyyyyyyyhyyyyhyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysyssyssssssssoo++osyssssssssssosoosoo+++/+oo-...o++:------:/--......-ooooss+/::+oossssssssoooooosssyyyyyyyyyyyyyyyyyys
yyyyyyyyysso++syyyyyyssss+/+oossssso-..-..---:/-------/+s+..-:ys++o+oosssssyyyyyyyyyhyyssyoossyyhyyyyyyyhyyhyyyyyyyyyhyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysyssysyyssssssoo+osssyssssssssssoooo++++//oo-...oo+:------::--.......ooooss+/::/oossssssssooooossssyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyssoosyyyyyssssso/++ossssss:.:+--...-:-------/+s+...:yo/++++ossyyyyyyyyyyhyhyyssyssssyyyyyyyyyyhyyhyhyyhyhhyhhhyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysysyssssyssso+osssyssssssssooooo+++/+//+o-...ooo-------::-.--.--..ssssss+/::/oooossssssoooossssyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyoosyyyysosssso//+ossssso:.-+:/-...:-....../os+...:ys/++++ooosssyyyyyyyyyyyyysyssyyhyhyyyyhyyhyyhyhyhhyhhyhyhyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysysssssysso+ossyyysssssssoo++o+///+//oo-..-oso-....--:-...--::.-ssssss//:-/ooooossyyssssosssyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyssyyyysssssso//++ssssss:.-+::/:-:/-....../ss+.../hs/++/+oossssyyyyyyhhyyhyyyysyyhhyhyyhhhhhhhhhyhhhhhhhyhhyyyyyyyyyyyyyyyyyyysyssssyyyyyyyyyyyyyyyyyyyyyyysyysyyyyyssososyyysssssosoo++o+////:/+s-...oso-....--::..::-::.-ssssso/::-/sooooosyyssssssssyyyyyyyyyyyyyyyyyyyyy
yyyyyyyssssssyyyyyssssyyso+++osyssss:..--:::--::--..../sso-../hs///++osssssyyyyyyhhhhhyyyysyhyyyhyyhyhhhhhhhyhhhhhhhhhyyyyyyyyysssssssssssssssssssssssssyyyyyyyyyyyyyyysyysyyyyyso+o+syyssysssssoo++o+//////+s-..-ooo-.....-::::/:::-.-ssssso//::+ssoooosyyssssssssyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyoossssyyyssssyyyss++oosyssss:......---/:-...../sso---/hs+++oossssssyyyyyyhhhhhyosysyhyhyhhyhhhhhhhhhhhhhhhhhyhyyyyyssssooooooooooooooooooooooossssssyyyyyyyyyyysyyyyyyyyso+o+oyyyyysssssooooo+++/+//+s-..-ooo-.....-:::---....-ssssyo+/::+syssooosssossssssyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyoossssyyyssyyyyyysooossysyys/--::----:/:---.--+yso---/hyoooossyyyyyyyyhhyhhhhhysysyhhhhyhhhhhhhhhhhhhhhhhhhyyyyysssoooo++++++///////////++++++ooooosssssyyyyyyyyyyyyyyyyysooo+syyyysssssssooooo+o+++os-..-oso:.....-:/:----...-sssyys+//:+yyyyssosssosssoosyyyyyyyyyyyyyyyyyyyyy
yyyyyyyysossssyyyyyyyyyyysoosssooo++/::///:--/+//:::::oyys--:+hysssssyyyyyyyyyyyyyhyyhyhyyhhdhdddhhhhhhhhhhhyhhhhyysssooo++///::::--.............---::::/++oosssssssysysyyyyyyyyhhsosssssssssssssssssooooooooy:-.-sss/------:/:-------:sssssso+//oyyyyyysssossssoosyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyssysyyyyyyyyyyyhyyyhhhhyyyyoo++++ooooo++oo+++ooo+///+oosssyyyyhhhhhhhhhyyyhhhyhhyhhdddddhhhhhhhhhyhyhyyysssoo++/:-...........................`....-:/++ooooossosssyyyyhhhs+sssyssoosysssssssooo+++++o::-:sys+/:::::///:::/++++ooooossssssssssyyyysossssooyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyhhhhyyyyssyyyyyyy+::--::/+sssooo+oss+shyssssyyyyyhyhhhhhhhhhhssyhhhhhhhhddddhhhhhhhhhhhhyyyyssoo+/-..`......``........................`.....-:/+ooosssssssyyhhhysysyyyo++oyyyyyyyyyyyyyysooooooo++++/+osssyyhhhhhyyyyyyyyyyyyyyyyyyyyyyssssssssyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyhhhhhyyyyyyyyyyyyyyyyysyyyyyyo::::://+yss++++oso+shysooshhyhyyyyyhhhhyhhyyyhhhhddhhhddhhhhhhyyyyyyyyssso+:-....``.``````````.....................```..``.....-:+ossosoosshyysyhhyyysosyyyyyyyyyyyyyyys//+oyyo+so++/ossyyyyyyyyyyyyyyyyyyyyyyyyyyyyyysyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyhhyyyyyyyyyyyyyyyyyysysyyyyyyyo//:///+syyyooossso+yhhysshhyyyyyyyyyyyyyhhhhhdddddhhhhdhyyhhhhhhhhhyyyyo/......```..............................```.``.......``...-+sssyyyyyyysyhhhyhhyyyyyyyyyyyyyyyyyhy+osyyo/ooo+oooosyyyyyyyyyyyyyyyyyyyyyyyyyyyyysyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyhhhyyyyhyyyoosyyyyyyssyyyyyyyys+////++oyyyssyyyysoyhhhsshhyyhhhhhhhhhhhhhhhddhhhhhhhhhyyhhhhhhhhhyyyo:..`..........................................................-/osyyyyyysyhhhhyhhyhhyhhhhhyyyyhyyhhooyyys+ossssoosyssyyyyyyyyyyyyyyhyyyyyyyyyyyysyyyyyyyyyyyyyyyyyyyyyyyyyhhh
hhhhhhhhhyyyyyhyyysssyyyyssssyyyyyyyyo++++ossyhyssyyyhhyhhhhyshhhhhhhhhhhhhhhhhhhddhhdhhhhhdhhhhhhhhhhyys:..........................www.victorgiers.com......................:osyyysoyhyyyyyyyyyyyyyyhyyyyhhhhhooyyyssyyyyosyyyyyyyyyyyyyyyhyhhhhyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhhhh
hhhhhhhhhhyyyhhyyyyssssyyysyyyyyyyyyyoooooossyhyyyyyhhhhhhhysyhhhhhhhhhhhhhhhhhhhhhhhdhhhhhdhhhhdhhhhyo:..`...................Copyright (c) 2017 Victor Giers..................-+yysoyyyyyyhyyyyyyyyyyyyyyyhyhhooyyyyyhyyysyyyyyyyyyyyyyyyhhhhhhhyyyhhhhhhhyyysyyyyyyyyyyyyyyyyyyyhhhhhhh
hhhhhhhhhhhyhhhyyyyyysssyysyyyyyyyhyyooooossshhysyyyhhhhhhhhyyhhhhhhhhhhhhhhhhhhhhdhhddddhhhhhhhhhhys:Permission is hereby granted, free of charge, to any person obtaining a copy:osoyyyyyyhhyyyyhhyyhyyyyhhhyhsoyyyyyhhysyyyyyyyyo+//++oyyhhhhhhyyhhhhhhhhhyyysyyyyyyyyyyyyyyhhhhhhhhhhh
hhhhhhhhhhhhhyhyyyyyyyyyyyyyyyhhyhyyyooossssshhysssyyyhhhhhyyhdhhhhhhhhhhhhhhhhhhhdhhddhhhhhhhhhhhy:.of this software and associated documentation files (the "Software"), to deal.:syhhhhhyyyyyhhhhhhhhhhhhyhsoyhyyyhhyyhyyyhhs+//++///++yhhhhhyhhhhhhhhhhyyyyssyyyhhhhhhhhhhhhhhhhhhhh
hhhhhhhhhhhhyhhhhhhhhhhyyyhhhhhhhhhhhyysssssyhhhyyyyyhhyhhdhyhhhhhhhhhhhhhhhhhhhhddhhdddhhhdhhhh+.....in the Software without restriction, including without limitation the rights...-ohyhhhhyhhhhhhhhhhhhhhhyhsoyhhyyhhyyhyyyyhso+/+///+++oyhhhhhhhhhhhhhhhhyyyyyyyhhhhhhhhhhhhhhhhhhhhh
hhhhhhhhhhhhhhhhhhhhhhhhyyhyyyyyyyyyyyyyyyyyyhhhhhyhhhhhhhdhyydhhdhhhhhhhhhhhhddhddhddddhhhhhhho......to use, copy, modify, merge, publish, distribute, sublicense, and/or sell.......-yyyyyhhhhhhhhhhhhhhhhhhhsoyhyyyhhyyhhhhhhyso++///++ooshhhhhhhhhhhhhhhhyyyyyyyhhhhhhhhhhhhhhhhhhhhh
hhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhhhhyyyhhhhhhhhhhhhhhhhhhdhyyddhddddhhhhhhhhhddhddhddhhdhyhhhs........-copies of the Software, and to permit persons to whom the Software is........../yyhyhhhhyhhhhhhhhhhhhhhsoyhyyyhhhyhhhhhhhyso+//+++++osooo++++++syhhhhhyyhhyyyhhhhhhhhhhhhhhhhhhhh
hhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhhhhssssssyhhhhhhhhhdhhddhhyhdddddddddddhdddhddhddhddhhdhyhhs-.................furnished to do so, subject to the following conditions:................+yhhhhhhyhhhhhhhhhhhhhhyoyhhhhhhhhhhhhhhyoo+//////////:::::::::/+shhhhhhhhhyhhhhhhhhhhhhhhhhhhhhh
hhhhhhdhhhhhhhhhhhhhhhhhhyhhhhhhhhhhyssssssyyhhhhhhhhhhhddhyyhddddddddddhhdddhddhddddddddhyyy:...--The above copyright notice and this permission notice shall be included in all.......-shhhhhhhhhhhhhhhhhhhhhyosyhhhhhhhhhhhhhso++///////::::::::::::///yhhhhhyyhyhhhhhhhhhhhhhhhhhhhhh
hhhhhhdddhhhhhhhhhhhhhhhhhhhhhhhhhhhssssssyyhhhhhhhhhhddddyyyhdddddddddddddddhddddddddddhysy/.....copies or substantial portions of the Software, including this very License file......:yhhhhhhhhhhhhhhhhhhhhsooshhhhhhhhhhhhyo+++//////////::::::::////ohhhhhhhhyhyhhhhhhhhhhhhhhhhhhh
hhhdhhdddhhhhhhhhhhhhhhhhhhhhhhhhhhysssssyyhhdhhhhhhhhddddhyyhddddddddddddddddddddddddddhyso.........-----------------------.................................--------------.....---.---.-shhhhhhhhhhhhhhhhhhhhyooshhhhhhhhhddhso++////+/////////:::://///ohhhyyyhhhhyhhhhhhhhhhhhhhhhhhh
ddddhdddddhhhhhhhhhhhhhhhhhhhhhhhhhysssssyyhhhhhhhhhhhddddhyyhdddddddddddddddddddddddddddys+....-------THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR--------/hhhhhhhhhhhhhhhhhhhhysssddhhhhhhhddyo+++//+++++++++////::://///ohhhyhhhhhhhhhhhhhhhhhhhhhhhhhh
ddddddddddddhhhhhhhhhhhhhhhhhhhhhyysssyyyyyhhhhhhhhhhhddddhyyhdddddddddddddddddddddddddddhs/..----------IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,----------yhhhhhhhhhhhhhhhhhhhysssdddhhhhhhhhs+++//+ooooooo++++++/:://///shhhhyhhhhhhhhhhhhhhhhhhhhhhhhh
ddddddhhddddddhhhhhhhhdhhhhhddhhysssssyyyyhhhhhhhhhhhhdhddhhhhdddddddddddddddddddddddddddho------------FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE--------ohhhhhhhhhhhhhhhddhhyssyddhhhhhhhhho+++//+sssyssssssooo+//////+hhhyyhhhhhhhhhdhhhhhhhhhhhhhhhh
ddddddddhhhdddhhhhhhhdddhhhdddhyyyyyyyyyyyhhhddhhhhhhhhhddhhhhdddddddddddddddddddddddddddy+--------------AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER....-------+hhhhhhhhhhhhhhhddhhyssydhhhhhhhhdhoo+++/+ssyyyyyyyyyyyyso++ooyhyyhhhhhyyhhhdddddddddddddhhhhh
ddddddddddhhddddhhhhhhdddhhddhhhhyyhhhhhhhhhhddhdddddddhddhhhddddddddddddddddddddddddddddy/-----------LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-------/yhhhhhhhhhhhdddddhdhyyyhhhhdhhdddhsoo++/+ssyyhhhhhhhhhhhhhhyyyyyyhhhyhhhddddddddddddddddddddd
dddddddddhhdddhhddhhhhhhhhhdhhhhhhhddddhhhhhhddhddddddddddhhhdddddddddddddddddddddddddddhy:-----------OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE--------yhhhhhhhhhdhdddddddhhyhhhhhhhhdddhsooo+/osyyyyhhyyyyhhhhhyyyyyhyyyhhhhhhhdddddddddddddddddddd
ddddddddhhhhddddhhhddhhhhhyhyhhyyyyhdddhhhhhhddhdddddhddddhhhdhddddddddddddddddddddddddhhs:--------------------------------------........SOFTWARE...........-------------------------------ohhhhhhhdhdddddddhhhyyhhdhhhhhhddhssoo++osyhhhhhhhhsyyyyyyyhhhyyhhhhhhhhddddddddddddddddddddd
dddddddddhhhhhdddddhhhhhhhhhhyhhyyyhddddhhhhhddhddddddhhdddddddhhdddddddddddddddddddddddhs----::---------..........----............................................................--------/hhhhhhhdddddddhhhhhhhhhhhhhhdhdddyysssosyyhhhyyhhhyyyssyyhyyhhddhhhhhhhddddddddddddddddddddd
ddddddddhhhhhdddddddddhhhhhhyyhhhyhhddddhhhhhhhyhddddddhhdhhhddddhddddddddddddddddddddddh+----::-------...........---................................................--.............-------:yhhhhhdddddddhyhhhhhhhhhhhddhhdddhhhhoyhhhdhhhhhhhyyyyyyyhhdddddhhhhhhhddddddddddddddddddddd
ddddddddhhhhddddddddddddddddhdhhhhhddddhhhyyyyssyhdddddhhhhdhddddhhhdddddddddddddddddddhh+----::-----............-----------..................................------------..........-------:yhddddddddhhyyyhddhhddhhhhddddhhhhyyyoyhhhdhhhhhhhhhhhhhdddddddhhhhhhhhddddddddddddddddddddd
ddddddddhhhhdhdddddddddddhhdyhhyyhhhhddddhhhhhhhhhddddhhddddddddhhhhhhhddddddddddddddddhh+----::-----.........--------------------.....................------------::::::-------.....------/hdddddddhhyyyyhhhdhhhddddhdddhhhhhhhhhdddhdhhhhhhhyhyyhhddddddddhhhhhhhddddddddddddddddddddd
ddddddddhhhhhdddddddddddhhhhyhhhhyyhhdddddhhhhhhhhddddddhhhdddddhhyyyhhhhhhdddddddddhdhhyo::-::-----.....-----::::::///:::::::::------................---::::////+////////////::--....-----/hhhhhhhyyyyssssyhddhhhhhdddddhhhhhhdddddddhhhyyhhyossyyhhhhdddddhhhhhhhddddddddddddddddddddd
ddddddddhhhhhddddddddddhhhhhyhhyyyyyhdddddddddddhhdddddhhhdddddhhyyyyyhhhhhddddddddddddyss---::----...---:::://////+++oooooo+++///::---............----://+++oosooooooooo+++///::::-..-----/hhhhhhyyyyssssshhdddhhhhhddddhhddddddddddddhhhhyyhsyyyyyhhhhddddhhhhhhhddddddddddddddddddddd
ddddddddhhhdddddddddddddddhhyyhhhhhhddddddddddddhhddddddhhdddhhyyyyyyyyyyhhhhhhhhddddddyss::-::----..-:::://++++oooosssssyyyyysoo+//:---..........---:/+ooossyyyyyysso+//:::---------------/yyyyyyyyssssssssyhhddhhhhhhhdhhddddhhhhddddhhddhhhhhhhhhhhhddhhhhhhhhhdddddddddddddddddddddd
ddddddddddddddddddddddddddhssyhdddddddddddddddddhdddmdhhhddmhyhhyhhhhhhhhhdddhhdddddddddhs:::::------------:::::://++osyyyyyhhyyyso+/:--..........--::/oossyyyyysssoo++///::::-------------/hhhhhhhhhyyyyyyyyyyhddhhhddddddddddhhhhhddddddddddhhdhdddhhhhdhhhhhhhhdddddddddddddddddddddd
dddddddddddddddddddddddddhsooohdddddddddddddddddhdddddhhhdddhdddhdddddddddddddddddddddddds::::-----:--:::::::://++oooosssssyyyyhyyso+/:--.........--:/+ossyhhhhhhyyysooooo++////:::::------+dddddddddddddddddddhdddhhdddddddddddddhhdddddddddhhhhhdddddhhdhddhhhdddddddddddddddddddddddd
mmmmdddddddddmdmdddddddddho+/+ydddddddddddddddddhdddddhyyhddddddddddddddddddddmdddmddddddy::::-----:::///++++oooo++///+oosyyyysyyhys+/:--.........--:/+sssssyyso+///:////+++oosoo+//::-----+ddddddddddddddddddddddhhhdddddddddhdhddhdddddddddhhhhhddddddddhhdddddddddddddddddddddddddddd
mmmmmmmdddmmmddddddddddddh+::/sdddddddddddddddddddddmdhyyhdddhdddddddddddddddddddmmddddddy::::----:://+osssoo+++//::::::::/++oso+oyyo/:--.........--:/+o++o++//:::::://////+++ossso+/:-----/ddddddddddddddddddddddhhdddddddddddddddddddddddddhhhhhdddddddddhhdddddddddddddddddddddddmmmm
mmmmmdddmmmmdddddddddddddh/:::oddddddhhhhhyhhhhdddhdddsosydddhddhddddddddddddmdddddddddddy::::----:/+osyyysooo++/+///////:::---://:/+/:--....``...---:/:::---::////+++oosssssyssyyyo+:-----/hdddddddddddddddddddddhhhddddhdddddddddddddddddddhhhhhdddddddddddddddddddddddddddddmmmmddmmm
mmmmddmmmmdddddddddddddddh/---odddddhhhhhhhhddhhhhhddds+osdddhddhddddddddddddddddddddddddy::::----::/+oyhdhyhhyyyyyyysssso++//:---::::--............---:-:://++++osyyhdhdddhdhhys+/:::------/+shdddddddddddddddddhhhhdmddhhhhhhhdddddddddddddhhhhhddddddddddddddddddddddmmdddmmmmmmmmmmm
mmmmddmmmddhhhdddmddmmmddh/---odddddhhhhhhhdhhhhhhddddo/+sddhyhdhdddddddddddddddddddddhs++-::------:::://+yhhdhdhhhhdhhyso++/::----.............`.......----::://++ossysooyyyso//:---------....:yddddddddddddddddhhhddmdddhhhhhhhddddddddddddhhhhddddddddddddddddddddddddmmmmmmmmmmmmmmm
mmmmdhmmddhhhhdddmmdmddddh/-..+dddddddhhhdhhddddddddmdso+sdmhyhdhddddddddddddmmdddddds-....-----------::::/+ooosoo+o++//::---...................`..............--:://///+///+/::--------.--...-::sdddddddddddddddddddmmdddddddhhhhdddddddddddhhhdhddddddddddddddddddddmmmmmmmmmmmmmmmmmm
mmmmdhdmdhhhhhdmmmmmmddddh:.../hdddddddddddddddddddddhsoohdmdyhdhddddddddddddddddddds:/-....--------------:::::/:/::::----.......................................--------:-------------..----::-:+hdddddddmddddddddddddddddddddddddddddddddddhhhdhddddddddddddhhddddddmmmmmmmmmmmmmmmmmm
mmmmmdmmdhhyyhddmmmdmddddh:.../ydddddddddhddhhhdddmmmh+++sddysydhddddddddddddddddddd+:-::------------------------------...............................................-----------------...-::+/-.:ydddddddddddddddddmmmmdddddhhhhhhdddddddddddhhdhdddddmdddddhdddddddmmmmmmmmmmmmmmmmmmm
mmmmmdmmdhhyyyddmmmmmddddh:.../yhhdddddddhyyhhhhhddddy/::oddy+sdhddddddddddddddddddy:..:++:::---------------------..........`..............................................---------------:////:-:hddddddddddddddhdddmmddddhhhhyyyhdddddddmddddddhddmdmmdmdddddddddddmmmmmmmmmmmmmmmmmmm
mmmmmmmmmdhhhhdmmmmmmdddos:.../yhhdddddddhyyyhhhhhhddy---+dds/odyhhddddddddddddddddy:--///+/::------------------...............``...................`........................--------------/s+::/oddddddddmddddddhhdddmdddhhhhhyyyhdddddddmmdhhhhdddmmmmmmddddddddddmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmddhhddmmmmmmddo-s-...:yyhhdddddhssyyhhhhhhddy-../hdo-ohyhhddddddddddddddddds+:::+o+::-----------------..............................................................--------------:/so//yddddddddmddddddhhddmmdddhhhhhhhhdddddddmmmddhhhddddmmmmmmdddddddddmmmmmmmmmmmmmmmmmmmm
mmmmmmmddmdhhddmmmmmdd+--s:+o--:-+syyyyyyys+hhhhhhhhds-../hdo-ohyhhdddddddddddddddddh+/+s+:::::------------------...............................``........................----------------://+o/:hddddddddmddddddhhddmmdddhhhhhddddddddddddmddhhhhdddmmmmmmddddddddmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmddmddddmmmmmd+:-:o:sy//:...+sssyyys/yhhhhhhhds-../hdo:ohhddddddddddddddddddddo/+o+/+::/:-------------------.....................................................------------------:++//::yddddddddmddddddhdddmmddhhhhhhddddddddddddmdddhhhddddmmmmmddddddddmmmmmmmmmmmmmmmmmmmmm
mmmmmmmdhddmddmmmmmdo::::s:ss::+-:/osssssss/yhhhhhhhdy:.-+dds+odhdddddddddddddddddddh/:://+o////::--------------------------...........`....................------------------------------:::-:::yddddddddddddddddhddmmddhhhhhhddddddddddddmddddhddddddmmmmddddddddmmmmmmmmmmmmmmmmmmmmm
mmmmmmmdhhhdmddmmmdo///+yh:-:-:ssyyyyyyyyys+yhhhhhhddy:--+ddyosdhdddddddddddddddddddd+::--:////+/::-------------------------------.......--......----.....---------------------------------...-:+ddddddddddmdddddhhhdmmdddhhhhhddddddddddmmmdddhhdmdddddmmmddddddddmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmhhhhdmddmdy++oyhdh:...:shhhhhhhhhddoyhhhhhhddy:::+hdyoshhhdddddddddddddddddddy/:-...-//++/::::-----------------------------...--://:-----:/+/:------------------------------------:..-:/hdddddddddddddddhhhhddmdddhhhhhdddddddmmmmmmddhhhdmmmddddmmdddddhdmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmhyhhhdmddhssyddddh:...:shhdddddhhhhsyhhhhhhddh/::+hdhssdddddhhhhhdhhhdhdddddhhs::-..-:/+o+/:::::::-------------------------::/oyyyyysoo+osyyhyo/::--------------------------------:-.-:yddddddddddddddddhyhdddmdddhhhyhdddddddmmmmmmddhhddmmmmmdddmdddddhdmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmdhhdhdmmhhhdmddddh:...:shdddddhhhhhsyhyhhhhddh/:/ohdhyydhdddhhhhhhhhhhhhdddhhyy+:-..-::/o++//:::::::-----------------------/syhyssssddhhhsosyhhs+:---------------------::::-------:---+hhdddddddddddddddhydddmmddhhhyyydddddddmmmmmmdddhddmmmmmmmmmdmdddddmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmdddhhdmdmmmmmdddh:...:sdddddddhhhdsyyyhhhhhdd+//ohddhddhdddhhhhhhhhhhhhhhhhhhhy+----://++++//:::::::::--------------------:/ooo+//+yyhys+///++/::-------------------::::::::----::::/yhhhhhhdddddddddmdhyhddmmddhhhyyyhdddddmmmmmmmddhhddmmmmmmmmmdddmddmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmdddmddddhhhyyh/---/ydddmmddddddsyyhyhhhdddo++shdddddhhhdyhhyhhhyhhhhdhdhysyyo/::::///+++/////::::::::-----------------------::::://::::-----------------------::::::::::::---/++oydddddddddddddddmmdhyhddmmddhhyyyyddddddmmmmmmmdddddddddddddmmddmmmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmdddhhdmdmmmmddhhh+:::+dhhdhhhhhhhhoyhhyyhhdmdssosyhddmdhhddyhhhhhhyhhhhdhdhyyyyyys+++o+//+++//////:::::::::------------..........------..-.......--------------:::::::::::::---:shddddddddddddddddddmmdyshddmmddhhyyhhdmmmdddmmmmmmmdddmdmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmdhhhhhdmdmmmmmmdddo/::odhhhhyyyyyys+syyyyhhdddyyyyyhddddhhddhhhhhhhyhhhhhddhyyhyyyyhmdys///++///////::::::::::----------...........................-----------:::::::::::::::---/mmddddddddddddddddddmmdyshddddddhyyyyyhdddddddddmmmmdddddmmmmmmmmmmdddmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmhsshhhmmmhhdmmddddo///sdhhhyyyyyyys+syyyyyhddmhyyhyhddddhhdhyhhhhhhyhhhhdhdhysyysyysydmds////////////:::::::::-----------.........................------------::::::::::::::---:shhhdddddddddddddddmdmmdyshddmdddyyyysshdddmddddmmmmmdddddmmmmmdddmmmddmdmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmms+shhmmmmdyyhdmddds+ooyhhhhhyyyyyysoyyyyyyhhdmdhhhyyhdddhhddhhhyhhhyhhyhhhdhhyyysssssysys+///////////:::::::::-------------....-----......-------------------::::::::::::::----/hhhhhhdhdddddddddddddddhyshhdmdhdyyssssydddmmmmmmmmmddddddmmmddhdmmmmmdmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmdsoyhdmmmmmhyyyhddmyossyydddddhdhhysyyyyyyyhhdmmhhhyyhdddhhddyhhyhhyyhhhhhhdhhyyysssosyosos+/////////::::::::::--------------:://////:---::///////::--------:::::::::::::::----:ohhhhhhhhhhhdhddddddddddhsohhdmdhdyyssssssydmmmmmmmmmddhhhdmmddhdmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmhhhmmmhmmmmhyyyhddysyyyydhddddhddyssyyyyyyhhdmmhhhyyhdddhdddyhhyhhhyhhyhhhdyysyysssossoso+o////////:::::::::::::::::::::://++oooooo+++///++++oooooo+++///:::::::::::::::::----+hhhhhdhddddddhhddddddhddhsohhdmdddhyssssoooymmmmmmmmmddhhhddddhdmmmmmmmmmmmmmmmmmmmmmNNNNNNNNNNmm
Nmmmmmmmddmmdyymmmmmhyyyhdhyyyyydhddhhhhdyssssyyyyhhdmmddhsyhdddhhhhyhhyhhhyyhhhhhhhysyysssosysso+/+//////:::::::::::::::://+osssoooo+////++ooo++++/////++oossoo+//:::::::::::::::---/yhhhhddhhdddddhdddhdddhdddsohdmmdddyyssssoooydmmmmmmmmdhhhhdddddmmmmmmmmmmmmmmmmmmmmNNNNNNNNNNmmmm
NNNNNNmddmmmysymmmmmmdhhhdhyyyhshhdddhdddysssyyyyyhdmmmmdhyhhhhhhdddhhhhhhyyyhhhhhhyysyysssossoso+//++////::::::::::--:::://+///:--........................---::::::::::::::::::::::/shhhhhhhhhhddhdhhddddddhddhhshdmmdddhyyssssooydmmmmmmmmdhhhhddddmmmmmmmmmmmmmmmmNNNNNNNNNNNNNNNNmmm
NNNNNmmmmmmhhyhmmmmmmmdhhdhyyyhshhdddddddhyyyyhyhyhhhhhhddhhhhhhhhddyhhyhhyyhhhhhhhyysyssssossoso+://o++////::::::-----:::::::::::::-------...-....-----:::::::::::::::--::::::::::/syhhhhhhhhhdddhhyhhdddddhddhhhhddhhyyyyyyyysssydmmmmmmmmdhhhhdddmmmmmmmmmmmmmmmmmNNNNNNNNNNNNNNNmmmm
NNNNNmmmmmhhyshmmmmmmmmdhhhhhhhhhhhhhddddhyyyyyyyhhhhdddmhhhhhhhhdddyhhyhhyyhhyhhhhyysyssssossoso+++++so++///::::::--------::::::////////:::--:---::://////:::::::::::----::::::::/syyyhhhhhhhhhdhhdhhhdddddhddhyyhddddyyyyssssssshmmmmmmmmmdhhhdddmmmNNNNNmdmmmmmmmmNNNNNNNNNNNNNNNmmmm
NNNNNmmNmdyhhyhmmmmmmmmmdddhhhdhhhyyyyyyhyssssssyyyydmdddhsyyhhhhhhhyyyyyyyyyyyhhhhyyssssssossoso+++o//syo++///::::----------:::://///+++++++++++++++////::::::::-::::::::::::://+yyyyyhhhhhhhhhdhhdyhhddhddhddhsoyddddhysssooo++oymmmmmmmmmdhhhddmmmmNNNNNmmmmmmmmmmNNNNNNNNNNNNNNmmmmm
NNNNmddmmdyyhhdmmmmmmmmddddhhhdhhhyyyyyhhsooooossssyhddddyosyyhhhhddyhhhyyyyhhyhhhhyysssossossossoooo//+yhyo++//::::-----------::::::://////++///////::::::::::----:::::::::///+oyhyyyyyhhhhhhhhhhhhyhhddddhhddhs+yhdddysooooo++++smmmmmmmmmddhhhdmNmNNNNNNmmmmmmmmmmNNNNNNNNNNNNNNNmmmm
NNNNmdmmmhhyyyhmmmmmmmmmddddhhddhhhhhhhyhsooooossssyhdddhyosyyhdhdddyyhyyyyyyhhhhhhhysssossossossooo+//+oyhdyso+//::::-:-------------::----------------------------::::::://+oo/syyyyyyyhhhhhhhhdhddhhdddddhdddys+yhhddyssooo+++++smmmmmmmmmdhhdddmNNNNNNNNmmmmmmmmmmmNNNNNNNNNNNNNNNNNN
NNNNmdmmmdhhyyhmmmmmmmmmdhdhyyhddddddddhhsooosossyyyddddhyoydhhdhhddyyyyyyhyyhhhhhhhysysssssssosoooo++/+ssoyhdhyo+//::::-------------------------------------------::::://+sys//syyyyyyyhyyyhhhhhhddhdddddddddhds+yhhddhyysoooo+++smmmmmmmmmdyyhhdmNNNNNNNNmmmmmmmmmmmNNNNNNNNNNNNNNNNNN
NNNNmdmNmddhhyhmNNmmmmmmdhhhyyhyddddmddddysyyyyyyhhddmmddyoyddhdhhhhs+ooooooshhhddddso+++ooooo++ooooos:oyyo+oyddhys+//:::----------------.............------------:::://oshy+::shhhhhhdddmdmdmmdddddhddddhhyyyhds+yhddddhhhyyyyyyyhmmmmmmmmmdyhyhdmNNNNNNNNmmmmmmmmmmmNNNNNNNNNNNNNNNNNN
NNNNmmmNNmddhhdmNNNmmmmmdhhyyyhdddmdmddddddhhhhhhhdddddmdsoydhyssssssssyysossssyyyyyo+oo+++oo+++oooos/:syhs+/+sydddhs+//::-----------...................---------::://+shho/:::syyysssssoo+ooo++oosyyyo++++++oyhs+ohdhhyhyysssyyhdhmmmmmmmmmhyyyydmNNNNNNNNmmmmmmmNmmmNNNNNNNNNNNNNNNNNN
NNNNmmdmmNNmdddmNNNNmmmmmdyyyyyyddmdmdddhhdhyyyyyyhhhhhhso+ydhysssssssossso+//////::////://++:://////-//::/o///+oydmdhs+/:::---------...................--------:://oydho/::::--/:::-::::::::::::/ooo++ooooooshds+++oyyysssoooosyyymmmmmmmmmhyysydNNNNNNNNNmmmmNNmdmmNNNNNNNNNNNNNNNNNNN
NNNNNNmhhmNNmmdmmNNmmmmmmdysssysddmdmmdddysyhssssyyyyo+//++yhyyyyyys+//oyysso++/////////:/:++:::::::--::---o+/////oydmmdyo+/::----------.............---------:://oydho/::::::-:/:-:-:::://///+osyyyo/::/oyhhhdhs+////+oysoooooysoymmmmmmmmmhssoshNNmmNNNNmmmmmmmdmmNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhmNmmmdmmmmdhdmhsssosddmmmmmddhyssyysssyyo+/////+o+osyys+:::+sddhhhhyyyyyhyys////oysoooos/--//:::+o///////+shmmmhs+//:::-------------------------:::/+ohdho/::::::::osy+:/::yyhhhhhhhhhhddy+/:::/shhdhy+///:::/ssoooysssymmmmmNmmmyssoshNmmNNNmmmmmmmdmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdddhdmmmmmdmmmdmmhsoooomdmmdddddhyyhhyyyhyo//////+s++ooo+/////shdddhhhhhyyyyhhh/ss+hhyyyyyh/--+yhdddo////////+oshdNNmhyo+//:::::-----------::::::://+oyhhs+//::::::::+ssyy/so/hhyyhhhhhddddddys+//::+ydhhho///:::+yyssyhyyhmmmmmmmmmyssoshNNNNmmmmmmmmmmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdddddhhmmmmmdmmmmhso++ommmmdddddddhhyyyysyo///++oydo++++++ossyyhhyhyyyyyyyyyyyyoyyyhyhyyhhh/-/syhddds/:::://///+osydNNNNmhyso++/////:/:////////++osyhhys+///:::::::-:+osssossooooooooooosssooo++++/:/sdhhdhso+/::oyhhhdddmmmmmmmmmmmysooodNNmmmmmmmmmmmmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdddddddhhmmmmmmmmho+++smmmmdddddddddmhhdhyoosyhhdhssyyy+:--:::+sssyyyssyhyhhsoo+o++++++++++++o++++/++//::://////++oosyhdmNNNmmdhyyysssssssssyyhdddhsoo++///:::::::--:oyyhhhhhhdddddddmmmmmmmdho/::--:+sooosyyysooshddddddmmmmmmmmmNmhsooohmmmmmmmdmmmmmmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNdddhdmddmdhdmmmmdmho+++sddmddhhyhdddddhhdhhyysyyyyysoooo+/osyyyhhhhhhhyhdmdNNyyysyysyysyyyyhhhhyyhyyyh+/:::::://///+++oooosyhddddmmmmmmmmmddddhysso++++////:::::::---/dmmmmmmmmNNNNNNNNNNNNNNmmmmmddssssssyhhhhyyhhhddddmdmmdoooossyhhysosdmmmmmmdmNmmmmmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNddhhdddmNNmdddmdmmdhysyyo//://+++dmmmmmdddhhhyhhhhhy+////ymmmhhdddddhhdmmmmNNhyyyyyyyyyyyyyyyyyyyyyssso/:::::::://////++++++++oooooo++++++++++++++++/////:::::::::---/dmmmmNNmmNNNNNNNNNNNNNNmNNNNNNhdhhyyyhyyhyhhdmmmmmmmmmh/+//:::-/oodddmmmmmmNNNmmmmdmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmddhhhhdmNNNmddmmdddd+/:-++//+o++dmmmmmsymdmddddhhhy+///:smmmdddddddddmmmNmNNhyhyyyyyyyyyyyyyyyyyyyyyyo::::::::::////////++++///////////////////////////:::::::::----/dmmmNNNmmNNNNNNNNNNNNNNmNNNNNNhdhhyyyhdmmmNNNNmmmmmmmmy/+/:::o:-:+ddddmdmNNNNNmmdddmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmddhhhhdNNNNNNmdddddd+:-/o---:+++dmmmmmsymmmmdddddhh++//:smmmdddddddddmmmmmNNhhhhhhhyyhhyyyyyyyyyhyyyyo:::::::::::://///////////////:::::::////////////:::::::::-----:dmmmNNNmNNNNNNNNNNNNNNNmNNNNNNhdhhysyhmNNNNNNNNmNmmmmmy:/:-..:---/ddddmNNNNNNNmmmmmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhdhhdNNNNNNNmmdddd/-------///+dmmmmmsymmdddddddhho+//:smmmdhdddddddmmmNNNNhhhhhhhhhhhhhyyhhhyhhhhhhs::::::::::::::////////////::::::::::::////////::::::::::------:hmmNNNNmmNNNNNNNNNNNNNNNNNNNNNyhyysyyhmNNNNNNNNNmmmmmmy://:--...-/sshmNNNNNNNNmmmddddmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhhhhdNNNNNNNmNNyo++:...--:+/:+dmmmmmoymddddddddhho++/:ymNmdhdddddmmmmNNNNNdddddhhdddhhhhyhhhhhhhhhhy/:::::::::::::::///////////:::::::::::////////::::::::::------:hmNNNNNmNNNNNNNNNNNNNNNNNNNNNNyhyysyydNNNNNNNNNNmmmmmmy-:/--....-///ymNNNNNNNNmmmdddmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhhhddNNNNNNNNNNy+/+-.....-//:+dmmmmmsymdhdmmmddhhso+//ymNmdhmmdddddmmmNNNNdddddddddddhhhhhhdhdddhdhy:::::::::::::::::///////////::::::::::///////:::::::::::------:hmNNNNNmNNNNNNNNNNNNNNNNNNNNNNyhyyyyydNNNNNNNmmmddddddy-::----.../:/smNNNNNNNNmmmmmddmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhhhdmNNNNNNNNNNs///-.-::/://:+dddhhhhhddddmmmddhho++//ymNNdhmmdddddmmmNmNNddmdddddddddddhdddddddddds:::::::::::::::://////+++/////::::::////////:::::::::::--------ommmNNNmNNNNNNNNNNNNNNNNNNNNNNyhyyyyhdmmddhhhhyhhhhhddy-::-//:/:-/:/smNNNNNNNNmmddddmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhhhhmNNNNNNNNNNs///-/+-:/--::+hhdhhhhhhyyyyyyhhhyoo+/:ymNNddmmmddmmmNNNNNNddmmmmdddddddddddddddddddo:::::::::::::::::///////////////:::////////::::::::::::---------/ydmmmmmNNNNNNNNNNNNNNNNNNNNNyhyysyyssssssssyyyhhhhhdy--..-/::+-/:/smNNNNNNNNmmddmmmNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmddhhhhmNNNNNNmNNNs///-/+:/....-/hhhhhhhhyyyyysssosyso+//ymNNddmmmmmmmmNNNNNNddmmmddddddddddddddddddy/--::::::::::::::::::////////////::::::::::::::::::::::-----------../sdmmmmmmmmmNNNNNNNNNNNNNNNyhyyssyoooossssyyyyhhhdds--...-:/o-+::smNNNNNNNNmmmdmmmNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmddhhhhdNNNNNNmNNNs/:/-//--...--/hhddhhhyyyyyssssooyso+++hmNNddmmmmmmmmNNNNNNddmddddddddddddddddddy/-..-::::::::::::::::::::::::::::::::::::::::::::::::::-------------....:yddmmmmmmmmmmmmmNNNNNNNNyhyyssyoooosssyyhdddmmddy--:.--.-:-/::smNNNNNNNNmmmdmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhhhdmNNNNNNNNNNs///---.---::-/hdddmmhhdhhyysssooyoosoohmNNmdmmmmmmmmmmmmmmhddddddddddddddddddy+..-..-::-:::::::::::::::::::::::::::::::::::::::::::::-:-------------......-/syhddmmmmmmmmmmmmmmmmyhhysssoosyhddmmmmmmmmmdy--:-......+:/smNNNNNNNNmmmmmmmNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmdhhhhdmNNNNNNNNNNs+//-......::-/hdddmmyyNmmmmddhyyyssso+hmNNmdmmmmmmmmmmmmmmhhddhhhhhhhhhhhyso/-.....---::-::::::::::::::::::::::::::::::--::::::::-------------------..........-:osyyyyyyhhhhhhhhdsyyyssyhdmmmmmmmmmmmmmmdy-::......-+:+omNNNNNNNNmmmdmmmmNNNNNNNNNNNNNNNNNNMNN
NNNNNNNmhhhhhdmNNNNNNNNNNs+//-......:/-/dddmmmyyNmmmmmmmmhhssso+hmmmmddddhhyssoo+++/:::------------......`...---::-:::::::::::::::::::::::::-------::::::---------------------...-.......`.....---.....--------://+ossyyhddddmmmmmdy-::-.....-+:/ommNNNNNNNmmmmmmmmNNNNNNNNNNNNNNNNNNNNN
NNNNNNNmhhhhhhdNNNNNNNNNNs+//-.....-//:+dmmmmmsyNmmmmmmmdhyoo++/+o++/::---................................-..----:--::::::::::::::::::::::::--------:::::----------------------...-.............-::--....................---::/+++o+--:......-+:/ommNNNNNNNmdddmmmmNNNNNNNNNNNNNNNNMMNMM
MMMNNNNmhhhhhhdNNNNNNNNNms+/+-.....-:/:+ddddddooyysoo+/::--...................-----:::::-----............-...-------:::::::----:::::::::::::--------::::-----------------------...................--::///+++//:::----.........................--:/hdmmmmNNmmdddmmmmNNNNNNNNMMMMMMMMMMMMM
MNNNNNNdhhhhhhhmNNNmNNNNms+/+:.....-//:/yso+/:...................----:://+oossyyyhhhs////:-..............-...----:---:-----------::::::::::::----------------------------------......................--://++oooooossssoo+++///:::::--.............--:+oyhddmdddmmmmNNNNNNNNNNNNNNNNMMMMM
MMNNMNNmdhhhhhdmNNmmNmNmmy+/+:.....-:-..............--::://+++oosyyhhhddddddddddhysso/:--................-....---------------------::::::::::-------:--------------------------.........................-:/:-..--:+ooysoooossyhyyyysooooo+++/::--........-:/+syhdmmNNNNNNNNNNNNNNNNNNNNN
MMMNNNNmdhhhhhdmNNNmNmmmmyo+/:.............-://+ossyyyyysyyoooooyddddhdddhhys+/:-///:-..................-.....-----------------------::::::::::::-----------------------------............................-:::.......-::/++osyhyyhhy/oo//::/+oyssso//:-........-:/+syhdmNNNNNNNNNNNNNNNN
MMNNNNNmdhhhhyhmmmmmmmdhy+:-..........-//+yhddhhyyyhhhhssss+++++ydddhys+/--....-//:-.....`..............-......------------------------::::::::-------------------------------..............................-::-...`......--:/+oyhhs/oo:::----ooshmsoosso+:--.........:/+syhdmNNNNNNNNNN
NNNNNNNmdhhhyyhddhys+:-..........-:+oss+::dmmmhhhyyyyhyyoos++//+oso/-........-::-...............................------------------------::::::::-----------------------------..................................-...`............-:/+/o+:-:---:osshm+-:ymmmdhyso/:--........--:/oshhdmmmm
NNNNNNNmdhyyso+/:-.........-://+oo++sy+-.-dmmmhhmdddhhyyooo/:-...........`...//:-................................---------------------------:::-----------------------.----....................................--..........``...``...---.----:ossym+--ymNNNmmmdddhyso/::-.........-:/+sy
NNNmmdhyo/:-..........-:+osyso/::-::oh+-.-dddmhydddddhys/:-.................----..................................-------------------------------------------------------.......................................-...............``..........--+oosd/--ymNNNmmmmdmmmNNmddyso/:-..........
dhs+/:-.........--:+oyhdmhyso/:::::/sho-.-ddddyshhys+/-.....................-......................................-----------------------------------------------------........................................--.....`.......``.`............-/oh/--smmNNmmmmmmmNNNNNNNNmmdhys+/:-....
-..........-:/osyddmmNNNNhyoo+::::::oy+-.-dddho//:-.........................-......................`...............-----------------------------------------------------..................`...........``.......---.`.`............................:---sddmmmmmmmmmNNNNNNNNNNNNNNmmdhyo+/
......-:/osyhddmmmmmmNNNNhyoo+::::::oy+-.-ys/-.............................--.......................................---------------------------------------------------...................................-------:....................................+hddmmmmmmmmNNNNNNNNNNNNNNNNNNmmmd
--/+syhdddhhhhmmmmmmNNNNNhyoo+::::::oh+-..:................................-..........................................-------------------------------------..---------....................................--...--:-....................................-+ydmmmmmmmNmmmmNNNNmmmmmmmNNNNNN
hdmmmmmmdhhhhhmmmmmmNNNNNhsso+:::::/oy/...`...............................--...........................................----------------------------------....--------......................................-------:......................................-/ydmmmmmNmmmmmmmmmmmmmNmmmNNNN
mmmmmmmmdddddhdmmmmmNNNNNdyso+:::::::-....................................--....-........................................----.......-------------------........-----.....................................`.....---:........................................./ydmmmNmmmmmmmmmmmmmmNNNNNNN
mmmmmmmNmmdddddmmmmmNNNNNdyo++::::-.......................................--...............................................---.........--------------.........----..................................`...........--:.........................................../hmmmmmmmmmmmmmmNNNNNNNNNN
mmmmmmmNmmdddddmmmmmNNNNNds++o::-......................................`..:-............................................................------------................................................`...........--/............................................-sdmmmmmmmmmmmNNNNNNNNNNN
mmmmmmmNmddddddmmmmmNNmNNds+++:...........................................---...-........................................................----------...................................................`.....----::/............................................../ydmmmmmmmNNNNNNNNNNNNN
mmmmmmmNmmdddddmmmdmNNmNNds+/:............................................--...--................-..........................................------....................................................`.`...--::::/................................................odmmmNNNNNNNNNNNNNNNN
mmmmmmmNmmdddddmddddmNmNmhs/-..........................................`..---..--..........................................................................................................................----::::................................................./hmmmNNNmmmmmmmmmmmm
mmmmmmmNmmdddddmdddddmmddh/...............................................-:-..............................................................................................................................-:::::/:..................................................-smNNNNmmmmmmmmmmmm
mmmmmmmNmmmddddmmmmddddhy/................................................:/:--..-.........................................................................................................................::::::/:....................................................+dmmmmNmmmmmmmmNm
mmmmmmmNmmmmmddmmmmmddhs-.................................................-::-...-........................................................................................................................-::::://:.....................................................:hmmmmmmmNNNNNNN
mmmmmmmNmmmmmddmNmmddho-..................................................-/:------.......................................................................................................................:::::://:......................................................:dmmmmmmmNNNNNN

+ 48
- 0
LoadAndSave.pde View File

@@ -0,0 +1,48 @@
void loadSaveFile() {
File xiz10ciList = new File(dataPath("save.gse"));
if (xiz10ciList.exists()) {
String[] saveData = loadStrings("save.gse");
int entries = int((saveData.length)/7);
for (int i = 0; i < entries; i++) {
int id = int(saveData[i*7]);
String idlePath = saveData[i*7+1];
String actionPath = saveData[i*7+2];
int x_position = int(saveData[i*7+3]);
int y_position = int(saveData[i*7+4]);
float w = float(saveData[i*7+5]);
float h = float(saveData[i*7+6]);
marker[activeMarkers] = new Marker(id, idlePath, actionPath, x_position, y_position, w, h);
activeMarkers++;
}
}
}

FileWriter output = null;
void save_gse() {
File saveFile = new File(saveFilePath);
if (saveFile.exists()) {
saveFile.delete();
};
try {
output = new FileWriter(saveFilePath, true);
for (int i = 0; i < activeMarkers; i++) {
marker[i].saveToFile();
if (!(i == activeMarkers - 1)) {
}
}
}
catch (IOException e) {
println("It Broke");
e.printStackTrace();
}
finally {
if (output != null) {
try {
output.close();
}
catch (IOException e) {
println("Error while closing the writer");
}
}
}
}

+ 163
- 0
Marker.pde View File

@@ -0,0 +1,163 @@
Marker[] marker;
class Marker {
PImage[] idleImages;
PImage[] actionImages;
String idlePath;
String actionPath;
int id;
int frameIdle;
int frameAction;
int idleImageCount, actionImageCount;
float canvasPosX, canvasPosY;
float canvasImgW, canvasImgH;
boolean dead;
boolean loadActionRoutine;
boolean hasAction;
boolean waitForPlay;
boolean playAction;
boolean locked;
boolean drag;
boolean hover() {
if (viewX > canvasPosX && viewX < canvasPosX + canvasImgW && viewY > canvasPosY && viewY < canvasPosY+ canvasImgW) {
return true;
} else {
return false;
}
}
Marker(int idtemp, File[] i, int x, int y, String fp) { //casual idle import via drag'n'drop, no action animation
id = idtemp;
idlePath = fp + "/idle";
loadSequence(i);
hasAction = false;
canvasPosX = viewyfyX(x) - canvasImgW/2;
canvasPosY = viewyfyY(y) - canvasImgH/2;
}
Marker(int idtemp, File[] i, File[] a, int x, int y, String fp) { //casual import via drag'n'drop with action animation
id = idtemp;
idlePath = fp + "/idle";
actionPath = fp + "/action";
loadSequence(i);
loadSequence(a);
hasAction = true;
canvasPosX = viewyfyX(x) - canvasImgW/2;
canvasPosY = viewyfyY(y) - canvasImgH/2;
}
Marker(int idtemp, String i, String a, int x, int y, float cw, float ch) { //import from savefile
id = idtemp;
idlePath = i;
actionPath = a;
File idleDir = new File(i);
File[] idleFiles = idleDir.listFiles();
loadSequence(idleFiles);
if (!a.equals("null")) {
File actionDir = new File(a);
File[] actionFiles = actionDir.listFiles();
loadSequence(actionFiles);
hasAction = true;
} else {
hasAction = false;
}
canvasPosX = x;
canvasPosY = y;
canvasImgW = cw;
canvasImgH = ch;
}
void loadSequence(File[] filestemp) { //load images
File files[] = filestemp;
String filePaths[] = new String[files.length];
int imageCount = 0;
for (int i = 0; i < files.length; i++) {
filePaths[i] = files[i].getAbsolutePath();
if (isImage(filePaths[i])) {
imageCount++;
}
}
filePaths = sort(filePaths);
if (imageCount > 0) {
if (!loadActionRoutine) idleImages = new PImage[imageCount];
else actionImages = new PImage[imageCount];
imageCount = 0;
println("Loading animation...");
for (int i = 0; i < files.length; i++) {
if (isImage(files[i].getAbsolutePath())) {
if (!loadActionRoutine) idleImages[imageCount] = loadImage(filePaths[i]);
else actionImages[imageCount] = loadImage(filePaths[i]);
println("Loading image number..." + imageCount);
imageCount++;
}
}
if (!loadActionRoutine) {
idleImageCount = imageCount;
canvasImgW = idleImages[0].width; //assuming all images have the same size
canvasImgH = idleImages[0].height;
loadActionRoutine = true; //CAREFUL!! This is specifically designed for maximum 2 imports.
} else {
actionImageCount = imageCount;
loadActionRoutine = false;
}
} else {
println("This folder contains no PNGs and / or no GIFs.");
}
}

void rightClicked() {
if (!locked) {
draggingAsset = true;
drag = true;
clickedMarkerID = id;
}
}

void leftClicked() {
if (hasAction && !waitForPlay && !playAction) {
waitForPlay = true;
}
}

void display() {
if (!dead) {
frameIdle = (frameIdle+2) % idleImageCount;
if (waitForPlay) {
if (frameIdle >= idleImageCount - 1) {
waitForPlay = false;
playAction = true;
}
}
if (playAction) {
frameAction = (frameAction+2) % actionImageCount;
renderer.image(actionImages[frameAction], canvasPosX, canvasPosY, canvasImgW, canvasImgH);
if (frameAction >= actionImageCount - 3) {
playAction = false;
frameIdle = 0;
}
} else {
renderer.image(idleImages[frameIdle], canvasPosX, canvasPosY, canvasImgW, canvasImgH);
}
}
}
void saveToFile() throws IOException { //open the IO stream outside...
//output.write("\"id\": " + str(id) + ",\n");
//output.write("\"idlePath\": \"/" + idlePath + "\",\n");
//output.write("\"actionPath\": \"" + actionPath + "\",\n");
//output.write("\"x-position\": " + canvasPosX +",\n");
//output.write("\"y-position\": " + canvasPosY + ",\n");
//output.write("\"width\": " + canvasImgW + ",\n");
//output.write("\"height\": " + canvasImgH);
output.write(str(id) + "\n");
output.write(idlePath + "\n");
output.write(actionPath + "\n");
output.write(canvasPosX +"\n");
output.write(canvasPosY + "\n");
output.write(canvasImgW + "\n");
output.write(canvasImgH + "\n");
}
void kill() {
dead = true;
drag = false;
Marker temp = marker[activeMarkers-1];
marker[activeMarkers-1] = marker[id];
marker[id] = temp;
activeMarkers--;
draggingAsset = false;
}
}

+ 85
- 0
MouseAndKey.pde View File

@@ -0,0 +1,85 @@

void mousePressed() {
if (!draggingAsset) {
if (mouseButton == CENTER) {
if (!zoomedState && scaleFactor == 1.0) {
zoom(3);
} else {
reset();
}
zoomedState = !zoomedState;
} else if (mouseButton == RIGHT) {
for (int i=0; i < activeMarkers; i++) {
if (marker[i].hover()) {
marker[i].rightClicked();
}
}
} else if (mouseButton == LEFT) {
for (int i=0; i < activeMarkers; i++) {
if (marker[i].hover()) {
marker[i].leftClicked();
}
}
}
}
}

void mouseClicked(MouseEvent evt) {
if (evt.getCount() == 2) {
draggingAsset = false;
for (int i=0; i < activeMarkers; i++) {
if (marker[i].hover()) {
marker[i].drag = false;
marker[i].locked = !marker[i].locked;
}
}
}
}

void mouseReleased() {
if (draggingAsset) {
draggingAsset = false;
marker[clickedMarkerID].drag = false;
}
}

void mouseDragged(MouseEvent e) {
if (zoomedState && !draggingAsset) {
translateX += mouseX - pmouseX;
translateY += mouseY - pmouseY;
collisionDetection();
} else if (draggingAsset) {
marker[clickedMarkerID].canvasPosX = viewX - marker[clickedMarkerID].canvasImgW/2;
marker[clickedMarkerID].canvasPosY = viewY - marker[clickedMarkerID].canvasImgH/2;
}
}

void mouseWheel(MouseEvent e) {
float factor = e.getCount() > 0 ? 1.0/1.05 : e.getCount() < 0 ? 1.05 : 1.0;
if (!draggingAsset) {
zoom(factor);
zoomedState = true;
if (scaleFactor <= 1.0 && e.getCount() > 0) {
reset();
}
} else {
marker[clickedMarkerID].canvasPosX += marker[clickedMarkerID].canvasImgW/2;
marker[clickedMarkerID].canvasImgW *= factor;
marker[clickedMarkerID].canvasPosX -= marker[clickedMarkerID].canvasImgW/2;
marker[clickedMarkerID].canvasPosY += marker[clickedMarkerID].canvasImgH/2;
marker[clickedMarkerID].canvasImgH *= factor;
marker[clickedMarkerID].canvasPosY -= marker[clickedMarkerID].canvasImgH/2;
}
}

void keyPressed() {
if (draggingAsset) {
if (key == DELETE) {
marker[clickedMarkerID].kill();
}
}
if (key == 's') {
save_gse();
println("Saved");
}
}

+ 33
- 0
README.md View File

@@ -0,0 +1,33 @@
gSprite-Engine
Tiny 2D-animation sprite composer for interactive animation loops

Places clickable animations on a background image.

How to use:
To import an animation, drag and drop a folder from your file system to the gse-window.
You can use the example_animation folder and just throw it in the water, I recommend.
The folder must contain another folder called "idle". In this folder, the idle-animation that sould be looping by default must be present as .png or .gif image strip.
Next to the "idle" folder there might an "action" folder be placed. In that folder, place an image strip with an animation that should be triggered if the idle animation is being clicked at.
If gse doesn't find an action folder, it assumes the animation is non-interactive.

Folder structure:
idle - animationframe0001.png, animationframe0001.png ...
/
animation
\
action - actionanimationframe0001.png, actionanimationframe0001.png ...

Once the folder has been imported the animation should instantly be visible on the map.

Animation controls:
To trigger the action animation, simply left-click the animation. The action animation will be started after the current loop of the idle animation has finished.
To move the animation around, right-click and drag it.
To scale an animation, right-click it and keep pushing while scrolling the mouse wheel.
To delete an animation, right-click it and keep pushing while pressing Del.
To lock an animation, so you can't move it anymore by accident, double click it. Double click again, to unlock it.
Navigation controls:
Middle mouse click to zoom in and out at fixed positions.
Mouse wheel scroll to zoom dynamically.
Left-click on the background to drag the map around.

To save the setup as .gse file, press s. The program will automatically load the save file on startup. It is located in the sketches data folder. Back it up now and then ~.

+ 41
- 0
View.pde View File

@@ -0,0 +1,41 @@
void calculateViewport() {
//fokkin mahjick viewport calculateion scale translate tath bitch back and map to mouse
viewportX = map(-translateX/scaleFactor, 0, width, 0, renderer.width);
viewportW = map((-translateX+width)/scaleFactor - (-translateX/scaleFactor), 0, width, 0, renderer.width);
viewportR = map((-translateX+width)/scaleFactor, 0, width, 0, renderer.width);
viewportY = map(-translateY/scaleFactor, 0, height, 0, renderer.height);
viewportH = map((-translateY+height)/scaleFactor - (-translateY/scaleFactor), 0, height, 0, renderer.height);
viewportB = map((-translateY+height)/scaleFactor, 0, height, 0, renderer.height);
viewX = map(mouseX, 0, width, viewportX, viewportR);
viewY = map(mouseY, 0, height, viewportY, viewportB);
}
float viewyfyX(float x) {
return map(x, 0, width, viewportX, viewportR);
}
float viewyfyY(float y) {
return map(y, 0, height, viewportY, viewportB);
}

void zoom(float delta) {
translateX -= mouseX;
translateY -= mouseY;
scaleFactor *= delta;
translateX *= delta;
translateY *= delta;
translateX += mouseX;
translateY += mouseY;
collisionDetection();
}

void collisionDetection() {
while (translateX*scaleFactor > 0.0) translateX--;
while (translateY*scaleFactor > 0.0) translateY--;
while (translateX+width*scaleFactor < width) translateX++;
while (translateY+height*scaleFactor < height) translateY++;
}

void reset() {
scaleFactor = 1;
translateX = 0.0;
translateY = 0.0;
}

BIN
assets/background.jpg View File


+ 7
- 0
data/save.gse View File

@@ -0,0 +1,7 @@
0
/home/giers/0ARBEIT/SpriteEngine/gse/example_animation/idle
/home/giers/0ARBEIT/SpriteEngine/gse/example_animation/action
2149.8884
1619.6163
350.2232
260.76724

BIN
example_animation/action/frame0000.png View File


BIN
example_animation/action/frame0001.png View File


BIN
example_animation/action/frame0002.png View File


BIN
example_animation/action/frame0003.png View File


BIN
example_animation/action/frame0004.png View File


BIN
example_animation/action/frame0005.png View File


BIN
example_animation/action/frame0006.png View File


BIN
example_animation/action/frame0007.png View File


BIN
example_animation/action/frame0008.png View File


BIN
example_animation/action/frame0009.png View File


BIN
example_animation/action/frame0010.png View File


BIN
example_animation/action/frame0011.png View File


BIN
example_animation/action/frame0012.png View File


BIN
example_animation/action/frame0013.png View File


BIN
example_animation/action/frame0014.png View File


BIN
example_animation/action/frame0015.png View File


BIN
example_animation/action/frame0016.png View File


BIN
example_animation/action/frame0017.png View File


BIN
example_animation/action/frame0018.png View File


BIN
example_animation/action/frame0019.png View File


BIN
example_animation/action/frame0020.png View File


BIN
example_animation/action/frame0021.png View File


BIN
example_animation/action/frame0022.png View File


BIN
example_animation/action/frame0023.png View File


BIN
example_animation/action/frame0024.png View File


BIN
example_animation/action/frame0025.png View File


BIN
example_animation/action/frame0026.png View File


BIN
example_animation/action/frame0027.png View File


BIN
example_animation/action/frame0028.png View File


BIN
example_animation/action/frame0029.png View File


BIN
example_animation/action/frame0030.png View File


BIN
example_animation/action/frame0031.png View File


BIN
example_animation/action/frame0032.png View File


BIN
example_animation/action/frame0033.png View File


BIN
example_animation/action/frame0034.png View File


BIN
example_animation/action/frame0035.png View File


BIN
example_animation/action/frame0036.png View File


BIN
example_animation/action/frame0037.png View File


BIN
example_animation/action/frame0038.png View File


BIN
example_animation/action/frame0039.png View File


BIN
example_animation/action/frame0040.png View File


BIN
example_animation/action/frame0041.png View File


BIN
example_animation/action/frame0042.png View File


BIN
example_animation/action/frame0043.png View File


BIN
example_animation/action/frame0044.png View File


BIN
example_animation/action/frame0045.png View File


BIN
example_animation/action/frame0046.png View File


BIN
example_animation/action/frame0047.png View File


BIN
example_animation/action/frame0048.png View File


BIN
example_animation/action/frame0049.png View File


BIN
example_animation/action/frame0050.png View File


BIN
example_animation/action/frame0051.png View File


BIN
example_animation/action/frame0052.png View File


BIN
example_animation/action/frame0053.png View File


BIN
example_animation/action/frame0054.png View File


BIN
example_animation/action/frame0055.png View File


BIN
example_animation/action/frame0056.png View File


BIN
example_animation/action/frame0057.png View File


BIN
example_animation/action/frame0058.png View File


BIN
example_animation/action/frame0059.png View File


BIN
example_animation/action/frame0060.png View File


BIN
example_animation/action/frame0061.png View File


BIN
example_animation/action/frame0062.png View File


BIN
example_animation/action/frame0063.png View File


BIN
example_animation/action/frame0064.png View File


BIN
example_animation/action/frame0065.png View File


BIN
example_animation/action/frame0066.png View File


BIN
example_animation/action/frame0067.png View File


BIN
example_animation/action/frame0068.png View File


BIN
example_animation/action/frame0069.png View File


BIN
example_animation/action/frame0070.png View File


BIN
example_animation/action/frame0071.png View File


BIN
example_animation/action/frame0072.png View File


BIN
example_animation/action/frame0073.png View File


BIN
example_animation/action/frame0074.png View File


BIN
example_animation/action/frame0075.png View File


BIN
example_animation/action/frame0076.png View File


BIN
example_animation/action/frame0077.png View File


BIN
example_animation/action/frame0078.png View File


BIN
example_animation/action/frame0079.png View File


BIN
example_animation/action/frame0080.png View File


BIN
example_animation/action/frame0081.png View File


BIN
example_animation/action/frame0082.png View File


BIN
example_animation/action/frame0083.png View File


BIN
example_animation/action/frame0084.png View File


BIN
example_animation/action/frame0085.png View File


BIN
example_animation/action/frame0086.png View File


BIN
example_animation/action/frame0087.png View File


BIN
example_animation/action/frame0088.png View File


BIN
example_animation/action/frame0089.png View File


+ 0
- 0
example_animation/action/frame0090.png View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save