From 8b0c17d87cc1c1a57f6afd258a729c28e0e2cb63 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 11:04:37 +0100 Subject: [PATCH 1/9] Add files via upload --- BatteryPet.py | 669 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 669 insertions(+) create mode 100644 BatteryPet.py diff --git a/BatteryPet.py b/BatteryPet.py new file mode 100644 index 0000000..9e92ee3 --- /dev/null +++ b/BatteryPet.py @@ -0,0 +1,669 @@ +#Thanks to @AyreGuitar +# +#Based on code posted by: +#@JasonTC from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/972253183814541342 +#@TPReal from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/975659380232060978 +# +#Disclaimer: +#Use at your own risk, no warranties or guarantees + +import thumby +from machine import ADC +import time + +thumby.saveData.setName("BatteryPet") + +adc = ADC(26) + +charging = 38000 +#level_0 = 32000 #~70min shuts off +level_1 = 33700 #~45min +level_2 = 34300 #~30min +level_3 = 35400 #~15min + +if (thumby.saveData.hasItem("hearts")): + hearts = int(thumby.saveData.getItem("hearts")) +else: + hearts = -1 + +if (thumby.saveData.hasItem("score")): + score = int(thumby.saveData.getItem("score")) +else: + score = 0 + +if (thumby.saveData.hasItem("stage")): + stage = int(thumby.saveData.getItem("stage")) +else: + stage = 0 + +if (thumby.saveData.hasItem("charges")): + charges = int(thumby.saveData.getItem("charges")) +else: + charges = 0 + +if (thumby.saveData.hasItem("pets")): + pets = int(thumby.saveData.getItem("pets")) +else: + pets = 0 + +# BITMAP: width: 32, height: 38 +egg1 = bytearray([255,255,255,255,255,255,63,63,207,207,207,207,243,243,243,243,243,243,243,243,207,207,207,207,63,63,255,255,255,255,255,255, + 255,255,15,15,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,204,204,0,0,15,15,255,255, + 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,243,243,0,0,0,0, + 252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252, + 48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48]) +egg2 = bytearray([255,255,255,255,255,255,63,63,207,207,243,243,252,252,252,252,252,252,240,240,51,51,15,15,63,63,255,255,255,255,255,255, + 255,255,63,63,195,195,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,192,192,3,3,63,63,255,255, + 255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,204,204,0,0,0,0,255,255, + 255,255,252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252,255,255, + 63,63,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,63,63]) +eggcrack1 = bytearray([255,255,255,255,255,255,63,63,207,207,243,243,252,252,252,252,252,252,240,240,51,51,15,15,63,63,255,255,255,255,255,255, + 255,255,63,63,195,195,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,192,192,3,3,63,63,255,255, + 255,255,0,0,243,243,207,207,63,63,207,207,243,243,207,207,63,63,207,207,243,243,3,3,204,204,0,0,0,0,255,255, + 255,255,252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252,255,255, + 63,63,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,63,63]) +eggcrack2 = bytearray([255,255,255,255,255,255,63,63,207,207,207,207,243,243,243,243,243,243,243,243,207,207,207,207,63,63,255,255,255,255,255,255, + 255,255,15,15,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,204,204,0,0,15,15,255,255, + 0,0,243,243,207,207,63,63,207,207,243,243,207,207,63,63,207,207,243,243,207,207,63,63,12,12,243,243,0,0,0,0, + 252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252, + 48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48]) + +# BITMAP: width: 60, height: 40 +eggopen1 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,7,153,153,225,225,255,255,255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,31,31,159,159,127,127,255,255,255,255,255,255,255, + 255,255,255,7,7,249,249,25,25,225,225,255,255,255,255,255,255,254,254,255,255,255,63,63,207,207,51,51,243,243,243,243,243,243,243,243,51,51,207,207,63,63,255,255,255,255,255,254,254,249,249,224,224,255,255,255,255,255,255,255, + 255,255,255,254,254,249,249,254,126,127,255,255,255,252,252,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,63,63,255,255,249,249,255,255,127,127,135,135,249,249,7,7, + 255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,240,240,12,12,243,243,243,243,204,204,195,195,243,243,243,243,243,243,243,243,51,51,192,192,51,51,204,204,3,3,240,240,255,255,255,255,126,126,249,249,249,249,254,254, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,195,195,195,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,3,3,192,192,195,195,255,255,255,255,255,255,254,254,255,255,255,255,255,255]) +eggopen2 = bytearray([255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,255,255,63,63,255,255,255,255,255,255, + 255,255,255,255,255,207,207,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,51,51,243,243,243,243,243,243,243,243,51,51,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,127,127,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,240,240,12,12,243,243,243,243,204,204,195,195,243,243,243,243,243,243,243,243,51,51,192,192,51,51,204,204,3,3,240,240,255,255,255,255,255,255,243,243,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,195,195,195,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,3,3,192,192,195,195,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) +eggopen3 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,207,207,195,195,195,195,207,207,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,252,252,3,3,3,3,3,3,3,3,252,252,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,243,243,207,207,204,204,204,204,204,204,204,204,207,207,243,243,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) +eggopen4 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,243,243,51,51,252,252,252,252,252,252,51,51,243,243,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,252,252,255,207,207,207,207,255,252,252,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) + +# BITMAP: width: 30, height: 30 +babymedium1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babymedium2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0, + 0,0,0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,255,255,207,207,207,207,252,252,63,63,0,0, + 0,0,0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0]) +babymedium3 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0, + 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,255,255,63,63,63,63,240,240,255,255, + 0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0]) +babymedium4 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,252,252,252,252,255,255,255,255,63,63,252,252,252,252,240,240,192,192,0,0, + 0,0,0,0,0,0,63,63,252,252,255,255,207,207,207,207,255,255,252,252,255,255,255,255,255,255,63,63,0,0, + 0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) +babymedium5 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babymedium6 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,192,192,48,48,252,252,252,252,255,255,255,255,63,63,252,252,252,252,240,240,192,192,0,0,0,0,0,0, + 0,0,63,63,252,252,255,255,207,207,207,207,255,255,252,252,255,255,255,255,255,255,63,63,0,0,0,0,0,0, + 0,0,0,0,0,0,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0,0,0,0,0]) +babymedium7 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0,0,0,0,0, + 255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0, + 0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0]) +babymedium8 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0,0,0,0,0, + 63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0,0,0,0,0, + 0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0]) +babymedium9 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0,0,0, + 0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0,0,0, + 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0]) +babymedium10 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0, + 0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0, + 0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0]) + +babysad1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,252,252,204,207,207,207,243,243,255,255,243,243,207,207,207,207,252,252,192,192,0,0,0,0, + 0,0,0,0,15,15,63,63,255,255,255,255,192,192,192,192,192,192,255,255,255,255,63,63,15,15,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) +babysad2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,63,63,243,243,243,243,252,252,63,63,63,63,63,63,252,252,243,243,243,243,63,63,0,0,0,0, + 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0]) + +babyenergie1 = bytearray([192,192,12,12,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,3,3,0,48,48,0, + 0,0,0,0,255,255,252,252,252,252,51,51,63,63,63,63,63,63,51,51,252,252,252,252,255,255,0,0,0,0, + 0,0,0,0,0,0,15,15,255,255,60,60,240,240,240,240,240,240,60,60,255,255,15,15,0,0,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,0,0,0,0,3,3,0,0,0,0,3,3,3,3,0,0,0,0,0,0]) +babyenergie2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,60,60,60,60,255,255,255,255,255,255,252,252,60,60,48,48,192,192,0,0,0,0, + 0,0,0,0,15,15,60,60,255,255,255,255,252,252,207,207,207,207,204,204,255,255,63,63,15,15,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) + +babylow1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babylow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0, + 0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0, + 0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0]) + +babyfull1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,240,240,255,159,63,63,159,255,240,240,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babyfull2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,240,240,252,252,255,255,15,15,255,255,255,255,255,255,15,15,255,255,252,252,240,240,0,0,0,0, + 0,0,0,0,15,15,63,63,127,127,63,63,63,57,51,51,57,63,63,63,63,127,127,63,15,15,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) +babyfull3 = bytearray([0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,240,240,255,159,63,63,159,255,240,240,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,7,7,3,3,3,3,3,3,3,3,3,3,7,7,3,3,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) + +# BITMAP: width: 40, height: 30 +poopenergie1 = bytearray([0,0,0,0,0,0,0,0,0,0,96,96,0,0,0,0,0,0,0,0,240,240,192,192,0,0,0,48,48,0,0,0,0,0,0,0,0,0,0,0, + 0,0,128,128,0,0,0,0,0,0,0,0,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,0,0,0,192,192,0,0,0,0, + 0,0,1,1,0,0,192,192,48,48,207,207,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +poopenergie2 = bytearray([0,0,0,0,0,0,0,0,0,6,6,0,0,0,240,240,252,252,255,255,252,252,252,252,240,240,192,192,0,0,0,12,12,0,0,0,0,0,0,0, + 0,0,0,0,0,0,3,3,192,192,240,240,255,255,255,255,63,63,255,255,255,255,63,63,255,255,255,255,255,255,240,240,0,0,3,3,0,0,0,0, + 6,6,0,0,240,240,12,12,243,243,255,255,255,255,255,255,231,231,207,207,207,207,231,231,255,255,255,255,255,255,255,255,255,255,252,252,0,0,12,12, + 0,0,0,0,15,15,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0]) +poopfull1 = bytearray([0,0,0,0,0,0,0,0,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,48,48,48,48,207,207,48,48,48,48,0,0,0,0, + 0,0,0,0,0,0,3,3,12,12,3,3,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,3,3,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +poopfull2 = bytearray([0,48,48,48,48,207,207,48,48,48,48,0,0,0,240,240,252,252,255,255,240,240,240,240,192,192,0,0,0,0,0,0,96,96,152,152,96,96,0,0, + 0,0,0,0,0,3,3,0,192,192,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,240,240,192,192,0,0,1,1,0,0,0,0, + 0,0,0,0,240,240,12,12,243,243,255,255,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,0, + 0,0,0,0,15,15,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0]) +poopmedium1 = bytearray([0,0,0,0,0,0,0,0,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,48,48,48,48,207,207,48,48,48,48,0,0,0,0, + 0,0,0,0,0,0,3,3,12,12,3,3,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,3,3,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,252,188,63,63,63,63,188,252,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +poopmedium2 = bytearray([192,192,192,192,60,60,192,192,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,0,0,0,192,192,48,48,192,192,0,0,0,0,0, + 0,0,0,0,15,15,0,0,0,0,0,0,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,3,3,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,252,188,63,63,63,63,188,252,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +pooplow1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,240,240,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,192,192,240,240,252,252,255,255,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,0,0,0,0,0,0,0,0, + 0,0,0,0,48,48,63,63,48,48,63,63,63,63,63,63,63,63,51,51,51,51,63,63,63,63,63,63,63,63,63,63,63,63,48,48,0,0,0,0]) +pooplow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,192,192,0,0,0,0,0,0, + 48,48,60,60,51,51,60,60,63,63,63,63,63,63,63,63,63,55,51,51,51,51,55,63,63,63,63,63,63,63,63,63,63,63,63,63,60,60,48,48]) +poopsad1 = bytearray([0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,6,7,15,15,3,0,0,96,96,0,0,0,0,0,0,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,192,192,0,0,0,0,0,0, + 48,48,60,60,51,51,60,60,63,63,63,63,63,63,63,63,63,55,51,59,59,51,55,63,63,63,63,63,63,63,63,63,63,63,63,63,60,60,48,48]) +poopsad2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,240,240,240,240,252,252,240,240,240,240,192,192,192,192,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,48,48,60,36,35,51,63,63,63,63,63,63,60,44,39,55,55,39,44,60,63,63,63,63,63,63,63,63,63,63,60,60,48,48,0,0]) + +mametchienergie1 = bytearray([0,0,0,0,0,96,96,0,0,0,24,228,2,2,2,2,4,152,160,160,160,160,160,160,184,132,130,130,2,228,60,0,0,0,96,96,0,0,0,0, + 0,0,0,6,198,192,0,0,0,60,255,255,247,251,251,251,27,23,31,31,31,31,31,23,251,251,251,247,239,255,254,124,0,0,0,128,140,12,0,0, + 0,0,0,0,0,0,0,0,3,7,14,253,249,251,255,255,255,254,252,252,252,252,254,255,255,255,255,251,57,28,14,6,0,0,0,1,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,15,31,31,15,7,7,7,7,7,7,7,7,7,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) + +mametchifull1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,64,60,2,2,2,2,2,124,64,64,124,2,2,2,2,2,60,192,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,60,255,254,238,247,247,247,247,111,127,127,127,127,127,239,247,247,246,246,236,252,255,124,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,243,255,63,255,255,31,255,255,255,31,255,255,63,255,255,243,3,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,3,15,31,30,14,7,7,7,7,7,14,30,31,15,3,0,0,0,0,0,0,0,0,0,0,0,0,0]) +mametchifull2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,140,122,2,2,2,2,12,112,64,64,64,96,16,12,2,2,2,132,120,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,60,255,238,246,246,246,246,247,47,63,63,63,63,63,47,246,246,246,238,223,255,254,124,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,192,224,241,251,127,255,255,255,255,254,254,254,254,254,255,255,255,223,191,123,241,96,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,1,14,31,31,15,7,7,7,7,7,7,7,15,31,31,15,1,0,0,0,0,0,0,0,0,0,0,0,0]) +mametchifull3 = bytearray([0,0,0,0,0,0,0,0,0,0,24,228,2,2,2,2,4,152,160,160,160,160,160,160,184,132,130,130,2,228,60,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,60,255,255,247,251,251,251,27,23,31,31,31,31,31,23,251,251,251,247,239,255,254,124,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,3,7,14,253,249,251,255,255,255,254,252,252,252,252,254,255,255,255,255,251,57,28,14,6,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,15,31,31,15,7,7,7,7,7,7,7,7,7,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) + +mametchimedium1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,248,6,1,1,1,1,30,32,64,64,64,64,124,6,1,1,1,2,4,120,128,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,124,255,254,198,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,192,224,241,251,127,255,255,255,255,255,252,253,252,255,255,255,255,223,191,123,241,96,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,1,14,31,31,15,3,3,3,3,3,3,3,3,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) +mametchimedium2 = bytearray([0,0,0,0,0,0,0,192,32,32,0,128,124,2,1,1,1,2,4,120,64,64,64,112,14,1,1,1,1,2,124,128,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,124,255,255,199,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,1,3,227,187,127,111,158,253,253,253,254,255,255,255,247,195,3,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,7,3,3,3,3,3,3,3,3,3,7,15,31,28,0,0,17,14,0,0,0,0,0,0,0]) +mametchimedium3 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,124,2,1,1,1,2,60,64,64,64,64,124,6,1,1,1,2,4,120,128,0,0,64,128,0,0,0,0, + 0,0,0,0,0,0,0,0,0,124,255,254,198,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,32,31,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,3,195,247,255,255,255,254,253,253,253,254,159,111,127,191,227,3,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,14,17,0,0,28,31,15,7,3,3,3,3,3,3,3,3,3,3,7,7,3,0,0,0,0,0,0,0,0,0,0,0]) + +mametchilow1 = bytearray([98,82,74,70,0,0,200,168,152,0,128,112,12,2,1,1,1,1,2,124,64,64,124,6,1,1,1,1,2,124,128,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,120,254,255,255,255,239,239,239,255,255,254,254,254,254,254,254,238,238,238,252,252,252,252,255,124,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,1,3,7,7,15,143,239,127,255,223,63,252,255,127,191,255,127,239,143,7,3,3,1,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,28,63,63,31,14,6,7,7,7,6,5,13,30,63,63,28,0,0,0,0,0,0,0,0,0,0,0]) +mametchilow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,124,2,1,1,1,1,6,124,64,64,124,2,1,1,1,1,2,12,112,128,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,124,255,252,252,252,252,254,230,254,254,254,254,254,254,254,255,255,231,255,255,255,255,255,254,120,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,3,3,7,143,239,127,255,191,127,248,248,56,223,255,63,239,143,15,7,7,3,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,28,63,63,30,13,5,6,7,7,7,6,14,31,63,63,28,0,0,0,0,0,0,0,0,0,0,0]) + +mametchisad1 = bytearray([0,0,0,0,0,0,0,0,0,0,224,16,12,4,4,3,1,1,2,28,32,32,64,64,32,16,8,4,2,2,2,2,4,12,240,0,0,0,0,0, + 0,0,0,0,0,0,0,0,192,224,248,253,183,178,176,176,176,176,208,224,224,224,224,224,224,224,192,160,160,160,160,160,160,227,252,240,0,0,0,0, + 0,0,0,0,0,0,0,0,3,7,15,159,223,223,157,248,189,157,159,143,143,143,143,159,159,189,184,189,189,175,183,59,27,15,7,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,12,29,61,61,61,63,31,31,31,31,31,31,31,31,31,31,31,24,55,55,57,60,30,12,0,0,0,0,0,0]) +mametchisad2 = bytearray([0,0,0,0,96,96,124,252,240,48,48,0,0,0,0,0,0,128,192,192,224,224,224,224,224,224,224,192,192,128,128,0,12,12,124,127,31,24,24,0, + 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,252,255,243,255,255,15,247,251,255,255,255,255,255,255,255,0,1,6,8,8,8,16,16,224,0, + 0,0,0,0,224,248,252,248,255,255,255,248,254,252,248,7,255,255,255,255,255,254,255,255,255,255,255,255,255,1,0,0,0,28,20,20,20,22,35,192, + 12,30,30,30,63,63,63,63,63,63,63,63,63,63,63,28,19,15,31,31,31,63,63,63,63,63,63,47,39,32,32,32,16,16,16,16,16,16,16,15]) + + +# BITMAP: width: 15, height: 13 +heart1 = bytearray([60,126,231,243,251,255,254,252,254,255,255,255,255,126,60, + 0,0,0,1,3,7,15,31,15,7,3,1,0,0,0]) +heart2 = bytearray([0,60,102,242,250,254,252,248,252,254,254,254,126,60,0, + 0,0,0,0,1,3,7,15,7,3,1,0,0,0,0]) +heart3 = bytearray([0,0,56,108,244,252,248,240,248,252,252,124,56,0,0, + 0,0,0,0,0,1,3,7,3,1,0,0,0,0,0]) + +# BITMAP: width: 7, height: 7 +heartFull = bytearray([14,25,63,126,63,31,14]) + +eggSpr = thumby.Sprite(32, 38, egg2+egg1, 20, 1) +eggcrackSpr = thumby.Sprite(32, 38, eggcrack2+eggcrack1, 20, 1) +eggopenSpr = thumby.Sprite(60, 40, eggopen1+eggopen1+eggopen2+eggopen2+eggopen3+eggopen3+eggopen4+eggopen4, 5, 1) +babyenergieSpr = thumby.Sprite(30, 30, babyenergie1+babyenergie2, 20, 15) +babymediumSpr = thumby.Sprite(30, 30, babymedium1+babymedium2+babymedium3+babymedium4+babymedium5+babymedium6+babymedium7+babymedium8+babymedium9+babymedium10, 20, 15) +babylowSpr = thumby.Sprite(30, 30, babylow1+babylow2, 20, 15) +babyfullSpr = thumby.Sprite(30, 30, babyfull1+babyfull2+babyfull3+babyfull2, 20, 15) +babysadSpr = thumby.Sprite(30, 30, babysad1+babysad1+babysad2+babysad2, 20, 15) +poopenergieSpr = thumby.Sprite(40, 30, poopenergie1+poopenergie2, 15, 10) +poopfullSpr = thumby.Sprite(40, 30, poopfull1+poopfull2, 15, 10) +poopmediumSpr = thumby.Sprite(40, 30, poopmedium1+poopmedium2, 15, 10) +pooplowSpr = thumby.Sprite(40, 30, pooplow1+pooplow2, 15, 10) +poopsadSpr = thumby.Sprite(40, 30, poopsad1+poopsad1+poopsad2+poopsad2, 15, 10) +mametchienergieSpr = thumby.Sprite(40, 30, mametchifull1+mametchifull2+mametchienergie1+mametchifull2, 15, 9) +mametchifullSpr = thumby.Sprite(40, 30, mametchifull1+mametchifull2+mametchifull3+mametchifull2, 15, 9) +mametchimediumSpr = thumby.Sprite(40, 30, mametchimedium1+mametchimedium2+mametchimedium1+mametchimedium3, 15, 9) +mametchilowSpr = thumby.Sprite(40, 30, mametchilow1+mametchilow1+mametchilow1+mametchilow2+mametchilow2+mametchilow2, 15, 9) +mametchsadSpr = thumby.Sprite(40, 30, mametchisad1+mametchisad1+mametchisad1+mametchisad2+mametchisad2+mametchisad2, 15, 9) + +heartSpr = thumby.Sprite(15, 13, heart1+heart2+heart3+heart2, 2, 2) + +heartFull1Spr = thumby.Sprite(7, 7, heartFull, 0, 0) +heartFull2Spr = thumby.Sprite(7, 7, heartFull, 8, 0) +heartFull3Spr = thumby.Sprite(7, 7, heartFull, 16, 0) +heartFull4Spr = thumby.Sprite(7, 7, heartFull, 24, 0) +heartFull5Spr = thumby.Sprite(7, 7, heartFull, 32, 0) +heartFull6Spr = thumby.Sprite(7, 7, heartFull, 40, 0) + +# BITMAP: width: 11, height: 5 +batt0 = bytearray([31,17,17,17,17,17,17,17,17,27,14]) +batt1 = bytearray([31,31,31,31,17,17,17,17,17,27,14]) +batt2 = bytearray([31,31,31,31,31,31,31,17,17,27,14]) +batt3 = bytearray([31,31,31,31,31,31,31,31,31,31,14]) +charg = bytearray([31,31,27,27,9,0,18,27,27,31,14]) +emula = bytearray([31,21,17,0,31,2,31,0,31,16,31]) + +# BITMAP: width: 16, height: 16 +sun1 = bytearray([192,192,12,12,192,192,51,51,48,48,192,192,12,12,0,0, + 0,0,48,48,3,3,12,12,204,204,3,3,48,48,3,3]) +sun2 = bytearray([0,0,12,12,192,192,48,48,51,51,192,192,12,12,192,192, + 3,3,48,48,3,3,204,204,12,12,3,3,48,48,0,0]) + +sunleftSpr = thumby.Sprite(16, 16, sun1+sun2, 0, 20) +sunrightSpr = thumby.Sprite(16, 16, sun1+sun2, 54, 20) + +iconx = 61 +icony = 0 +iconw = 11 +iconh = 5 +b=charging + +def showHearts(): + if hearts > 0: + thumby.display.drawSprite(heartFull1Spr) + if hearts > 1: + thumby.display.drawSprite(heartFull2Spr) + if hearts > 2: + thumby.display.drawSprite(heartFull3Spr) + if hearts > 3: + thumby.display.drawSprite(heartFull4Spr) + if hearts > 4: + thumby.display.drawSprite(heartFull5Spr) + if hearts > 5: + thumby.display.drawSprite(heartFull6Spr) + +def showSun(): + sunleftSpr.setFrame(frameCtr) + thumby.display.drawSprite(sunleftSpr) + sunrightSpr.setFrame(frameCtr) + thumby.display.drawSprite(sunrightSpr) + +def NewEgg(): + frameCtr = 0 + counter = 0 + thumby.display.setFPS(2) + while(counter < 50): + thumby.display.fill(1) + eggSpr.setFrame(frameCtr) + thumby.display.drawSprite(eggSpr) + thumby.display.update() + thumby.audio.play(200,100) + frameCtr += 1 + counter += 1 + while(counter < 100): + thumby.display.setFPS(4) + thumby.display.fill(1) + eggcrackSpr.setFrame(frameCtr) + thumby.display.drawSprite(eggcrackSpr) + thumby.display.update() + thumby.audio.play(300,100) + frameCtr += 1 + counter += 1 + counter = 0 + frameCtr = 0 + while(counter < 8): + thumby.audio.play(400,50) + thumby.display.setFPS(2) + thumby.display.fill(1) + eggopenSpr.setFrame(frameCtr) + thumby.display.drawSprite(eggopenSpr) + thumby.display.update() + frameCtr += 1 + counter += 1 + +if hearts > 6: + hearts = -1 + +if hearts == -1: + NewEgg() + hearts = 0 + score = 0 + stage = 0 + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('stage', stage) + thumby.saveData.save() + +hungry = 4 +frameCtr = 0 + +while (not thumby.buttonA.pressed()): + thumby.display.setFPS(4) + thumby.display.fill(0) + in_emu=not hasattr(thumby.display.display,"cs") + if (in_emu): + thumby.display.blit(emula,iconx,icony,iconw,iconh,-1,0,0) + else: + v=adc.read_u16() + b=min(b,v) + if (v > charging): + thumby.display.blit(charg,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babyenergieSpr.setFrame(frameCtr) + thumby.display.drawSprite(babyenergieSpr) + if stage == 1: + poopenergieSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopenergieSpr) + if stage == 2: + mametchienergieSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchienergieSpr) + if hungry == 1: + hungry = 100 + hearts += 1 + score += 1 + charges +=1 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.setItem('charges', charges) + thumby.saveData.save() + if hungry == 0: + hungry = 100 + hearts += 1 + score += 2 + charges +=1 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.setItem('charges', charges) + thumby.saveData.save() + if (hungry == 2) or (hungry == 3): + thumby.display.fill(0) + thumby.display.drawText("I am not!", 10, 5, 1) + thumby.display.drawText("hungry!", 17, 16, 1) + thumby.display.drawText("Damn!", 22, 28, 1) + thumby.audio.play(100,500) + hungry = 4 + if stage < 2: + score = hearts + else: + score = hearts + 11 + thumby.saveData.setItem('score', score) + thumby.saveData.save() + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + if hungry == 100: + heartSpr.setFrame(frameCtr) + thumby.display.drawSprite(heartSpr) + else: + showHearts() + if score > 21: + showSun() + if hearts == 7: + if score < 11: + stage = 1 + hearts = 0 + score = 0 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('stage', stage) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.save() + thumby.display.fill(0) + thumby.display.drawText("Try better!", 3, 5, 1) + thumby.display.drawText("Holy", 22, 17, 1) + thumby.display.drawText("SHIT!", 20, 28, 1) + thumby.audio.play(100,500) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + if (score > 10) and (stage < 2): + stage = 2 + hearts = 0 + thumby.saveData.setItem('stage', stage) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.save() + thumby.display.fill(0) + thumby.display.drawText("Well done!", 8, 5, 1) + thumby.display.drawText("Your pet", 10, 19, 1) + thumby.display.drawText("envolved!", 9, 30, 1) + thumby.audio.play(1000,500) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + if score > 17: + thumby.display.fill(0) + if score > 21: + thumby.display.drawText("**********", 6, 5, 1) + thumby.display.drawText("Exellent!!", 6, 17, 1) + thumby.display.drawText("**********", 6, 28, 1) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + thumby.display.fill(0) + thumby.display.drawText("**********", 6, 1, 1) + thumby.display.drawText("Mametchi", 12, 12, 1) + thumby.display.drawText("is happy!", 9, 23, 1) + thumby.display.drawText("**********", 6, 34, 1) + thumby.audio.play(1000,500) + pets += 1 + thumby.saveData.setItem('pets', pets) + thumby.saveData.save() + else: + thumby.display.drawText("Well done!", 8, 5, 1) + thumby.display.drawText("But you can", 3, 19, 1) + thumby.display.drawText("do better!", 6, 30, 1) + thumby.audio.play(100,500) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + thumby.display.fill(0) + thumby.display.drawText("Your pet", 10, 2, 1) + thumby.display.drawText("grows up", 10, 12, 1) + thumby.display.drawText("and leaves", 6, 22, 1) + thumby.display.drawText("its home!", 9, 32, 1) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + thumby.display.fill(0) + thumby.display.drawText("**********", 6, 1, 1) + thumby.display.drawText("You got a", 9, 12, 1) + thumby.display.drawText("new EGG!", 12, 23, 1) + thumby.display.drawText("**********", 6, 34, 1) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + NewEgg() + hearts = 0 + score = 0 + stage = 0 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('stage', stage) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.save() + frameCtr += 1 + b=v + else: + if (b > level_3): + thumby.display.blit(batt3,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babyfullSpr.setFrame(frameCtr) + thumby.display.drawSprite(babyfullSpr) + if stage == 1: + poopfullSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopfullSpr) + if stage == 2: + mametchifullSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchifullSpr) + showHearts() + if score > 21: + showSun() + hungry = 3 + frameCtr += 1 + elif (b > level_2): + thumby.display.blit(batt2,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babymediumSpr.setFrame(frameCtr) + thumby.display.drawSprite(babymediumSpr) + if stage == 1: + poopmediumSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopmediumSpr) + if stage == 2: + mametchimediumSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchimediumSpr) + showHearts() + if score > 21: + showSun() + hungry = 2 + frameCtr += 1 + elif (b > level_1): + thumby.display.blit(batt1,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babylowSpr.setFrame(frameCtr) + thumby.display.drawSprite(babylowSpr) + if stage == 1: + pooplowSpr.setFrame(frameCtr) + thumby.display.drawSprite(pooplowSpr) + if stage == 2: + mametchilowSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchilowSpr) + showHearts() + if score > 21: + showSun() + frameCtr += 1 + hungry = 1 + else: + thumby.display.blit(batt0,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babysadSpr.setFrame(frameCtr) + thumby.display.drawSprite(babysadSpr) + if stage == 1: + poopsadSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopsadSpr) + if stage == 2: + mametchsadSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchsadSpr) + showHearts() + hungry = 0 + frameCtr += 1 + while thumby.buttonU.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Current", 17, 6, 1) + thumby.display.drawText("Pet Score:", 8, 17, 1) + pixelLength = len(str(score)) * 5 + offset = int((thumby.display.width - pixelLength) / 2) + thumby.display.drawText(str(score), offset, 28, 1) + thumby.display.update() + pass + while thumby.buttonL.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Feed your", 9, 2, 1) + thumby.display.drawText("hungry pet", 6, 12, 1) + pixelLength = len(str(charges)) * 5 + offset = int((thumby.display.width - pixelLength) / 2) + thumby.display.drawText(str(charges), offset, 22, 1) + thumby.display.drawText("times!", 19, 32, 1) + thumby.display.update() + pass + while thumby.buttonR.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Raise happy", 3, 2, 1) + thumby.display.drawText("Mametchi", 13, 12, 1) + pixelLength = len(str(pets)) * 5 + offset = int((thumby.display.width - pixelLength) / 2) + thumby.display.drawText(str(pets), offset, 22, 1) + thumby.display.drawText("times!", 19, 32, 1) + thumby.display.update() + pass + while thumby.buttonD.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Hello", 19, 10, 1) + thumby.display.drawText("Friend!", 15, 21, 1) + thumby.display.update() + pass + while (thumby.buttonB.pressed()): + thumby.display.fill(0) + v=adc.read_u16() + b=min(b,v) + thumby.display.drawText("v=%d" % b, 0, 0, 1) + if (v > charging): + thumby.display.blit(charg,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("AC", 30, 22, 1) + else: + if (b > level_3): + thumby.display.blit(batt3,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Full", 25, 22, 1) + elif (b > level_2): + thumby.display.blit(batt2,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Medium", 20, 22, 1) + elif (b > level_1): + thumby.display.blit(batt1,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Low", 26, 22, 1) + else: + thumby.display.blit(batt0,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Very Low", 12, 22, 1) + thumby.display.update() + thumby.display.update() From b1028060358c4abf17c54ab09c0792c48b8adef2 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 11:10:13 +0100 Subject: [PATCH 2/9] Add files via upload --- BatteryPet/BatteryPet.py | 669 ++++++++++++++++++++++++++++++ BatteryPet/arcade_description.txt | 15 + 2 files changed, 684 insertions(+) create mode 100644 BatteryPet/BatteryPet.py create mode 100644 BatteryPet/arcade_description.txt diff --git a/BatteryPet/BatteryPet.py b/BatteryPet/BatteryPet.py new file mode 100644 index 0000000..9e92ee3 --- /dev/null +++ b/BatteryPet/BatteryPet.py @@ -0,0 +1,669 @@ +#Thanks to @AyreGuitar +# +#Based on code posted by: +#@JasonTC from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/972253183814541342 +#@TPReal from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/975659380232060978 +# +#Disclaimer: +#Use at your own risk, no warranties or guarantees + +import thumby +from machine import ADC +import time + +thumby.saveData.setName("BatteryPet") + +adc = ADC(26) + +charging = 38000 +#level_0 = 32000 #~70min shuts off +level_1 = 33700 #~45min +level_2 = 34300 #~30min +level_3 = 35400 #~15min + +if (thumby.saveData.hasItem("hearts")): + hearts = int(thumby.saveData.getItem("hearts")) +else: + hearts = -1 + +if (thumby.saveData.hasItem("score")): + score = int(thumby.saveData.getItem("score")) +else: + score = 0 + +if (thumby.saveData.hasItem("stage")): + stage = int(thumby.saveData.getItem("stage")) +else: + stage = 0 + +if (thumby.saveData.hasItem("charges")): + charges = int(thumby.saveData.getItem("charges")) +else: + charges = 0 + +if (thumby.saveData.hasItem("pets")): + pets = int(thumby.saveData.getItem("pets")) +else: + pets = 0 + +# BITMAP: width: 32, height: 38 +egg1 = bytearray([255,255,255,255,255,255,63,63,207,207,207,207,243,243,243,243,243,243,243,243,207,207,207,207,63,63,255,255,255,255,255,255, + 255,255,15,15,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,204,204,0,0,15,15,255,255, + 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,243,243,0,0,0,0, + 252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252, + 48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48]) +egg2 = bytearray([255,255,255,255,255,255,63,63,207,207,243,243,252,252,252,252,252,252,240,240,51,51,15,15,63,63,255,255,255,255,255,255, + 255,255,63,63,195,195,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,192,192,3,3,63,63,255,255, + 255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,204,204,0,0,0,0,255,255, + 255,255,252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252,255,255, + 63,63,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,63,63]) +eggcrack1 = bytearray([255,255,255,255,255,255,63,63,207,207,243,243,252,252,252,252,252,252,240,240,51,51,15,15,63,63,255,255,255,255,255,255, + 255,255,63,63,195,195,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,192,192,3,3,63,63,255,255, + 255,255,0,0,243,243,207,207,63,63,207,207,243,243,207,207,63,63,207,207,243,243,3,3,204,204,0,0,0,0,255,255, + 255,255,252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252,255,255, + 63,63,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,63,63]) +eggcrack2 = bytearray([255,255,255,255,255,255,63,63,207,207,207,207,243,243,243,243,243,243,243,243,207,207,207,207,63,63,255,255,255,255,255,255, + 255,255,15,15,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,204,204,0,0,15,15,255,255, + 0,0,243,243,207,207,63,63,207,207,243,243,207,207,63,63,207,207,243,243,207,207,63,63,12,12,243,243,0,0,0,0, + 252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252, + 48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48]) + +# BITMAP: width: 60, height: 40 +eggopen1 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,7,153,153,225,225,255,255,255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,31,31,159,159,127,127,255,255,255,255,255,255,255, + 255,255,255,7,7,249,249,25,25,225,225,255,255,255,255,255,255,254,254,255,255,255,63,63,207,207,51,51,243,243,243,243,243,243,243,243,51,51,207,207,63,63,255,255,255,255,255,254,254,249,249,224,224,255,255,255,255,255,255,255, + 255,255,255,254,254,249,249,254,126,127,255,255,255,252,252,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,63,63,255,255,249,249,255,255,127,127,135,135,249,249,7,7, + 255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,240,240,12,12,243,243,243,243,204,204,195,195,243,243,243,243,243,243,243,243,51,51,192,192,51,51,204,204,3,3,240,240,255,255,255,255,126,126,249,249,249,249,254,254, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,195,195,195,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,3,3,192,192,195,195,255,255,255,255,255,255,254,254,255,255,255,255,255,255]) +eggopen2 = bytearray([255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,255,255,63,63,255,255,255,255,255,255, + 255,255,255,255,255,207,207,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,51,51,243,243,243,243,243,243,243,243,51,51,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,127,127,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,240,240,12,12,243,243,243,243,204,204,195,195,243,243,243,243,243,243,243,243,51,51,192,192,51,51,204,204,3,3,240,240,255,255,255,255,255,255,243,243,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,195,195,195,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,3,3,192,192,195,195,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) +eggopen3 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,207,207,195,195,195,195,207,207,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,252,252,3,3,3,3,3,3,3,3,252,252,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,243,243,207,207,204,204,204,204,204,204,204,204,207,207,243,243,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) +eggopen4 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,243,243,51,51,252,252,252,252,252,252,51,51,243,243,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,252,252,255,207,207,207,207,255,252,252,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) + +# BITMAP: width: 30, height: 30 +babymedium1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babymedium2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0, + 0,0,0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,255,255,207,207,207,207,252,252,63,63,0,0, + 0,0,0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0]) +babymedium3 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0, + 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,255,255,63,63,63,63,240,240,255,255, + 0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0]) +babymedium4 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,252,252,252,252,255,255,255,255,63,63,252,252,252,252,240,240,192,192,0,0, + 0,0,0,0,0,0,63,63,252,252,255,255,207,207,207,207,255,255,252,252,255,255,255,255,255,255,63,63,0,0, + 0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) +babymedium5 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babymedium6 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,192,192,48,48,252,252,252,252,255,255,255,255,63,63,252,252,252,252,240,240,192,192,0,0,0,0,0,0, + 0,0,63,63,252,252,255,255,207,207,207,207,255,255,252,252,255,255,255,255,255,255,63,63,0,0,0,0,0,0, + 0,0,0,0,0,0,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0,0,0,0,0]) +babymedium7 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0,0,0,0,0, + 255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0, + 0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0]) +babymedium8 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0,0,0,0,0, + 63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0,0,0,0,0, + 0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0]) +babymedium9 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0,0,0, + 0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0,0,0, + 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0]) +babymedium10 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0, + 0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0, + 0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0]) + +babysad1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,252,252,204,207,207,207,243,243,255,255,243,243,207,207,207,207,252,252,192,192,0,0,0,0, + 0,0,0,0,15,15,63,63,255,255,255,255,192,192,192,192,192,192,255,255,255,255,63,63,15,15,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) +babysad2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,63,63,243,243,243,243,252,252,63,63,63,63,63,63,252,252,243,243,243,243,63,63,0,0,0,0, + 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0]) + +babyenergie1 = bytearray([192,192,12,12,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,3,3,0,48,48,0, + 0,0,0,0,255,255,252,252,252,252,51,51,63,63,63,63,63,63,51,51,252,252,252,252,255,255,0,0,0,0, + 0,0,0,0,0,0,15,15,255,255,60,60,240,240,240,240,240,240,60,60,255,255,15,15,0,0,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,0,0,0,0,3,3,0,0,0,0,3,3,3,3,0,0,0,0,0,0]) +babyenergie2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,60,60,60,60,255,255,255,255,255,255,252,252,60,60,48,48,192,192,0,0,0,0, + 0,0,0,0,15,15,60,60,255,255,255,255,252,252,207,207,207,207,204,204,255,255,63,63,15,15,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) + +babylow1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babylow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0, + 0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0, + 0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0]) + +babyfull1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,240,240,255,159,63,63,159,255,240,240,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) +babyfull2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,240,240,252,252,255,255,15,15,255,255,255,255,255,255,15,15,255,255,252,252,240,240,0,0,0,0, + 0,0,0,0,15,15,63,63,127,127,63,63,63,57,51,51,57,63,63,63,63,127,127,63,15,15,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) +babyfull3 = bytearray([0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,255,255,255,255,255,255,240,240,255,159,63,63,159,255,240,240,255,255,255,255,255,255,0,0,0,0, + 0,0,0,0,0,0,3,3,7,7,3,3,3,3,3,3,3,3,3,3,7,7,3,3,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) + +# BITMAP: width: 40, height: 30 +poopenergie1 = bytearray([0,0,0,0,0,0,0,0,0,0,96,96,0,0,0,0,0,0,0,0,240,240,192,192,0,0,0,48,48,0,0,0,0,0,0,0,0,0,0,0, + 0,0,128,128,0,0,0,0,0,0,0,0,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,0,0,0,192,192,0,0,0,0, + 0,0,1,1,0,0,192,192,48,48,207,207,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +poopenergie2 = bytearray([0,0,0,0,0,0,0,0,0,6,6,0,0,0,240,240,252,252,255,255,252,252,252,252,240,240,192,192,0,0,0,12,12,0,0,0,0,0,0,0, + 0,0,0,0,0,0,3,3,192,192,240,240,255,255,255,255,63,63,255,255,255,255,63,63,255,255,255,255,255,255,240,240,0,0,3,3,0,0,0,0, + 6,6,0,0,240,240,12,12,243,243,255,255,255,255,255,255,231,231,207,207,207,207,231,231,255,255,255,255,255,255,255,255,255,255,252,252,0,0,12,12, + 0,0,0,0,15,15,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0]) +poopfull1 = bytearray([0,0,0,0,0,0,0,0,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,48,48,48,48,207,207,48,48,48,48,0,0,0,0, + 0,0,0,0,0,0,3,3,12,12,3,3,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,3,3,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +poopfull2 = bytearray([0,48,48,48,48,207,207,48,48,48,48,0,0,0,240,240,252,252,255,255,240,240,240,240,192,192,0,0,0,0,0,0,96,96,152,152,96,96,0,0, + 0,0,0,0,0,3,3,0,192,192,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,240,240,192,192,0,0,1,1,0,0,0,0, + 0,0,0,0,240,240,12,12,243,243,255,255,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,0, + 0,0,0,0,15,15,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0]) +poopmedium1 = bytearray([0,0,0,0,0,0,0,0,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,48,48,48,48,207,207,48,48,48,48,0,0,0,0, + 0,0,0,0,0,0,3,3,12,12,3,3,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,3,3,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,252,188,63,63,63,63,188,252,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +poopmedium2 = bytearray([192,192,192,192,60,60,192,192,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,0,0,0,192,192,48,48,192,192,0,0,0,0,0, + 0,0,0,0,15,15,0,0,0,0,0,0,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,3,3,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,252,188,63,63,63,63,188,252,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, + 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) +pooplow1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,240,240,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,192,192,240,240,252,252,255,255,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,0,0,0,0,0,0,0,0, + 0,0,0,0,48,48,63,63,48,48,63,63,63,63,63,63,63,63,51,51,51,51,63,63,63,63,63,63,63,63,63,63,63,63,48,48,0,0,0,0]) +pooplow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,192,192,0,0,0,0,0,0, + 48,48,60,60,51,51,60,60,63,63,63,63,63,63,63,63,63,55,51,51,51,51,55,63,63,63,63,63,63,63,63,63,63,63,63,63,60,60,48,48]) +poopsad1 = bytearray([0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,6,7,15,15,3,0,0,96,96,0,0,0,0,0,0,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,192,192,0,0,0,0,0,0, + 48,48,60,60,51,51,60,60,63,63,63,63,63,63,63,63,63,55,51,59,59,51,55,63,63,63,63,63,63,63,63,63,63,63,63,63,60,60,48,48]) +poopsad2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,240,240,240,240,252,252,240,240,240,240,192,192,192,192,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,48,48,60,36,35,51,63,63,63,63,63,63,60,44,39,55,55,39,44,60,63,63,63,63,63,63,63,63,63,63,60,60,48,48,0,0]) + +mametchienergie1 = bytearray([0,0,0,0,0,96,96,0,0,0,24,228,2,2,2,2,4,152,160,160,160,160,160,160,184,132,130,130,2,228,60,0,0,0,96,96,0,0,0,0, + 0,0,0,6,198,192,0,0,0,60,255,255,247,251,251,251,27,23,31,31,31,31,31,23,251,251,251,247,239,255,254,124,0,0,0,128,140,12,0,0, + 0,0,0,0,0,0,0,0,3,7,14,253,249,251,255,255,255,254,252,252,252,252,254,255,255,255,255,251,57,28,14,6,0,0,0,1,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,15,31,31,15,7,7,7,7,7,7,7,7,7,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) + +mametchifull1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,64,60,2,2,2,2,2,124,64,64,124,2,2,2,2,2,60,192,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,60,255,254,238,247,247,247,247,111,127,127,127,127,127,239,247,247,246,246,236,252,255,124,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,243,255,63,255,255,31,255,255,255,31,255,255,63,255,255,243,3,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,3,15,31,30,14,7,7,7,7,7,14,30,31,15,3,0,0,0,0,0,0,0,0,0,0,0,0,0]) +mametchifull2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,140,122,2,2,2,2,12,112,64,64,64,96,16,12,2,2,2,132,120,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,60,255,238,246,246,246,246,247,47,63,63,63,63,63,47,246,246,246,238,223,255,254,124,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,192,224,241,251,127,255,255,255,255,254,254,254,254,254,255,255,255,223,191,123,241,96,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,1,14,31,31,15,7,7,7,7,7,7,7,15,31,31,15,1,0,0,0,0,0,0,0,0,0,0,0,0]) +mametchifull3 = bytearray([0,0,0,0,0,0,0,0,0,0,24,228,2,2,2,2,4,152,160,160,160,160,160,160,184,132,130,130,2,228,60,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,60,255,255,247,251,251,251,27,23,31,31,31,31,31,23,251,251,251,247,239,255,254,124,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,3,7,14,253,249,251,255,255,255,254,252,252,252,252,254,255,255,255,255,251,57,28,14,6,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,15,31,31,15,7,7,7,7,7,7,7,7,7,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) + +mametchimedium1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,248,6,1,1,1,1,30,32,64,64,64,64,124,6,1,1,1,2,4,120,128,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,124,255,254,198,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,192,224,241,251,127,255,255,255,255,255,252,253,252,255,255,255,255,223,191,123,241,96,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,1,14,31,31,15,3,3,3,3,3,3,3,3,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) +mametchimedium2 = bytearray([0,0,0,0,0,0,0,192,32,32,0,128,124,2,1,1,1,2,4,120,64,64,64,112,14,1,1,1,1,2,124,128,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,124,255,255,199,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,1,3,227,187,127,111,158,253,253,253,254,255,255,255,247,195,3,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,7,3,3,3,3,3,3,3,3,3,7,15,31,28,0,0,17,14,0,0,0,0,0,0,0]) +mametchimedium3 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,124,2,1,1,1,2,60,64,64,64,64,124,6,1,1,1,2,4,120,128,0,0,64,128,0,0,0,0, + 0,0,0,0,0,0,0,0,0,124,255,254,198,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,32,31,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,1,3,195,247,255,255,255,254,253,253,253,254,159,111,127,191,227,3,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,14,17,0,0,28,31,15,7,3,3,3,3,3,3,3,3,3,3,7,7,3,0,0,0,0,0,0,0,0,0,0,0]) + +mametchilow1 = bytearray([98,82,74,70,0,0,200,168,152,0,128,112,12,2,1,1,1,1,2,124,64,64,124,6,1,1,1,1,2,124,128,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,120,254,255,255,255,239,239,239,255,255,254,254,254,254,254,254,238,238,238,252,252,252,252,255,124,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,1,3,7,7,15,143,239,127,255,223,63,252,255,127,191,255,127,239,143,7,3,3,1,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,28,63,63,31,14,6,7,7,7,6,5,13,30,63,63,28,0,0,0,0,0,0,0,0,0,0,0]) +mametchilow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,124,2,1,1,1,1,6,124,64,64,124,2,1,1,1,1,2,12,112,128,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,124,255,252,252,252,252,254,230,254,254,254,254,254,254,254,255,255,231,255,255,255,255,255,254,120,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,3,3,7,143,239,127,255,191,127,248,248,56,223,255,63,239,143,15,7,7,3,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,28,63,63,30,13,5,6,7,7,7,6,14,31,63,63,28,0,0,0,0,0,0,0,0,0,0,0]) + +mametchisad1 = bytearray([0,0,0,0,0,0,0,0,0,0,224,16,12,4,4,3,1,1,2,28,32,32,64,64,32,16,8,4,2,2,2,2,4,12,240,0,0,0,0,0, + 0,0,0,0,0,0,0,0,192,224,248,253,183,178,176,176,176,176,208,224,224,224,224,224,224,224,192,160,160,160,160,160,160,227,252,240,0,0,0,0, + 0,0,0,0,0,0,0,0,3,7,15,159,223,223,157,248,189,157,159,143,143,143,143,159,159,189,184,189,189,175,183,59,27,15,7,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,12,29,61,61,61,63,31,31,31,31,31,31,31,31,31,31,31,24,55,55,57,60,30,12,0,0,0,0,0,0]) +mametchisad2 = bytearray([0,0,0,0,96,96,124,252,240,48,48,0,0,0,0,0,0,128,192,192,224,224,224,224,224,224,224,192,192,128,128,0,12,12,124,127,31,24,24,0, + 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,252,255,243,255,255,15,247,251,255,255,255,255,255,255,255,0,1,6,8,8,8,16,16,224,0, + 0,0,0,0,224,248,252,248,255,255,255,248,254,252,248,7,255,255,255,255,255,254,255,255,255,255,255,255,255,1,0,0,0,28,20,20,20,22,35,192, + 12,30,30,30,63,63,63,63,63,63,63,63,63,63,63,28,19,15,31,31,31,63,63,63,63,63,63,47,39,32,32,32,16,16,16,16,16,16,16,15]) + + +# BITMAP: width: 15, height: 13 +heart1 = bytearray([60,126,231,243,251,255,254,252,254,255,255,255,255,126,60, + 0,0,0,1,3,7,15,31,15,7,3,1,0,0,0]) +heart2 = bytearray([0,60,102,242,250,254,252,248,252,254,254,254,126,60,0, + 0,0,0,0,1,3,7,15,7,3,1,0,0,0,0]) +heart3 = bytearray([0,0,56,108,244,252,248,240,248,252,252,124,56,0,0, + 0,0,0,0,0,1,3,7,3,1,0,0,0,0,0]) + +# BITMAP: width: 7, height: 7 +heartFull = bytearray([14,25,63,126,63,31,14]) + +eggSpr = thumby.Sprite(32, 38, egg2+egg1, 20, 1) +eggcrackSpr = thumby.Sprite(32, 38, eggcrack2+eggcrack1, 20, 1) +eggopenSpr = thumby.Sprite(60, 40, eggopen1+eggopen1+eggopen2+eggopen2+eggopen3+eggopen3+eggopen4+eggopen4, 5, 1) +babyenergieSpr = thumby.Sprite(30, 30, babyenergie1+babyenergie2, 20, 15) +babymediumSpr = thumby.Sprite(30, 30, babymedium1+babymedium2+babymedium3+babymedium4+babymedium5+babymedium6+babymedium7+babymedium8+babymedium9+babymedium10, 20, 15) +babylowSpr = thumby.Sprite(30, 30, babylow1+babylow2, 20, 15) +babyfullSpr = thumby.Sprite(30, 30, babyfull1+babyfull2+babyfull3+babyfull2, 20, 15) +babysadSpr = thumby.Sprite(30, 30, babysad1+babysad1+babysad2+babysad2, 20, 15) +poopenergieSpr = thumby.Sprite(40, 30, poopenergie1+poopenergie2, 15, 10) +poopfullSpr = thumby.Sprite(40, 30, poopfull1+poopfull2, 15, 10) +poopmediumSpr = thumby.Sprite(40, 30, poopmedium1+poopmedium2, 15, 10) +pooplowSpr = thumby.Sprite(40, 30, pooplow1+pooplow2, 15, 10) +poopsadSpr = thumby.Sprite(40, 30, poopsad1+poopsad1+poopsad2+poopsad2, 15, 10) +mametchienergieSpr = thumby.Sprite(40, 30, mametchifull1+mametchifull2+mametchienergie1+mametchifull2, 15, 9) +mametchifullSpr = thumby.Sprite(40, 30, mametchifull1+mametchifull2+mametchifull3+mametchifull2, 15, 9) +mametchimediumSpr = thumby.Sprite(40, 30, mametchimedium1+mametchimedium2+mametchimedium1+mametchimedium3, 15, 9) +mametchilowSpr = thumby.Sprite(40, 30, mametchilow1+mametchilow1+mametchilow1+mametchilow2+mametchilow2+mametchilow2, 15, 9) +mametchsadSpr = thumby.Sprite(40, 30, mametchisad1+mametchisad1+mametchisad1+mametchisad2+mametchisad2+mametchisad2, 15, 9) + +heartSpr = thumby.Sprite(15, 13, heart1+heart2+heart3+heart2, 2, 2) + +heartFull1Spr = thumby.Sprite(7, 7, heartFull, 0, 0) +heartFull2Spr = thumby.Sprite(7, 7, heartFull, 8, 0) +heartFull3Spr = thumby.Sprite(7, 7, heartFull, 16, 0) +heartFull4Spr = thumby.Sprite(7, 7, heartFull, 24, 0) +heartFull5Spr = thumby.Sprite(7, 7, heartFull, 32, 0) +heartFull6Spr = thumby.Sprite(7, 7, heartFull, 40, 0) + +# BITMAP: width: 11, height: 5 +batt0 = bytearray([31,17,17,17,17,17,17,17,17,27,14]) +batt1 = bytearray([31,31,31,31,17,17,17,17,17,27,14]) +batt2 = bytearray([31,31,31,31,31,31,31,17,17,27,14]) +batt3 = bytearray([31,31,31,31,31,31,31,31,31,31,14]) +charg = bytearray([31,31,27,27,9,0,18,27,27,31,14]) +emula = bytearray([31,21,17,0,31,2,31,0,31,16,31]) + +# BITMAP: width: 16, height: 16 +sun1 = bytearray([192,192,12,12,192,192,51,51,48,48,192,192,12,12,0,0, + 0,0,48,48,3,3,12,12,204,204,3,3,48,48,3,3]) +sun2 = bytearray([0,0,12,12,192,192,48,48,51,51,192,192,12,12,192,192, + 3,3,48,48,3,3,204,204,12,12,3,3,48,48,0,0]) + +sunleftSpr = thumby.Sprite(16, 16, sun1+sun2, 0, 20) +sunrightSpr = thumby.Sprite(16, 16, sun1+sun2, 54, 20) + +iconx = 61 +icony = 0 +iconw = 11 +iconh = 5 +b=charging + +def showHearts(): + if hearts > 0: + thumby.display.drawSprite(heartFull1Spr) + if hearts > 1: + thumby.display.drawSprite(heartFull2Spr) + if hearts > 2: + thumby.display.drawSprite(heartFull3Spr) + if hearts > 3: + thumby.display.drawSprite(heartFull4Spr) + if hearts > 4: + thumby.display.drawSprite(heartFull5Spr) + if hearts > 5: + thumby.display.drawSprite(heartFull6Spr) + +def showSun(): + sunleftSpr.setFrame(frameCtr) + thumby.display.drawSprite(sunleftSpr) + sunrightSpr.setFrame(frameCtr) + thumby.display.drawSprite(sunrightSpr) + +def NewEgg(): + frameCtr = 0 + counter = 0 + thumby.display.setFPS(2) + while(counter < 50): + thumby.display.fill(1) + eggSpr.setFrame(frameCtr) + thumby.display.drawSprite(eggSpr) + thumby.display.update() + thumby.audio.play(200,100) + frameCtr += 1 + counter += 1 + while(counter < 100): + thumby.display.setFPS(4) + thumby.display.fill(1) + eggcrackSpr.setFrame(frameCtr) + thumby.display.drawSprite(eggcrackSpr) + thumby.display.update() + thumby.audio.play(300,100) + frameCtr += 1 + counter += 1 + counter = 0 + frameCtr = 0 + while(counter < 8): + thumby.audio.play(400,50) + thumby.display.setFPS(2) + thumby.display.fill(1) + eggopenSpr.setFrame(frameCtr) + thumby.display.drawSprite(eggopenSpr) + thumby.display.update() + frameCtr += 1 + counter += 1 + +if hearts > 6: + hearts = -1 + +if hearts == -1: + NewEgg() + hearts = 0 + score = 0 + stage = 0 + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('stage', stage) + thumby.saveData.save() + +hungry = 4 +frameCtr = 0 + +while (not thumby.buttonA.pressed()): + thumby.display.setFPS(4) + thumby.display.fill(0) + in_emu=not hasattr(thumby.display.display,"cs") + if (in_emu): + thumby.display.blit(emula,iconx,icony,iconw,iconh,-1,0,0) + else: + v=adc.read_u16() + b=min(b,v) + if (v > charging): + thumby.display.blit(charg,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babyenergieSpr.setFrame(frameCtr) + thumby.display.drawSprite(babyenergieSpr) + if stage == 1: + poopenergieSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopenergieSpr) + if stage == 2: + mametchienergieSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchienergieSpr) + if hungry == 1: + hungry = 100 + hearts += 1 + score += 1 + charges +=1 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.setItem('charges', charges) + thumby.saveData.save() + if hungry == 0: + hungry = 100 + hearts += 1 + score += 2 + charges +=1 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.setItem('charges', charges) + thumby.saveData.save() + if (hungry == 2) or (hungry == 3): + thumby.display.fill(0) + thumby.display.drawText("I am not!", 10, 5, 1) + thumby.display.drawText("hungry!", 17, 16, 1) + thumby.display.drawText("Damn!", 22, 28, 1) + thumby.audio.play(100,500) + hungry = 4 + if stage < 2: + score = hearts + else: + score = hearts + 11 + thumby.saveData.setItem('score', score) + thumby.saveData.save() + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + if hungry == 100: + heartSpr.setFrame(frameCtr) + thumby.display.drawSprite(heartSpr) + else: + showHearts() + if score > 21: + showSun() + if hearts == 7: + if score < 11: + stage = 1 + hearts = 0 + score = 0 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('stage', stage) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.save() + thumby.display.fill(0) + thumby.display.drawText("Try better!", 3, 5, 1) + thumby.display.drawText("Holy", 22, 17, 1) + thumby.display.drawText("SHIT!", 20, 28, 1) + thumby.audio.play(100,500) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + if (score > 10) and (stage < 2): + stage = 2 + hearts = 0 + thumby.saveData.setItem('stage', stage) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.save() + thumby.display.fill(0) + thumby.display.drawText("Well done!", 8, 5, 1) + thumby.display.drawText("Your pet", 10, 19, 1) + thumby.display.drawText("envolved!", 9, 30, 1) + thumby.audio.play(1000,500) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + if score > 17: + thumby.display.fill(0) + if score > 21: + thumby.display.drawText("**********", 6, 5, 1) + thumby.display.drawText("Exellent!!", 6, 17, 1) + thumby.display.drawText("**********", 6, 28, 1) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + thumby.display.fill(0) + thumby.display.drawText("**********", 6, 1, 1) + thumby.display.drawText("Mametchi", 12, 12, 1) + thumby.display.drawText("is happy!", 9, 23, 1) + thumby.display.drawText("**********", 6, 34, 1) + thumby.audio.play(1000,500) + pets += 1 + thumby.saveData.setItem('pets', pets) + thumby.saveData.save() + else: + thumby.display.drawText("Well done!", 8, 5, 1) + thumby.display.drawText("But you can", 3, 19, 1) + thumby.display.drawText("do better!", 6, 30, 1) + thumby.audio.play(100,500) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + thumby.display.fill(0) + thumby.display.drawText("Your pet", 10, 2, 1) + thumby.display.drawText("grows up", 10, 12, 1) + thumby.display.drawText("and leaves", 6, 22, 1) + thumby.display.drawText("its home!", 9, 32, 1) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + thumby.display.fill(0) + thumby.display.drawText("**********", 6, 1, 1) + thumby.display.drawText("You got a", 9, 12, 1) + thumby.display.drawText("new EGG!", 12, 23, 1) + thumby.display.drawText("**********", 6, 34, 1) + thumby.display.update() + while(thumby.actionPressed() == False): + pass + time.sleep(0.5) + NewEgg() + hearts = 0 + score = 0 + stage = 0 + thumby.saveData.setItem('score', score) + thumby.saveData.setItem('stage', stage) + thumby.saveData.setItem('hearts', hearts) + thumby.saveData.save() + frameCtr += 1 + b=v + else: + if (b > level_3): + thumby.display.blit(batt3,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babyfullSpr.setFrame(frameCtr) + thumby.display.drawSprite(babyfullSpr) + if stage == 1: + poopfullSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopfullSpr) + if stage == 2: + mametchifullSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchifullSpr) + showHearts() + if score > 21: + showSun() + hungry = 3 + frameCtr += 1 + elif (b > level_2): + thumby.display.blit(batt2,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babymediumSpr.setFrame(frameCtr) + thumby.display.drawSprite(babymediumSpr) + if stage == 1: + poopmediumSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopmediumSpr) + if stage == 2: + mametchimediumSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchimediumSpr) + showHearts() + if score > 21: + showSun() + hungry = 2 + frameCtr += 1 + elif (b > level_1): + thumby.display.blit(batt1,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babylowSpr.setFrame(frameCtr) + thumby.display.drawSprite(babylowSpr) + if stage == 1: + pooplowSpr.setFrame(frameCtr) + thumby.display.drawSprite(pooplowSpr) + if stage == 2: + mametchilowSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchilowSpr) + showHearts() + if score > 21: + showSun() + frameCtr += 1 + hungry = 1 + else: + thumby.display.blit(batt0,iconx,icony,iconw,iconh,-1,0,0) + if stage == 0: + babysadSpr.setFrame(frameCtr) + thumby.display.drawSprite(babysadSpr) + if stage == 1: + poopsadSpr.setFrame(frameCtr) + thumby.display.drawSprite(poopsadSpr) + if stage == 2: + mametchsadSpr.setFrame(frameCtr) + thumby.display.drawSprite(mametchsadSpr) + showHearts() + hungry = 0 + frameCtr += 1 + while thumby.buttonU.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Current", 17, 6, 1) + thumby.display.drawText("Pet Score:", 8, 17, 1) + pixelLength = len(str(score)) * 5 + offset = int((thumby.display.width - pixelLength) / 2) + thumby.display.drawText(str(score), offset, 28, 1) + thumby.display.update() + pass + while thumby.buttonL.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Feed your", 9, 2, 1) + thumby.display.drawText("hungry pet", 6, 12, 1) + pixelLength = len(str(charges)) * 5 + offset = int((thumby.display.width - pixelLength) / 2) + thumby.display.drawText(str(charges), offset, 22, 1) + thumby.display.drawText("times!", 19, 32, 1) + thumby.display.update() + pass + while thumby.buttonR.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Raise happy", 3, 2, 1) + thumby.display.drawText("Mametchi", 13, 12, 1) + pixelLength = len(str(pets)) * 5 + offset = int((thumby.display.width - pixelLength) / 2) + thumby.display.drawText(str(pets), offset, 22, 1) + thumby.display.drawText("times!", 19, 32, 1) + thumby.display.update() + pass + while thumby.buttonD.pressed(): + thumby.display.fill(0) + thumby.display.drawText("Hello", 19, 10, 1) + thumby.display.drawText("Friend!", 15, 21, 1) + thumby.display.update() + pass + while (thumby.buttonB.pressed()): + thumby.display.fill(0) + v=adc.read_u16() + b=min(b,v) + thumby.display.drawText("v=%d" % b, 0, 0, 1) + if (v > charging): + thumby.display.blit(charg,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("AC", 30, 22, 1) + else: + if (b > level_3): + thumby.display.blit(batt3,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Full", 25, 22, 1) + elif (b > level_2): + thumby.display.blit(batt2,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Medium", 20, 22, 1) + elif (b > level_1): + thumby.display.blit(batt1,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Low", 26, 22, 1) + else: + thumby.display.blit(batt0,iconx,icony,iconw,iconh,-1,0,0) + thumby.display.drawText("Very Low", 12, 22, 1) + thumby.display.update() + thumby.display.update() diff --git a/BatteryPet/arcade_description.txt b/BatteryPet/arcade_description.txt new file mode 100644 index 0000000..86ec128 --- /dev/null +++ b/BatteryPet/arcade_description.txt @@ -0,0 +1,15 @@ +#Thanks to @AyreGuitar +# +#Based on code posted by: +#@JasonTC from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/972253183814541342 +#@TPReal from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/975659380232060978 +# +#Disclaimer: +#Use at your own risk, no warranties or guarantees + +Open 'Battery>Pet<' to check the battery status. +Press A for the charg level. +Press the direction pad for details. +Press B to exit. +Plugin the charging cabel with the App oben. Use it to feed your pet when Thumby is low or very low. +Let a happy Memetchi grow up. \ No newline at end of file From b547d30f8e93768011e5ce3459a5b4d075032254 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 11:14:35 +0100 Subject: [PATCH 3/9] Update arcade_description.txt --- BatteryPet/arcade_description.txt | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/BatteryPet/arcade_description.txt b/BatteryPet/arcade_description.txt index 86ec128..93775d6 100644 --- a/BatteryPet/arcade_description.txt +++ b/BatteryPet/arcade_description.txt @@ -1,15 +1,8 @@ -#Thanks to @AyreGuitar -# -#Based on code posted by: -#@JasonTC from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/972253183814541342 -#@TPReal from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/975659380232060978 -# -#Disclaimer: -#Use at your own risk, no warranties or guarantees - +Raise a virtual pet. Open 'Battery>Pet<' to check the battery status. Press A for the charg level. Press the direction pad for details. Press B to exit. -Plugin the charging cabel with the App oben. Use it to feed your pet when Thumby is low or very low. -Let a happy Memetchi grow up. \ No newline at end of file +Plugin the charging cabel with the App open. +Use it to feed your pet when Thumby is low or very low. +Let a happy Memetchi grow up. From 6a638e91ff3f11a2072d0a11b7783af5a4624c55 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 15:33:18 +0100 Subject: [PATCH 4/9] Add files via upload --- BatteryPet/arcade_title_video.webm.webm | Bin 0 -> 13123 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 BatteryPet/arcade_title_video.webm.webm diff --git a/BatteryPet/arcade_title_video.webm.webm b/BatteryPet/arcade_title_video.webm.webm new file mode 100644 index 0000000000000000000000000000000000000000..17c1dbca968e7ad422d1f672e4e48950d6d61db4 GIT binary patch literal 13123 zcmeI2c{r5&-^cGUlU>M~bqpmU`%Y%;Ybc>qmXa1_ttiZlJya43$&7@gB1DLhEEPgR z5`!?xGMMb#&onyc_dCzk^E}RVj?N#?&v4J&bGha_uh09leHQ`4zPssq5m<=c9QAJ+ z3)7pyGU|ndU2t`^~n z@Y+5)o%<-K6ASUJjm$7izPttK48=nBPhcSt;dV}T*6PHV{16Dd42#=Gz(PdzpPu{e zgGaCcPR|pMn#BSDKo$eiAkuIM4gic9!^5MJ!=mWu5EfqSWZsvd>T2`sM0OJO5${A0 zZ4s15V^)Dh)G`B^AqHfnUK{wxq6E=C5S$~RF)Ns*kX7g`-DqwU12V04sBPwReZwKe z$s4b2zCq_t1vv)ZY=EOHNn&RO(?wuaHI>)SJ4I{@JB;`oPknD|Zl{MA-v^cEPF78G z{MY>5YmFE?tXjB^2HQO1x!dL+A4w|fXDj{UvUvLzgq3PTbA52mvYz_FlEu+G z8zkc9VT(t&90kHMjI6FGGKpvy*q%y%1v&WT)hER$vsV3LjB5An1bCb{-B-XdlskC6 zW~6WCXbE@9V9_c$@43?SO~p52M4$-r94ljxFE)&&t6Je8p2N>%O;O$C-dH}%PqYW< zd0}((*kkFZKc-5mU;4|x0l+F)77E~y)p%qI7VrdGnE(g}2O!YMN8akkghMzpkYV&D znH6M)fN3j3h6^G+gB;Paul87;Uzr09Oeca0?`_+`-!41KCL)xP>`s1%@#R7Lmi5#G zW)FugAK!*#tjGYGK(Ma^TrGJFPHH`L2dUR511{z4(qCh*G2VJzHYolAfL4mU%@$c5cFCxSE1gF?wfgrIfuWKb^E(jZhF(vz8^op?;uA37%{M7tQg4|SfWPF zB>oka&KdBg|Ls3U1+qyh_fOm-Fqz|sF5Y{a54!UO*xj=(1-O&}iK#fP)AzS@6hs+E zlz0J4mD9uJk>pFhx59RE5P)?I=!u)dw_suW00qY126VVkLgJK#nH=Kmx#SzGxg!i= z+pFFFA#~#2A%j|S(#LU;8!gi+ESCllK|Ngtb8$`Nou|1}O>1ocxVrNd*HT~|8Xk(Hv1bMfMl`h|HfX-&K|^YDTy--qjfxZeWmFt2G%7C222yc?G%B8vUq;16 z!J%aEC>WNn2e4rSHc=C_VCf<*Sh@+a0$GJlE#6`$O3Jg7Hv4ZTuoKyk)V4sKk+s1o zElxC@_(m>L2-|A#Dls&lf8f->{g~oNlc)yg@Zzohd15p3^eI4iF;7yKf4fE{PDvV? zIy%3ZzTfB^-1xvF)@eiv`GROC(Q&ND z|M_}wND3a=h~3%(*s!kYMzYSDmttI%coG4|Q#o`aCku7y#CeU$OydH&QM~& zDSG<^Y8vP)T=7$z7`BuM1ZS$g2}cwRxOy-k-V|qp)$fvT;oJr$mYu)^Yp-F4fEjKl zfz) zfBw!j`wKJzt!wt@2ev{4)kvC*LT{b)VQLk%A(N?6A_!>jXPnZFtJ#S`OM?2KiKETF zF?`1x#w=Uh+lw{{%6degmJHcsak43lW`4QvO`c-N_>BHgfu2jJ>rJ%bkY+N=_f?*ZCMYMK;xQug$O^)ORXoz zU>M{Zc%pd5`9u{c~ey*jL2P7+O7vbd*6P?+w)%HL`AH z!9e*4Fdl_$RSwK|@BZJ-`;($2Sc^j)z@rqf!exNMntO{BwKL4K&hONnJyn7EiUCAV zhG&V-fdD`I1r!|579F z^&H;R%6oVBg(Pb|6}p7k)}nCc00VKwPOlH_4|%@??yg^me`EVhtTHei1lt^CzJywc z2ixm{QCFl>AE@s8kZxRPmi47sB;52`JbQ`c<+IOMzqrpo$xRB;UFci9TH`RKpbEY2 z)@>@i^m&4*GV#_EBL7@ZP{G;95mL>U zXLpG+naaWFT2w8B=j7zvZ-Q^$UH-wxrsDLz!4WxstDQGZ=DXGALw(KYI@oMizQ(C^ zFQ%$#xLV|C=kM-Q&RZO6Syv1R5pbjU7g&+9??vW&!l!n;xKT-xl#(D3!VJM2R8&$_ada2XDzjYn}~MT>wbrXPcC zH5D!8*FR*@)5`?s`=I;TtKCgBmn)=m^1`VMMgqMTdhEv3E)rS(uCs1aH{Xi%-qsYQ zZZ_w$*i9z!#|^{l_M~G0l+lt>v(DR}P2DIzM(en;671d#I-ajz9=Acj>Sy z)*X@B+fP~EA-+1fBIU-h!+Qd_iL5O?Ci)L6^=rcmo=X!Ak-qVwiQW4lns~~8MEgrQ z5s^+4O(J3AMH5fKp?vWubL_V3KmiLaCkk{KQJ2x0fl9Ci=}SNZhcIx(7rG?inq+Dj zhhm%t>@M#S`JtKqxAjMn%`lP(z}tNBd~U^qIJ}ju$@$yoQG|h~l5GMd+15>(HCI<+ znlM49lD+u({#Dkd2NVySLi=bX+k+q_Nw(}=mcX(MxQbBDJ)8Hz>UfYy6ScajU*y@o z+hljooo!`vMRC{9wGhFDzJ;no=SeOnjFm_x37iX7;^M_eZNl&Ch;%kOKIo6uOLNqg zMhp zn0mplQF%|bmd;PRzVNllKZuf}Sb~8;7l)(PPV+&jO*5u zrhn_n<{-ftc=_&0?(^JNM@k38p*Z=6bQF_X_)AZcsxbb?*y8h5p z&i;p<)co%jhHim~SgHBJ-QYe~vbQPY`vdI7^zP)ujjNA^ zVrxCDGF3eH;8V^;3NP`c0*mhziSly)nuh%Us-NE{_qmQrYt0pkPwEQ{oySp$%>$04ubNmvE*?;9WA z*BgYcty(QPq%Q(0U{rTg-sQy>K+a~l1oeP#=L*k&Ng^s2HqWuzPzL$b#r)!g0B%1r zJ612EP|lmPE^nzKsVzrEC8Zj|O*Wk6v(0SVey_wuTt`YwW7YD#t0?CG-d+olx2C}> z(zdyNUjX^*@IUEO6wGnRD11Lw2?;1L{I>paU%{TV$6)0Iz?ZY?hk#({Vg*(G!PPt5T&gx8?8IR5~RV#R&`;Z{U(9hncUK5*KRIfNl7u;xg5xJ1Y+VJ)K-x1cD)U{jcYOXfRAEe%p z)m$ykHEJFDUrYUyysFJYqt>Bq|NfrBH-uV;evNwf;;*ItN!8W?Y1F#kHeT!9i)+-# z$$y+$_Zy8GHM;TC$jLQoy}^H+8Z}Cz*8jBe)Ov$!)CM1ZP*Vf$cxEl&qQUizfIM<{ z;R09EuAW8RTDf;{M58ur`vdh~ zZ_R!ZOa>otNG!e^YxMTtw7yPl&CC>5?1{X0&IGqK2e#)V?0#SYZ>RHT4E}O_PLN;$%TdYAgotZ@;ay|R4hHW%lq4CHE9GCcCGc{QJbHQnNt|PrM9T$26F{Vu7b1BOqNwSvgnv7MprWf zoM)P6pJpG`#b^-Gm}T^`^JlJM-A~Ukpw1)e@sM7vniLkIXbXQxjNBcuEGQ8=4{e81 z4~gpfGf>Zu_T?54(NJ9$-F!6f3fC}XRa(hW%JBUI-txvYyAR8%dZkuJ>U#-B=P_Q& z7MNQ*)S|p!m_GS(%cCSDy8n5uf;D~rog~BQIVJT+rCJmexpRB(tJ*mGtX7T(#a;v|&H zUrM#drS)W78Y{x?pB3yun(L!9h~irVn#8!&&!LOR&JU~Uv#vZcczt!;rn)~Y`HA;3 ztN5_yyR2-Uj0*Dn%ES2|YLU-3<=;-+ z9Lwzx7$t;a20<`_=}_jyszBe&F=+K^K+We_>ce}2rcZS+M)n8kIhUgOB+2j8)IWAP z-#k|M=ppR0&pjypJ?tD^;Gor5+-g5`fbNegTa^v;cGjdT)-tk zWau0=W!yV(`A+$i5hea^(M$=)g}i&)i;9jLj=+4+cDd4Rsgcs|-y-z&zg;=c%B?7?E1g+B zk!pA6^xojD2=Z%Wk$yHT!Y!rRNVcsdoT$Vm6O7d>ID~aoNM@-lpSwd2X+vvl&_IJ!6&+rG-I_8S-JF^nx&;yT_)o?90lKmHLC)=VLz5SK(aIo!f+&W|ixs$V+>-d<$rUvo-I@h$ZUe z!Xlg(FOt_&MNArTCkj>cMQ2@P@$*l&LF5#lxv zX(%~zKm97>!MEUQKlzsSCj9)ZZShMwrIUpq_;G=Y0aK*sy5!^JK6JZM|NMx7`KgA- z=Zh>*6jdWhkc~3DbJRJfz>|@l-w-02p7`A0kd$~+z-~}%m6%+E#h-__ zzxOe`o3o?D=kbL+uFkTOZa*>Mlu)(lr>D~}kI-DzMIE57D92HkCzmv|A1|OKIw^_) V!3G6=sCs`d!G!ngG3B1@{{q}WoYnvU literal 0 HcmV?d00001 From 20ebadfdfa0544ed251479a4dcf0d04531e274f8 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 18:02:06 +0100 Subject: [PATCH 5/9] Update arcade_description.txt --- BatteryPet/arcade_description.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BatteryPet/arcade_description.txt b/BatteryPet/arcade_description.txt index 93775d6..bcb8e27 100644 --- a/BatteryPet/arcade_description.txt +++ b/BatteryPet/arcade_description.txt @@ -1,8 +1,9 @@ Raise a virtual pet. -Open 'Battery>Pet<' to check the battery status. -Press A for the charg level. +Open 'BatteryPet' to check the battery status. +Press A for the charging level. Press the direction pad for details. Press B to exit. Plugin the charging cabel with the App open. Use it to feed your pet when Thumby is low or very low. +After feeding you can exit the App or turn off Thumby. Let a happy Memetchi grow up. From 08495eddaf1f3640f798d5218b18c678e5a8af50 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 18:04:02 +0100 Subject: [PATCH 6/9] Update arcade_description.txt --- BatteryPet/arcade_description.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/BatteryPet/arcade_description.txt b/BatteryPet/arcade_description.txt index bcb8e27..77ade2f 100644 --- a/BatteryPet/arcade_description.txt +++ b/BatteryPet/arcade_description.txt @@ -7,3 +7,4 @@ Plugin the charging cabel with the App open. Use it to feed your pet when Thumby is low or very low. After feeding you can exit the App or turn off Thumby. Let a happy Memetchi grow up. +Maybe you get a Poop. From 687f4b3410130cee59bea09e01be0d19a3538520 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 18:10:43 +0100 Subject: [PATCH 7/9] Delete BatteryPet.py --- BatteryPet.py | 669 -------------------------------------------------- 1 file changed, 669 deletions(-) delete mode 100644 BatteryPet.py diff --git a/BatteryPet.py b/BatteryPet.py deleted file mode 100644 index 9e92ee3..0000000 --- a/BatteryPet.py +++ /dev/null @@ -1,669 +0,0 @@ -#Thanks to @AyreGuitar -# -#Based on code posted by: -#@JasonTC from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/972253183814541342 -#@TPReal from Discord channel https://discord.com/channels/898292107289190461/898292174410612787/975659380232060978 -# -#Disclaimer: -#Use at your own risk, no warranties or guarantees - -import thumby -from machine import ADC -import time - -thumby.saveData.setName("BatteryPet") - -adc = ADC(26) - -charging = 38000 -#level_0 = 32000 #~70min shuts off -level_1 = 33700 #~45min -level_2 = 34300 #~30min -level_3 = 35400 #~15min - -if (thumby.saveData.hasItem("hearts")): - hearts = int(thumby.saveData.getItem("hearts")) -else: - hearts = -1 - -if (thumby.saveData.hasItem("score")): - score = int(thumby.saveData.getItem("score")) -else: - score = 0 - -if (thumby.saveData.hasItem("stage")): - stage = int(thumby.saveData.getItem("stage")) -else: - stage = 0 - -if (thumby.saveData.hasItem("charges")): - charges = int(thumby.saveData.getItem("charges")) -else: - charges = 0 - -if (thumby.saveData.hasItem("pets")): - pets = int(thumby.saveData.getItem("pets")) -else: - pets = 0 - -# BITMAP: width: 32, height: 38 -egg1 = bytearray([255,255,255,255,255,255,63,63,207,207,207,207,243,243,243,243,243,243,243,243,207,207,207,207,63,63,255,255,255,255,255,255, - 255,255,15,15,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,204,204,0,0,15,15,255,255, - 0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,243,243,0,0,0,0, - 252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252, - 48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48]) -egg2 = bytearray([255,255,255,255,255,255,63,63,207,207,243,243,252,252,252,252,252,252,240,240,51,51,15,15,63,63,255,255,255,255,255,255, - 255,255,63,63,195,195,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,192,192,3,3,63,63,255,255, - 255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,204,204,0,0,0,0,255,255, - 255,255,252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252,255,255, - 63,63,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,63,63]) -eggcrack1 = bytearray([255,255,255,255,255,255,63,63,207,207,243,243,252,252,252,252,252,252,240,240,51,51,15,15,63,63,255,255,255,255,255,255, - 255,255,63,63,195,195,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51,51,192,192,3,3,63,63,255,255, - 255,255,0,0,243,243,207,207,63,63,207,207,243,243,207,207,63,63,207,207,243,243,3,3,204,204,0,0,0,0,255,255, - 255,255,252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252,255,255, - 63,63,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,63,63]) -eggcrack2 = bytearray([255,255,255,255,255,255,63,63,207,207,207,207,243,243,243,243,243,243,243,243,207,207,207,207,63,63,255,255,255,255,255,255, - 255,255,15,15,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,204,204,0,0,15,15,255,255, - 0,0,243,243,207,207,63,63,207,207,243,243,207,207,63,63,207,207,243,243,207,207,63,63,12,12,243,243,0,0,0,0, - 252,252,3,3,63,63,207,207,63,63,207,207,63,63,207,207,63,63,207,207,51,51,12,12,51,51,12,12,0,0,252,252, - 48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48]) - -# BITMAP: width: 60, height: 40 -eggopen1 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,7,153,153,225,225,255,255,255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,31,31,159,159,127,127,255,255,255,255,255,255,255, - 255,255,255,7,7,249,249,25,25,225,225,255,255,255,255,255,255,254,254,255,255,255,63,63,207,207,51,51,243,243,243,243,243,243,243,243,51,51,207,207,63,63,255,255,255,255,255,254,254,249,249,224,224,255,255,255,255,255,255,255, - 255,255,255,254,254,249,249,254,126,127,255,255,255,252,252,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,63,63,255,255,249,249,255,255,127,127,135,135,249,249,7,7, - 255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,240,240,12,12,243,243,243,243,204,204,195,195,243,243,243,243,243,243,243,243,51,51,192,192,51,51,204,204,3,3,240,240,255,255,255,255,126,126,249,249,249,249,254,254, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,195,195,195,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,3,3,192,192,195,195,255,255,255,255,255,255,254,254,255,255,255,255,255,255]) -eggopen2 = bytearray([255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,243,243,255,255,255,255,255,255,255,255,255,255,255,63,63,255,255,255,255,255,255, - 255,255,255,255,255,207,207,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,51,51,243,243,243,243,243,243,243,243,51,51,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,127,127,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,0,0,255,255,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,254,254,255,255,255,255,255,255,240,240,12,12,243,243,243,243,204,204,195,195,243,243,243,243,243,243,243,243,51,51,192,192,51,51,204,204,3,3,240,240,255,255,255,255,255,255,243,243,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,195,195,195,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,3,3,192,192,195,195,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) -eggopen3 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,207,207,195,195,195,195,207,207,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,252,252,3,3,3,3,3,3,3,3,252,252,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,243,243,207,207,204,204,204,204,204,204,204,204,207,207,243,243,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) -eggopen4 = bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,207,207,243,243,51,51,252,252,252,252,252,252,51,51,243,243,207,207,63,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,255,255,255,255,252,252,255,207,207,207,207,255,252,252,255,255,255,255,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]) - -# BITMAP: width: 30, height: 30 -babymedium1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) -babymedium2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0, - 0,0,0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,255,255,207,207,207,207,252,252,63,63,0,0, - 0,0,0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0]) -babymedium3 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0, - 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,255,255,63,63,63,63,240,240,255,255, - 0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0]) -babymedium4 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,48,48,252,252,252,252,255,255,255,255,63,63,252,252,252,252,240,240,192,192,0,0, - 0,0,0,0,0,0,63,63,252,252,255,255,207,207,207,207,255,255,252,252,255,255,255,255,255,255,63,63,0,0, - 0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) -babymedium5 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,255,255,255,255,255,255,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) -babymedium6 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,192,192,48,48,252,252,252,252,255,255,255,255,63,63,252,252,252,252,240,240,192,192,0,0,0,0,0,0, - 0,0,63,63,252,252,255,255,207,207,207,207,255,255,252,252,255,255,255,255,255,255,63,63,0,0,0,0,0,0, - 0,0,0,0,0,0,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0,0,0,0,0]) -babymedium7 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0,0,0,0,0, - 255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0, - 0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0]) -babymedium8 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0,0,0,0,0, - 63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0,0,0,0,0, - 0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0]) -babymedium9 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0,0,0, - 0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0,0,0, - 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0]) -babymedium10 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0, - 0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0, - 0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0]) - -babysad1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,192,192,252,252,204,207,207,207,243,243,255,255,243,243,207,207,207,207,252,252,192,192,0,0,0,0, - 0,0,0,0,15,15,63,63,255,255,255,255,192,192,192,192,192,192,255,255,255,255,63,63,15,15,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) -babysad2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,63,63,243,243,243,243,252,252,63,63,63,63,63,63,252,252,243,243,243,243,63,63,0,0,0,0, - 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0]) - -babyenergie1 = bytearray([192,192,12,12,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,3,3,0,48,48,0, - 0,0,0,0,255,255,252,252,252,252,51,51,63,63,63,63,63,63,51,51,252,252,252,252,255,255,0,0,0,0, - 0,0,0,0,0,0,15,15,255,255,60,60,240,240,240,240,240,240,60,60,255,255,15,15,0,0,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,0,0,0,0,3,3,0,0,0,0,3,3,3,3,0,0,0,0,0,0]) -babyenergie2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,192,192,240,240,60,60,60,60,255,255,255,255,255,255,252,252,60,60,48,48,192,192,0,0,0,0, - 0,0,0,0,15,15,60,60,255,255,255,255,252,252,207,207,207,207,204,204,255,255,63,63,15,15,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,0,0,0,0]) - -babylow1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,255,255,255,255,255,255,255,255,240,240,255,255,63,63,63,63,255,255,240,240,255,255,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) -babylow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,192,192,240,240,252,252,252,252,63,63,255,255,255,255,252,252,252,252,48,48,192,192,0,0,0,0, - 0,0,0,0,63,63,255,255,255,255,255,255,252,252,255,255,207,207,207,207,255,255,252,252,63,63,0,0,0,0, - 0,0,0,0,0,0,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0]) - -babyfull1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,255,255,255,255,255,255,240,240,255,159,63,63,159,255,240,240,255,255,255,255,255,255,0,0,0,0, - 0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0]) -babyfull2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,240,240,252,252,255,255,15,15,255,255,255,255,255,255,15,15,255,255,252,252,240,240,0,0,0,0, - 0,0,0,0,15,15,63,63,127,127,63,63,63,57,51,51,57,63,63,63,63,127,127,63,15,15,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) -babyfull3 = bytearray([0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,252,252,240,240,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,255,255,255,255,255,255,240,240,255,159,63,63,159,255,240,240,255,255,255,255,255,255,0,0,0,0, - 0,0,0,0,0,0,3,3,7,7,3,3,3,3,3,3,3,3,3,3,7,7,3,3,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) - -# BITMAP: width: 40, height: 30 -poopenergie1 = bytearray([0,0,0,0,0,0,0,0,0,0,96,96,0,0,0,0,0,0,0,0,240,240,192,192,0,0,0,48,48,0,0,0,0,0,0,0,0,0,0,0, - 0,0,128,128,0,0,0,0,0,0,0,0,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,0,0,0,192,192,0,0,0,0, - 0,0,1,1,0,0,192,192,48,48,207,207,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) -poopenergie2 = bytearray([0,0,0,0,0,0,0,0,0,6,6,0,0,0,240,240,252,252,255,255,252,252,252,252,240,240,192,192,0,0,0,12,12,0,0,0,0,0,0,0, - 0,0,0,0,0,0,3,3,192,192,240,240,255,255,255,255,63,63,255,255,255,255,63,63,255,255,255,255,255,255,240,240,0,0,3,3,0,0,0,0, - 6,6,0,0,240,240,12,12,243,243,255,255,255,255,255,255,231,231,207,207,207,207,231,231,255,255,255,255,255,255,255,255,255,255,252,252,0,0,12,12, - 0,0,0,0,15,15,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0]) -poopfull1 = bytearray([0,0,0,0,0,0,0,0,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,48,48,48,48,207,207,48,48,48,48,0,0,0,0, - 0,0,0,0,0,0,3,3,12,12,3,3,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,3,3,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) -poopfull2 = bytearray([0,48,48,48,48,207,207,48,48,48,48,0,0,0,240,240,252,252,255,255,240,240,240,240,192,192,0,0,0,0,0,0,96,96,152,152,96,96,0,0, - 0,0,0,0,0,3,3,0,192,192,240,240,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,240,240,192,192,0,0,1,1,0,0,0,0, - 0,0,0,0,240,240,12,12,243,243,255,255,255,255,255,255,156,156,63,63,63,63,156,156,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,0, - 0,0,0,0,15,15,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0]) -poopmedium1 = bytearray([0,0,0,0,0,0,0,0,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,48,48,48,48,207,207,48,48,48,48,0,0,0,0, - 0,0,0,0,0,0,3,3,12,12,3,3,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,3,3,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,252,188,63,63,63,63,188,252,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) -poopmedium2 = bytearray([192,192,192,192,60,60,192,192,192,192,0,0,0,0,0,0,0,0,0,0,240,240,192,192,0,0,0,0,0,192,192,48,48,192,192,0,0,0,0,0, - 0,0,0,0,15,15,0,0,0,0,0,0,192,192,252,252,255,255,255,255,255,255,255,255,252,252,240,240,0,0,0,3,3,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,48,48,207,207,255,255,255,255,252,188,63,63,63,63,188,252,255,255,255,255,255,255,240,240,192,192,0,0,0,0,0,0, - 0,0,0,0,0,0,15,15,60,60,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,15,15,0,0,0,0,0,0]) -pooplow1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,240,240,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,192,192,240,240,252,252,255,255,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,0,0,0,0,0,0,0,0, - 0,0,0,0,48,48,63,63,48,48,63,63,63,63,63,63,63,63,51,51,51,51,63,63,63,63,63,63,63,63,63,63,63,63,48,48,0,0,0,0]) -pooplow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,192,192,0,0,0,0,0,0, - 48,48,60,60,51,51,60,60,63,63,63,63,63,63,63,63,63,55,51,51,51,51,55,63,63,63,63,63,63,63,63,63,63,63,63,63,60,60,48,48]) -poopsad1 = bytearray([0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,6,7,15,15,3,0,0,96,96,0,0,0,0,0,0,192,192,192,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,192,192,240,240,240,240,252,252,252,252,159,159,255,255,255,255,159,159,255,255,252,252,240,240,192,192,192,192,0,0,0,0,0,0, - 48,48,60,60,51,51,60,60,63,63,63,63,63,63,63,63,63,55,51,59,59,51,55,63,63,63,63,63,63,63,63,63,63,63,63,63,60,60,48,48]) -poopsad2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,192,192,192,192,240,240,240,240,252,252,240,240,240,240,192,192,192,192,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,48,48,60,36,35,51,63,63,63,63,63,63,60,44,39,55,55,39,44,60,63,63,63,63,63,63,63,63,63,63,60,60,48,48,0,0]) - -mametchienergie1 = bytearray([0,0,0,0,0,96,96,0,0,0,24,228,2,2,2,2,4,152,160,160,160,160,160,160,184,132,130,130,2,228,60,0,0,0,96,96,0,0,0,0, - 0,0,0,6,198,192,0,0,0,60,255,255,247,251,251,251,27,23,31,31,31,31,31,23,251,251,251,247,239,255,254,124,0,0,0,128,140,12,0,0, - 0,0,0,0,0,0,0,0,3,7,14,253,249,251,255,255,255,254,252,252,252,252,254,255,255,255,255,251,57,28,14,6,0,0,0,1,1,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,15,31,31,15,7,7,7,7,7,7,7,7,7,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) - -mametchifull1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,64,60,2,2,2,2,2,124,64,64,124,2,2,2,2,2,60,192,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,60,255,254,238,247,247,247,247,111,127,127,127,127,127,239,247,247,246,246,236,252,255,124,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,1,243,255,63,255,255,31,255,255,255,31,255,255,63,255,255,243,3,1,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,3,15,31,30,14,7,7,7,7,7,14,30,31,15,3,0,0,0,0,0,0,0,0,0,0,0,0,0]) -mametchifull2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,140,122,2,2,2,2,12,112,64,64,64,96,16,12,2,2,2,132,120,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,60,255,238,246,246,246,246,247,47,63,63,63,63,63,47,246,246,246,238,223,255,254,124,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,192,224,241,251,127,255,255,255,255,254,254,254,254,254,255,255,255,223,191,123,241,96,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,1,1,14,31,31,15,7,7,7,7,7,7,7,15,31,31,15,1,0,0,0,0,0,0,0,0,0,0,0,0]) -mametchifull3 = bytearray([0,0,0,0,0,0,0,0,0,0,24,228,2,2,2,2,4,152,160,160,160,160,160,160,184,132,130,130,2,228,60,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,60,255,255,247,251,251,251,27,23,31,31,31,31,31,23,251,251,251,247,239,255,254,124,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,3,7,14,253,249,251,255,255,255,254,252,252,252,252,254,255,255,255,255,251,57,28,14,6,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,15,31,31,15,7,7,7,7,7,7,7,7,7,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) - -mametchimedium1 = bytearray([0,0,0,0,0,0,0,0,0,0,0,248,6,1,1,1,1,30,32,64,64,64,64,124,6,1,1,1,2,4,120,128,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,124,255,254,198,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,192,224,241,251,127,255,255,255,255,255,252,253,252,255,255,255,255,223,191,123,241,96,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,1,1,14,31,31,15,3,3,3,3,3,3,3,3,15,31,31,15,0,0,0,0,0,0,0,0,0,0,0,0]) -mametchimedium2 = bytearray([0,0,0,0,0,0,0,192,32,32,0,128,124,2,1,1,1,2,4,120,64,64,64,112,14,1,1,1,1,2,124,128,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,3,0,0,124,255,255,199,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,1,3,227,187,127,111,158,253,253,253,254,255,255,255,247,195,3,1,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,7,3,3,3,3,3,3,3,3,3,7,15,31,28,0,0,17,14,0,0,0,0,0,0,0]) -mametchimedium3 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,124,2,1,1,1,2,60,64,64,64,64,124,6,1,1,1,2,4,120,128,0,0,64,128,0,0,0,0, - 0,0,0,0,0,0,0,0,0,124,255,254,198,187,125,5,1,131,255,255,255,255,255,131,5,5,125,187,199,255,254,127,62,0,0,32,31,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,1,3,195,247,255,255,255,254,253,253,253,254,159,111,127,191,227,3,1,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,14,17,0,0,28,31,15,7,3,3,3,3,3,3,3,3,3,3,7,7,3,0,0,0,0,0,0,0,0,0,0,0]) - -mametchilow1 = bytearray([98,82,74,70,0,0,200,168,152,0,128,112,12,2,1,1,1,1,2,124,64,64,124,6,1,1,1,1,2,124,128,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,120,254,255,255,255,239,239,239,255,255,254,254,254,254,254,254,238,238,238,252,252,252,252,255,124,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,1,3,7,7,15,143,239,127,255,223,63,252,255,127,191,255,127,239,143,7,3,3,1,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,28,63,63,31,14,6,7,7,7,6,5,13,30,63,63,28,0,0,0,0,0,0,0,0,0,0,0]) -mametchilow2 = bytearray([0,0,0,0,0,0,0,0,0,0,0,128,124,2,1,1,1,1,6,124,64,64,124,2,1,1,1,1,2,12,112,128,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,124,255,252,252,252,252,254,230,254,254,254,254,254,254,254,255,255,231,255,255,255,255,255,254,120,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,1,3,3,7,143,239,127,255,191,127,248,248,56,223,255,63,239,143,15,7,7,3,1,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,28,63,63,30,13,5,6,7,7,7,6,14,31,63,63,28,0,0,0,0,0,0,0,0,0,0,0]) - -mametchisad1 = bytearray([0,0,0,0,0,0,0,0,0,0,224,16,12,4,4,3,1,1,2,28,32,32,64,64,32,16,8,4,2,2,2,2,4,12,240,0,0,0,0,0, - 0,0,0,0,0,0,0,0,192,224,248,253,183,178,176,176,176,176,208,224,224,224,224,224,224,224,192,160,160,160,160,160,160,227,252,240,0,0,0,0, - 0,0,0,0,0,0,0,0,3,7,15,159,223,223,157,248,189,157,159,143,143,143,143,159,159,189,184,189,189,175,183,59,27,15,7,1,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,12,29,61,61,61,63,31,31,31,31,31,31,31,31,31,31,31,24,55,55,57,60,30,12,0,0,0,0,0,0]) -mametchisad2 = bytearray([0,0,0,0,96,96,124,252,240,48,48,0,0,0,0,0,0,128,192,192,224,224,224,224,224,224,224,192,192,128,128,0,12,12,124,127,31,24,24,0, - 0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,252,255,243,255,255,15,247,251,255,255,255,255,255,255,255,0,1,6,8,8,8,16,16,224,0, - 0,0,0,0,224,248,252,248,255,255,255,248,254,252,248,7,255,255,255,255,255,254,255,255,255,255,255,255,255,1,0,0,0,28,20,20,20,22,35,192, - 12,30,30,30,63,63,63,63,63,63,63,63,63,63,63,28,19,15,31,31,31,63,63,63,63,63,63,47,39,32,32,32,16,16,16,16,16,16,16,15]) - - -# BITMAP: width: 15, height: 13 -heart1 = bytearray([60,126,231,243,251,255,254,252,254,255,255,255,255,126,60, - 0,0,0,1,3,7,15,31,15,7,3,1,0,0,0]) -heart2 = bytearray([0,60,102,242,250,254,252,248,252,254,254,254,126,60,0, - 0,0,0,0,1,3,7,15,7,3,1,0,0,0,0]) -heart3 = bytearray([0,0,56,108,244,252,248,240,248,252,252,124,56,0,0, - 0,0,0,0,0,1,3,7,3,1,0,0,0,0,0]) - -# BITMAP: width: 7, height: 7 -heartFull = bytearray([14,25,63,126,63,31,14]) - -eggSpr = thumby.Sprite(32, 38, egg2+egg1, 20, 1) -eggcrackSpr = thumby.Sprite(32, 38, eggcrack2+eggcrack1, 20, 1) -eggopenSpr = thumby.Sprite(60, 40, eggopen1+eggopen1+eggopen2+eggopen2+eggopen3+eggopen3+eggopen4+eggopen4, 5, 1) -babyenergieSpr = thumby.Sprite(30, 30, babyenergie1+babyenergie2, 20, 15) -babymediumSpr = thumby.Sprite(30, 30, babymedium1+babymedium2+babymedium3+babymedium4+babymedium5+babymedium6+babymedium7+babymedium8+babymedium9+babymedium10, 20, 15) -babylowSpr = thumby.Sprite(30, 30, babylow1+babylow2, 20, 15) -babyfullSpr = thumby.Sprite(30, 30, babyfull1+babyfull2+babyfull3+babyfull2, 20, 15) -babysadSpr = thumby.Sprite(30, 30, babysad1+babysad1+babysad2+babysad2, 20, 15) -poopenergieSpr = thumby.Sprite(40, 30, poopenergie1+poopenergie2, 15, 10) -poopfullSpr = thumby.Sprite(40, 30, poopfull1+poopfull2, 15, 10) -poopmediumSpr = thumby.Sprite(40, 30, poopmedium1+poopmedium2, 15, 10) -pooplowSpr = thumby.Sprite(40, 30, pooplow1+pooplow2, 15, 10) -poopsadSpr = thumby.Sprite(40, 30, poopsad1+poopsad1+poopsad2+poopsad2, 15, 10) -mametchienergieSpr = thumby.Sprite(40, 30, mametchifull1+mametchifull2+mametchienergie1+mametchifull2, 15, 9) -mametchifullSpr = thumby.Sprite(40, 30, mametchifull1+mametchifull2+mametchifull3+mametchifull2, 15, 9) -mametchimediumSpr = thumby.Sprite(40, 30, mametchimedium1+mametchimedium2+mametchimedium1+mametchimedium3, 15, 9) -mametchilowSpr = thumby.Sprite(40, 30, mametchilow1+mametchilow1+mametchilow1+mametchilow2+mametchilow2+mametchilow2, 15, 9) -mametchsadSpr = thumby.Sprite(40, 30, mametchisad1+mametchisad1+mametchisad1+mametchisad2+mametchisad2+mametchisad2, 15, 9) - -heartSpr = thumby.Sprite(15, 13, heart1+heart2+heart3+heart2, 2, 2) - -heartFull1Spr = thumby.Sprite(7, 7, heartFull, 0, 0) -heartFull2Spr = thumby.Sprite(7, 7, heartFull, 8, 0) -heartFull3Spr = thumby.Sprite(7, 7, heartFull, 16, 0) -heartFull4Spr = thumby.Sprite(7, 7, heartFull, 24, 0) -heartFull5Spr = thumby.Sprite(7, 7, heartFull, 32, 0) -heartFull6Spr = thumby.Sprite(7, 7, heartFull, 40, 0) - -# BITMAP: width: 11, height: 5 -batt0 = bytearray([31,17,17,17,17,17,17,17,17,27,14]) -batt1 = bytearray([31,31,31,31,17,17,17,17,17,27,14]) -batt2 = bytearray([31,31,31,31,31,31,31,17,17,27,14]) -batt3 = bytearray([31,31,31,31,31,31,31,31,31,31,14]) -charg = bytearray([31,31,27,27,9,0,18,27,27,31,14]) -emula = bytearray([31,21,17,0,31,2,31,0,31,16,31]) - -# BITMAP: width: 16, height: 16 -sun1 = bytearray([192,192,12,12,192,192,51,51,48,48,192,192,12,12,0,0, - 0,0,48,48,3,3,12,12,204,204,3,3,48,48,3,3]) -sun2 = bytearray([0,0,12,12,192,192,48,48,51,51,192,192,12,12,192,192, - 3,3,48,48,3,3,204,204,12,12,3,3,48,48,0,0]) - -sunleftSpr = thumby.Sprite(16, 16, sun1+sun2, 0, 20) -sunrightSpr = thumby.Sprite(16, 16, sun1+sun2, 54, 20) - -iconx = 61 -icony = 0 -iconw = 11 -iconh = 5 -b=charging - -def showHearts(): - if hearts > 0: - thumby.display.drawSprite(heartFull1Spr) - if hearts > 1: - thumby.display.drawSprite(heartFull2Spr) - if hearts > 2: - thumby.display.drawSprite(heartFull3Spr) - if hearts > 3: - thumby.display.drawSprite(heartFull4Spr) - if hearts > 4: - thumby.display.drawSprite(heartFull5Spr) - if hearts > 5: - thumby.display.drawSprite(heartFull6Spr) - -def showSun(): - sunleftSpr.setFrame(frameCtr) - thumby.display.drawSprite(sunleftSpr) - sunrightSpr.setFrame(frameCtr) - thumby.display.drawSprite(sunrightSpr) - -def NewEgg(): - frameCtr = 0 - counter = 0 - thumby.display.setFPS(2) - while(counter < 50): - thumby.display.fill(1) - eggSpr.setFrame(frameCtr) - thumby.display.drawSprite(eggSpr) - thumby.display.update() - thumby.audio.play(200,100) - frameCtr += 1 - counter += 1 - while(counter < 100): - thumby.display.setFPS(4) - thumby.display.fill(1) - eggcrackSpr.setFrame(frameCtr) - thumby.display.drawSprite(eggcrackSpr) - thumby.display.update() - thumby.audio.play(300,100) - frameCtr += 1 - counter += 1 - counter = 0 - frameCtr = 0 - while(counter < 8): - thumby.audio.play(400,50) - thumby.display.setFPS(2) - thumby.display.fill(1) - eggopenSpr.setFrame(frameCtr) - thumby.display.drawSprite(eggopenSpr) - thumby.display.update() - frameCtr += 1 - counter += 1 - -if hearts > 6: - hearts = -1 - -if hearts == -1: - NewEgg() - hearts = 0 - score = 0 - stage = 0 - thumby.saveData.setItem('hearts', hearts) - thumby.saveData.setItem('score', score) - thumby.saveData.setItem('stage', stage) - thumby.saveData.save() - -hungry = 4 -frameCtr = 0 - -while (not thumby.buttonA.pressed()): - thumby.display.setFPS(4) - thumby.display.fill(0) - in_emu=not hasattr(thumby.display.display,"cs") - if (in_emu): - thumby.display.blit(emula,iconx,icony,iconw,iconh,-1,0,0) - else: - v=adc.read_u16() - b=min(b,v) - if (v > charging): - thumby.display.blit(charg,iconx,icony,iconw,iconh,-1,0,0) - if stage == 0: - babyenergieSpr.setFrame(frameCtr) - thumby.display.drawSprite(babyenergieSpr) - if stage == 1: - poopenergieSpr.setFrame(frameCtr) - thumby.display.drawSprite(poopenergieSpr) - if stage == 2: - mametchienergieSpr.setFrame(frameCtr) - thumby.display.drawSprite(mametchienergieSpr) - if hungry == 1: - hungry = 100 - hearts += 1 - score += 1 - charges +=1 - thumby.saveData.setItem('score', score) - thumby.saveData.setItem('hearts', hearts) - thumby.saveData.setItem('charges', charges) - thumby.saveData.save() - if hungry == 0: - hungry = 100 - hearts += 1 - score += 2 - charges +=1 - thumby.saveData.setItem('score', score) - thumby.saveData.setItem('hearts', hearts) - thumby.saveData.setItem('charges', charges) - thumby.saveData.save() - if (hungry == 2) or (hungry == 3): - thumby.display.fill(0) - thumby.display.drawText("I am not!", 10, 5, 1) - thumby.display.drawText("hungry!", 17, 16, 1) - thumby.display.drawText("Damn!", 22, 28, 1) - thumby.audio.play(100,500) - hungry = 4 - if stage < 2: - score = hearts - else: - score = hearts + 11 - thumby.saveData.setItem('score', score) - thumby.saveData.save() - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - if hungry == 100: - heartSpr.setFrame(frameCtr) - thumby.display.drawSprite(heartSpr) - else: - showHearts() - if score > 21: - showSun() - if hearts == 7: - if score < 11: - stage = 1 - hearts = 0 - score = 0 - thumby.saveData.setItem('score', score) - thumby.saveData.setItem('stage', stage) - thumby.saveData.setItem('hearts', hearts) - thumby.saveData.save() - thumby.display.fill(0) - thumby.display.drawText("Try better!", 3, 5, 1) - thumby.display.drawText("Holy", 22, 17, 1) - thumby.display.drawText("SHIT!", 20, 28, 1) - thumby.audio.play(100,500) - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - if (score > 10) and (stage < 2): - stage = 2 - hearts = 0 - thumby.saveData.setItem('stage', stage) - thumby.saveData.setItem('hearts', hearts) - thumby.saveData.save() - thumby.display.fill(0) - thumby.display.drawText("Well done!", 8, 5, 1) - thumby.display.drawText("Your pet", 10, 19, 1) - thumby.display.drawText("envolved!", 9, 30, 1) - thumby.audio.play(1000,500) - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - if score > 17: - thumby.display.fill(0) - if score > 21: - thumby.display.drawText("**********", 6, 5, 1) - thumby.display.drawText("Exellent!!", 6, 17, 1) - thumby.display.drawText("**********", 6, 28, 1) - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - thumby.display.fill(0) - thumby.display.drawText("**********", 6, 1, 1) - thumby.display.drawText("Mametchi", 12, 12, 1) - thumby.display.drawText("is happy!", 9, 23, 1) - thumby.display.drawText("**********", 6, 34, 1) - thumby.audio.play(1000,500) - pets += 1 - thumby.saveData.setItem('pets', pets) - thumby.saveData.save() - else: - thumby.display.drawText("Well done!", 8, 5, 1) - thumby.display.drawText("But you can", 3, 19, 1) - thumby.display.drawText("do better!", 6, 30, 1) - thumby.audio.play(100,500) - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - thumby.display.fill(0) - thumby.display.drawText("Your pet", 10, 2, 1) - thumby.display.drawText("grows up", 10, 12, 1) - thumby.display.drawText("and leaves", 6, 22, 1) - thumby.display.drawText("its home!", 9, 32, 1) - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - thumby.display.fill(0) - thumby.display.drawText("**********", 6, 1, 1) - thumby.display.drawText("You got a", 9, 12, 1) - thumby.display.drawText("new EGG!", 12, 23, 1) - thumby.display.drawText("**********", 6, 34, 1) - thumby.display.update() - while(thumby.actionPressed() == False): - pass - time.sleep(0.5) - NewEgg() - hearts = 0 - score = 0 - stage = 0 - thumby.saveData.setItem('score', score) - thumby.saveData.setItem('stage', stage) - thumby.saveData.setItem('hearts', hearts) - thumby.saveData.save() - frameCtr += 1 - b=v - else: - if (b > level_3): - thumby.display.blit(batt3,iconx,icony,iconw,iconh,-1,0,0) - if stage == 0: - babyfullSpr.setFrame(frameCtr) - thumby.display.drawSprite(babyfullSpr) - if stage == 1: - poopfullSpr.setFrame(frameCtr) - thumby.display.drawSprite(poopfullSpr) - if stage == 2: - mametchifullSpr.setFrame(frameCtr) - thumby.display.drawSprite(mametchifullSpr) - showHearts() - if score > 21: - showSun() - hungry = 3 - frameCtr += 1 - elif (b > level_2): - thumby.display.blit(batt2,iconx,icony,iconw,iconh,-1,0,0) - if stage == 0: - babymediumSpr.setFrame(frameCtr) - thumby.display.drawSprite(babymediumSpr) - if stage == 1: - poopmediumSpr.setFrame(frameCtr) - thumby.display.drawSprite(poopmediumSpr) - if stage == 2: - mametchimediumSpr.setFrame(frameCtr) - thumby.display.drawSprite(mametchimediumSpr) - showHearts() - if score > 21: - showSun() - hungry = 2 - frameCtr += 1 - elif (b > level_1): - thumby.display.blit(batt1,iconx,icony,iconw,iconh,-1,0,0) - if stage == 0: - babylowSpr.setFrame(frameCtr) - thumby.display.drawSprite(babylowSpr) - if stage == 1: - pooplowSpr.setFrame(frameCtr) - thumby.display.drawSprite(pooplowSpr) - if stage == 2: - mametchilowSpr.setFrame(frameCtr) - thumby.display.drawSprite(mametchilowSpr) - showHearts() - if score > 21: - showSun() - frameCtr += 1 - hungry = 1 - else: - thumby.display.blit(batt0,iconx,icony,iconw,iconh,-1,0,0) - if stage == 0: - babysadSpr.setFrame(frameCtr) - thumby.display.drawSprite(babysadSpr) - if stage == 1: - poopsadSpr.setFrame(frameCtr) - thumby.display.drawSprite(poopsadSpr) - if stage == 2: - mametchsadSpr.setFrame(frameCtr) - thumby.display.drawSprite(mametchsadSpr) - showHearts() - hungry = 0 - frameCtr += 1 - while thumby.buttonU.pressed(): - thumby.display.fill(0) - thumby.display.drawText("Current", 17, 6, 1) - thumby.display.drawText("Pet Score:", 8, 17, 1) - pixelLength = len(str(score)) * 5 - offset = int((thumby.display.width - pixelLength) / 2) - thumby.display.drawText(str(score), offset, 28, 1) - thumby.display.update() - pass - while thumby.buttonL.pressed(): - thumby.display.fill(0) - thumby.display.drawText("Feed your", 9, 2, 1) - thumby.display.drawText("hungry pet", 6, 12, 1) - pixelLength = len(str(charges)) * 5 - offset = int((thumby.display.width - pixelLength) / 2) - thumby.display.drawText(str(charges), offset, 22, 1) - thumby.display.drawText("times!", 19, 32, 1) - thumby.display.update() - pass - while thumby.buttonR.pressed(): - thumby.display.fill(0) - thumby.display.drawText("Raise happy", 3, 2, 1) - thumby.display.drawText("Mametchi", 13, 12, 1) - pixelLength = len(str(pets)) * 5 - offset = int((thumby.display.width - pixelLength) / 2) - thumby.display.drawText(str(pets), offset, 22, 1) - thumby.display.drawText("times!", 19, 32, 1) - thumby.display.update() - pass - while thumby.buttonD.pressed(): - thumby.display.fill(0) - thumby.display.drawText("Hello", 19, 10, 1) - thumby.display.drawText("Friend!", 15, 21, 1) - thumby.display.update() - pass - while (thumby.buttonB.pressed()): - thumby.display.fill(0) - v=adc.read_u16() - b=min(b,v) - thumby.display.drawText("v=%d" % b, 0, 0, 1) - if (v > charging): - thumby.display.blit(charg,iconx,icony,iconw,iconh,-1,0,0) - thumby.display.drawText("AC", 30, 22, 1) - else: - if (b > level_3): - thumby.display.blit(batt3,iconx,icony,iconw,iconh,-1,0,0) - thumby.display.drawText("Full", 25, 22, 1) - elif (b > level_2): - thumby.display.blit(batt2,iconx,icony,iconw,iconh,-1,0,0) - thumby.display.drawText("Medium", 20, 22, 1) - elif (b > level_1): - thumby.display.blit(batt1,iconx,icony,iconw,iconh,-1,0,0) - thumby.display.drawText("Low", 26, 22, 1) - else: - thumby.display.blit(batt0,iconx,icony,iconw,iconh,-1,0,0) - thumby.display.drawText("Very Low", 12, 22, 1) - thumby.display.update() - thumby.display.update() From 5df64f777c5fe6bf791552ce19749f6dc881a568 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 18:12:29 +0100 Subject: [PATCH 8/9] Update arcade_description.txt --- BatteryPet/arcade_description.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BatteryPet/arcade_description.txt b/BatteryPet/arcade_description.txt index 77ade2f..94a2f8a 100644 --- a/BatteryPet/arcade_description.txt +++ b/BatteryPet/arcade_description.txt @@ -1,8 +1,8 @@ Raise a virtual pet. Open 'BatteryPet' to check the battery status. -Press A for the charging level. +Press B for the charging level. Press the direction pad for details. -Press B to exit. +Press A to exit. Plugin the charging cabel with the App open. Use it to feed your pet when Thumby is low or very low. After feeding you can exit the App or turn off Thumby. From 55df4384e35de12ce664a25fcc9911ab69dea3b1 Mon Sep 17 00:00:00 2001 From: Spocky2024 Date: Sun, 17 Nov 2024 18:31:00 +0100 Subject: [PATCH 9/9] Rename arcade_title_video.webm.webm to arcade_title_video.webm --- ...itle_video.webm.webm => arcade_title_video.webm} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename BatteryPet/{arcade_title_video.webm.webm => arcade_title_video.webm} (100%) diff --git a/BatteryPet/arcade_title_video.webm.webm b/BatteryPet/arcade_title_video.webm similarity index 100% rename from BatteryPet/arcade_title_video.webm.webm rename to BatteryPet/arcade_title_video.webm