Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Cookie Clicker: fits in 13 KB, golden cookie timer as in the game

Mason3639b2afe5eb14b
diff --git a/games/cookieclicker/src/data.h b/games/cookieclicker/src/data.h
index 1de1c2d0..979eb1b9 100644
--- a/games/cookieclicker/src/data.h
+++ b/games/cookieclicker/src/data.h
@@ -1,4 +1,4 @@
-/* Generated by tools/data.py: Cookie Clicker's names, news and the store's pictures. */
+/* Made by tools/data.py: Cookie Clicker's names, news and the store's pictures. */
#define TIER_N 3
#define ACH_TIERS 1
/* the upgrades, in the order of the save */
@@ -9,7 +9,7 @@
#define N_KITTEN 3
#define U_GOLD (U_KITTEN + N_KITTEN)
#define U_COOKIE (U_GOLD + 3)
-#define N_COOKIE 9
+#define N_COOKIE 8
#define U_TIER (U_COOKIE + N_COOKIE)
#define N_UP (U_TIER + 19 * TIER_N)
/* the achievements, in the order of the save */
@@ -30,90 +30,89 @@
descriptions, the milks; then the pictures, 18 bytes each (12 x 12 bits, the first lowest) */
#define X_ACH N_UP
#define X_NEWS (X_ACH + N_ACH)
-#define N_LORE 10
+#define N_LORE 9
#define X_MDESC (X_NEWS + N_LORE)
#define X_MILK (X_MDESC + 0)
#define N_MILK 3
-#define N_TEXT 158
-#define ICONS_AT 2916
-#define TEXT_SIZE 3312
-static const uint8_t cookie_up[N_COOKIE] = {33, 49, 34, 82, 67, 83, 67, 84, 69};
+#define N_TEXT 156
+#define ICONS_AT 2820
+#define TEXT_SIZE 3216
+static const uint8_t cookie_up[N_COOKIE] = {33, 49, 34, 82, 67, 83, 67, 84};
enum { IC_CURSOR, IC_GRANDMA, IC_FARM, IC_MINE, IC_FACTORY, IC_BANK, IC_TEMPLE, IC_WIZARD, IC_SHIPMENT, IC_ALCHEMY, IC_PORTAL, IC_TIME, IC_ANTIMATTER, IC_PRISM, IC_CHANCE, IC_FRACTAL, IC_CONSOLE, IC_IDLEVERSE, IC_CORTEX, IC_YOU, IC_MOUSE, IC_KITTEN };
-static const uint8_t text_z[1812] = {
- 124, 86, 7, 151, 228, 56, 10, 246, 79, 225, 114, 206, 249, 229, 201, 155, 183, 111, 123, 230, 194, 203, 216, 194,
- 54, 175, 36, 240, 34, 84, 53, 190, 95, 127, 226, 149, 187, 186, 55, 206, 116, 2, 33, 36, 224, 251, 62, 213,
- 23, 196, 50, 171, 77, 148, 128, 37, 209, 123, 152, 89, 22, 178, 225, 5, 218, 134, 25, 188, 137, 80, 134, 205,
- 232, 76, 226, 172, 2, 147, 17, 150, 225, 89, 25, 185, 71, 187, 105, 171, 195, 219, 181, 255, 68, 73, 199, 222,
- 58, 124, 202, 57, 71, 236, 131, 253, 252, 107, 246, 91, 251, 154, 227, 159, 13, 211, 215, 125, 119, 25, 171, 243,
- 4, 165, 39, 167, 225, 67, 83, 57, 254, 124, 203, 142, 194, 173, 28, 230, 179, 132, 5, 197, 31, 29, 239, 68,
- 71, 71, 126, 18, 242, 42, 183, 244, 104, 125, 204, 238, 36, 176, 82, 222, 226, 156, 195, 188, 168, 157, 158, 152,
- 36, 11, 11, 133, 227, 147, 54, 157, 118, 72, 184, 15, 247, 100, 36, 137, 55, 246, 125, 120, 67, 14, 57, 86,
- 226, 158, 44, 48, 169, 158, 152, 234, 112, 223, 22, 180, 155, 245, 57, 122, 33, 204, 96, 200, 245, 73, 208, 29,
- 161, 52, 135, 177, 185, 211, 99, 240, 11, 157, 52, 220, 15, 246, 191, 87, 118, 130, 105, 237, 238, 140, 78, 55,
- 255, 167, 56, 97, 194, 194, 8, 79, 163, 95, 106, 27, 51, 253, 102, 90, 121, 251, 206, 12, 229, 91, 119, 190,
- 86, 187, 160, 165, 10, 179, 105, 129, 197, 80, 82, 193, 225, 222, 137, 242, 111, 182, 216, 151, 192, 52, 103, 150,
- 5, 54, 150, 104, 200, 104, 60, 97, 248, 19, 137, 55, 139, 187, 175, 132, 27, 172, 26, 233, 200, 156, 51, 255,
- 47, 64, 20, 39, 16, 184, 209, 173, 51, 11, 246, 2, 104, 185, 142, 123, 120, 151, 221, 142, 63, 239, 189, 89,
- 98, 138, 118, 200, 153, 118, 53, 24, 41, 123, 100, 230, 156, 32, 227, 168, 54, 220, 95, 8, 189, 174, 186, 13,
- 111, 49, 103, 50, 112, 138, 95, 61, 247, 196, 181, 170, 253, 198, 168, 114, 117, 20, 15, 152, 38, 238, 191, 162,
- 176, 225, 217, 196, 233, 55, 155, 169, 206, 112, 198, 22, 89, 223, 104, 78, 36, 192, 73, 115, 223, 141, 147, 241,
- 204, 83, 116, 145, 50, 79, 172, 173, 194, 152, 169, 86, 150, 101, 184, 83, 22, 143, 139, 173, 232, 29, 202, 132,
- 150, 114, 152, 35, 93, 115, 203, 196, 36, 14, 139, 113, 81, 142, 94, 252, 11, 133, 115, 70, 16, 26, 91, 70,
- 26, 254, 173, 86, 86, 205, 209, 26, 163, 47, 91, 4, 207, 121, 39, 235, 91, 189, 239, 145, 125, 120, 85, 43,
- 201, 68, 160, 51, 36, 109, 203, 218, 9, 210, 158, 204, 237, 118, 134, 227, 152, 201, 135, 15, 165, 162, 16, 40,
- 122, 12, 229, 134, 220, 123, 109, 25, 70, 149, 52, 188, 206, 237, 61, 76, 184, 225, 196, 174, 193, 55, 46, 4,
- 27, 26, 38, 125, 15, 70, 85, 243, 153, 44, 72, 39, 222, 10, 4, 234, 36, 89, 43, 199, 136, 70, 173, 42,
- 61, 157, 91, 100, 247, 149, 212, 246, 225, 19, 180, 229, 10, 160, 32, 226, 20, 120, 72, 100, 157, 6, 5, 54,
- 205, 92, 215, 225, 31, 190, 134, 95, 251, 216, 111, 128, 203, 188, 172, 62, 252, 87, 155, 93, 201, 114, 96, 110,
- 248, 225, 179, 156, 225, 57, 121, 133, 103, 70, 240, 249, 60, 255, 16, 10, 46, 60, 245, 117, 150, 225, 223, 44,
- 18, 71, 103, 13, 126, 236, 224, 60, 157, 200, 59, 108, 28, 71, 60, 145, 93, 73, 32, 137, 242, 104, 122, 17,
- 168, 113, 237, 222, 92, 156, 92, 57, 133, 30, 17, 124, 132, 103, 188, 159, 140, 55, 143, 250, 170, 102, 130, 89,
- 13, 82, 43, 37, 182, 255, 245, 207, 35, 59, 160, 25, 238, 81, 41, 78, 39, 208, 51, 217, 156, 245, 18, 169,
- 121, 166, 234, 144, 250, 15, 150, 61, 242, 65, 105, 217, 185, 71, 84, 2, 22, 192, 32, 80, 93, 41, 231, 161,
- 87, 242, 155, 73, 37, 150, 88, 101, 184, 51, 150, 137, 183, 76, 9, 132, 154, 97, 134, 186, 246, 236, 57, 196,
- 96, 164, 125, 120, 6, 117, 51, 150, 238, 136, 105, 179, 25, 134, 170, 98, 14, 77, 121, 145, 53, 234, 134, 115,
- 0, 237, 149, 144, 45, 157, 69, 41, 142, 178, 24, 127, 92, 180, 137, 67, 10, 166, 7, 187, 241, 68, 16, 178,
- 27, 77, 233, 183, 62, 197, 222, 170, 133, 14, 16, 221, 107, 172, 4, 123, 99, 10, 32, 122, 233, 192, 160, 180,
- 228, 136, 139, 21, 235, 215, 153, 231, 28, 136, 60, 236, 192, 106, 78, 191, 153, 49, 148, 242, 193, 247, 66, 107,
- 225, 233, 193, 122, 131, 25, 39, 127, 180, 223, 9, 71, 237, 152, 31, 28, 1, 182, 224, 206, 131, 253, 161, 204,
- 44, 236, 116, 179, 75, 81, 243, 199, 248, 151, 42, 63, 115, 168, 174, 27, 20, 130, 184, 229, 11, 172, 237, 186,
- 30, 252, 251, 0, 45, 77, 106, 116, 216, 33, 76, 152, 118, 112, 172, 190, 67, 117, 35, 44, 15, 66, 83, 84,
- 170, 147, 245, 94, 212, 10, 155, 105, 106, 211, 163, 10, 157, 213, 156, 222, 63, 88, 91, 203, 21, 111, 107, 95,
- 54, 12, 235, 243, 21, 86, 218, 127, 13, 187, 182, 159, 25, 65, 117, 206, 185, 123, 140, 134, 79, 200, 127, 86,
- 65, 232, 28, 196, 199, 232, 251, 130, 44, 125, 98, 29, 154, 113, 19, 158, 174, 127, 163, 175, 89, 15, 191, 230,
- 189, 108, 60, 213, 195, 50, 44, 120, 4, 213, 114, 139, 95, 40, 165, 135, 13, 55, 13, 207, 97, 124, 26, 143,
- 21, 92, 86, 162, 60, 188, 185, 138, 242, 207, 234, 77, 180, 159, 199, 136, 61, 216, 9, 51, 90, 9, 142, 193,
- 73, 244, 2, 225, 185, 42, 234, 157, 69, 3, 174, 143, 246, 138, 28, 216, 36, 247, 29, 54, 18, 217, 175, 164,
- 244, 16, 6, 87, 168, 171, 177, 80, 23, 183, 11, 251, 180, 82, 26, 94, 189, 223, 40, 113, 236, 237, 90, 132,
- 82, 75, 115, 244, 176, 158, 245, 27, 5, 153, 132, 46, 33, 60, 57, 93, 197, 229, 130, 182, 133, 158, 241, 136,
- 30, 19, 248, 68, 133, 96, 91, 213, 85, 226, 1, 13, 20, 106, 243, 225, 158, 242, 28, 108, 113, 100, 161, 174,
- 83, 127, 248, 99, 144, 107, 255, 89, 206, 71, 111, 163, 132, 126, 2, 58, 172, 236, 240, 51, 42, 195, 135, 209,
- 248, 145, 23, 24, 13, 89, 226, 198, 29, 235, 59, 4, 239, 167, 172, 66, 135, 148, 31, 141, 57, 94, 235, 195,
- 120, 22, 248, 208, 19, 5, 213, 66, 127, 226, 169, 243, 22, 133, 54, 206, 41, 20, 216, 166, 120, 34, 39, 239,
- 116, 91, 81, 166, 112, 181, 165, 144, 68, 13, 209, 210, 153, 40, 67, 230, 158, 162, 92, 249, 117, 244, 255, 183,
- 240, 188, 5, 165, 70, 77, 123, 47, 94, 188, 70, 27, 9, 61, 176, 99, 183, 168, 107, 151, 103, 182, 26, 12,
- 243, 105, 133, 69, 41, 66, 33, 198, 228, 134, 117, 253, 45, 132, 188, 8, 117, 142, 142, 106, 171, 106, 2, 195,
- 169, 39, 144, 190, 195, 40, 239, 224, 218, 166, 149, 42, 176, 63, 228, 195, 194, 221, 143, 139, 209, 145, 204, 246,
- 43, 241, 117, 254, 182, 243, 15, 11, 208, 8, 54, 221, 90, 70, 131, 104, 229, 215, 206, 253, 150, 104, 199, 28,
- 163, 195, 81, 155, 67, 232, 103, 225, 76, 177, 164, 77, 190, 30, 63, 90, 244, 7, 115, 134, 72, 60, 234, 126,
- 171, 115, 71, 251, 150, 228, 1, 31, 95, 1, 67, 230, 227, 226, 69, 133, 246, 223, 14, 119, 164, 91, 166, 30,
- 88, 232, 250, 129, 228, 76, 182, 7, 198, 1, 47, 184, 71, 202, 133, 28, 16, 130, 117, 223, 82, 240, 219, 160,
- 43, 68, 250, 64, 82, 105, 149, 90, 169, 144, 40, 29, 159, 88, 92, 191, 175, 67, 43, 158, 9, 70, 34, 1,
- 193, 18, 133, 199, 171, 25, 183, 139, 58, 174, 120, 239, 63, 37, 145, 245, 157, 215, 15, 126, 133, 243, 233, 241,
- 197, 187, 154, 95, 96, 221, 70, 50, 219, 175, 230, 255, 123, 30, 6, 24, 185, 130, 232, 91, 163, 182, 187, 222,
- 184, 182, 86, 81, 163, 109, 236, 108, 109, 55, 168, 103, 126, 21, 167, 182, 17, 107, 131, 250, 108, 95, 124, 182,
- 61, 199, 213, 223, 121, 55, 127, 15, 207, 134, 106, 19, 24, 24, 88, 152, 134, 176, 5, 150, 176, 102, 51, 232,
- 25, 181, 240, 83, 135, 223, 157, 56, 169, 118, 6, 181, 247, 44, 31, 218, 200, 97, 186, 92, 118, 4, 229, 251,
- 203, 15, 103, 237, 136, 170, 244, 135, 25, 202, 109, 228, 216, 218, 71, 135, 65, 63, 75, 41, 101, 223, 209, 182,
- 23, 51, 7, 234, 56, 10, 56, 44, 230, 68, 16, 14, 215, 253, 186, 80, 247, 107, 30, 40, 17, 88, 240, 132,
- 90, 162, 217, 158, 15, 109, 55, 68, 10, 23, 64, 22, 204, 111, 86, 173, 8, 75, 158, 234, 220, 75, 114, 4,
- 185, 1, 68, 13, 163, 171, 222, 72, 74, 25, 255, 221, 244, 212, 104, 98, 169, 249, 79, 232, 66, 237, 183, 80,
- 178, 46, 51, 217, 71, 162, 217, 155, 78, 238, 40, 54, 189, 125, 34, 232, 249, 249, 147, 115, 239, 91, 112, 163,
- 87, 95, 224, 137, 170, 22, 136, 178, 227, 223, 66, 98, 184, 56, 245, 217, 143, 67, 231, 175, 13, 69, 42, 118,
- 152, 93, 7, 207, 107, 148, 33, 12, 22, 188, 145, 86, 205, 205, 221, 164, 63, 121, 24, 17, 63, 180, 221, 226,
- 133, 158, 207, 200, 22, 96, 76, 124, 212, 88, 184, 107, 234, 194, 185, 185, 187, 159, 181, 19, 205, 237, 102, 83,
- 12, 209, 66, 117, 111, 232, 162, 55, 84, 183, 50, 77, 21, 69, 0, 96, 89, 30, 222, 69, 112, 1, 224, 16,
- 17, 237, 12, 160, 58, 203, 243, 43, 50, 144, 72, 76, 240, 194, 245, 135, 65, 175, 212, 136, 55, 37, 11, 3,
- 16, 99, 81, 192, 2, 17, 89, 126, 220, 239, 150, 3, 86, 173, 223, 170, 189, 183, 144, 1, 168, 118, 101, 25,
- 56, 162, 167, 114, 84, 198, 207, 67, 68, 214, 192, 36,
+static const uint8_t text_z[1783] = {
+ 108, 86, 135, 150, 228, 58, 10, 245, 167, 176, 57, 231, 124, 242, 228, 151, 95, 239, 235, 153, 13, 39, 99, 9,
+ 219, 156, 146, 192, 15, 161, 174, 241, 126, 253, 154, 83, 174, 234, 201, 157, 64, 8, 9, 184, 247, 170, 190, 35,
+ 150, 73, 45, 81, 6, 150, 76, 111, 97, 98, 153, 201, 134, 103, 104, 43, 22, 240, 46, 66, 5, 86, 163, 7,
+ 18, 103, 21, 72, 70, 88, 135, 39, 117, 228, 61, 218, 77, 123, 27, 94, 47, 251, 79, 148, 124, 236, 109, 195,
+ 215, 92, 74, 196, 94, 237, 167, 31, 216, 175, 237, 3, 199, 63, 59, 230, 15, 125, 119, 5, 155, 115, 130, 186,
+ 39, 167, 225, 115, 83, 57, 254, 124, 205, 142, 194, 189, 30, 230, 147, 140, 21, 197, 31, 29, 111, 68, 71, 71,
+ 126, 39, 228, 69, 233, 249, 209, 250, 146, 221, 73, 96, 161, 178, 198, 57, 135, 121, 86, 59, 189, 99, 146, 204,
+ 44, 20, 142, 175, 122, 58, 109, 144, 113, 27, 238, 201, 72, 50, 175, 236, 219, 240, 138, 28, 74, 172, 196, 61,
+ 89, 32, 169, 158, 152, 218, 112, 223, 103, 180, 155, 245, 45, 122, 37, 44, 96, 200, 237, 157, 160, 59, 66, 233,
+ 14, 99, 119, 167, 199, 224, 103, 154, 52, 220, 87, 251, 223, 11, 59, 65, 90, 118, 119, 65, 167, 155, 255, 107,
+ 76, 152, 177, 50, 194, 187, 209, 207, 181, 143, 133, 126, 147, 22, 94, 111, 190, 151, 106, 103, 180, 220, 96, 50,
+ 173, 48, 27, 74, 174, 56, 220, 59, 81, 249, 205, 26, 57, 51, 152, 150, 194, 50, 195, 202, 18, 165, 142, 198,
+ 9, 195, 159, 73, 188, 91, 220, 106, 33, 92, 97, 209, 72, 71, 230, 92, 248, 127, 1, 143, 56, 129, 192, 141,
+ 110, 53, 207, 184, 95, 141, 230, 203, 32, 135, 55, 197, 237, 248, 243, 222, 187, 101, 166, 40, 84, 30, 104, 83,
+ 131, 145, 138, 71, 102, 46, 25, 10, 142, 106, 195, 253, 153, 208, 219, 162, 235, 240, 26, 75, 33, 3, 167, 248,
+ 181, 231, 78, 220, 154, 218, 111, 140, 26, 55, 71, 241, 0, 96, 230, 253, 87, 20, 54, 60, 73, 156, 127, 179,
+ 154, 234, 4, 15, 216, 35, 235, 43, 45, 153, 4, 56, 107, 217, 119, 99, 50, 158, 56, 69, 127, 168, 112, 98,
+ 237, 13, 198, 66, 173, 177, 204, 195, 157, 178, 120, 92, 108, 65, 223, 65, 74, 104, 185, 132, 57, 210, 37, 183,
+ 36, 38, 113, 152, 141, 171, 114, 244, 226, 95, 40, 92, 10, 130, 208, 216, 11, 210, 240, 111, 181, 186, 104, 137,
+ 214, 24, 125, 223, 35, 120, 42, 27, 217, 190, 213, 185, 170, 108, 195, 139, 214, 72, 18, 129, 78, 144, 181, 207,
+ 203, 14, 253, 254, 206, 76, 111, 103, 56, 142, 133, 124, 248, 92, 26, 10, 129, 162, 199, 80, 110, 152, 188, 215,
+ 94, 96, 84, 201, 195, 203, 210, 223, 66, 194, 21, 19, 187, 6, 147, 184, 18, 172, 104, 152, 245, 45, 24, 53,
+ 45, 15, 100, 65, 39, 241, 94, 33, 240, 36, 217, 122, 61, 70, 52, 106, 83, 217, 211, 185, 69, 118, 95, 72,
+ 109, 27, 190, 66, 155, 9, 42, 38, 180, 160, 119, 224, 33, 147, 237, 0, 175, 176, 106, 225, 182, 12, 255, 240,
+ 37, 252, 186, 143, 253, 6, 198, 194, 243, 226, 195, 127, 181, 219, 133, 6, 7, 230, 134, 31, 62, 41, 5, 158,
+ 146, 55, 120, 98, 4, 223, 78, 211, 15, 161, 226, 204, 105, 95, 103, 25, 254, 205, 34, 113, 116, 209, 64, 254,
+ 6, 206, 233, 68, 190, 195, 198, 113, 196, 19, 217, 5, 222, 146, 169, 140, 166, 103, 129, 22, 215, 222, 155, 139,
+ 201, 149, 115, 40, 13, 193, 23, 248, 128, 247, 201, 120, 245, 168, 175, 105, 33, 152, 212, 32, 247, 90, 99, 251,
+ 95, 255, 60, 178, 3, 154, 225, 22, 149, 98, 58, 129, 62, 144, 77, 69, 207, 145, 154, 39, 106, 14, 153, 154,
+ 179, 108, 145, 15, 106, 47, 206, 123, 68, 35, 96, 1, 12, 82, 181, 133, 74, 25, 246, 74, 126, 147, 84, 98,
+ 137, 85, 134, 59, 99, 73, 188, 22, 202, 32, 212, 13, 11, 180, 101, 207, 94, 130, 230, 35, 109, 195, 19, 104,
+ 171, 177, 236, 142, 152, 54, 155, 97, 232, 37, 150, 80, 139, 103, 69, 163, 110, 120, 8, 160, 189, 16, 178, 121,
+ 103, 81, 142, 163, 44, 198, 31, 23, 237, 226, 144, 131, 195, 193, 124, 60, 17, 132, 160, 70, 83, 246, 91, 159,
+ 98, 111, 211, 74, 7, 136, 238, 53, 86, 130, 189, 49, 5, 16, 61, 239, 192, 160, 60, 151, 136, 139, 21, 219,
+ 175, 51, 77, 37, 16, 121, 216, 129, 213, 146, 127, 51, 97, 104, 224, 213, 247, 76, 91, 229, 116, 181, 94, 97,
+ 193, 228, 143, 246, 27, 225, 168, 29, 203, 213, 17, 96, 11, 238, 92, 237, 207, 101, 98, 97, 167, 155, 93, 171,
+ 154, 63, 198, 63, 87, 249, 153, 67, 115, 93, 161, 18, 196, 45, 159, 97, 235, 151, 245, 224, 223, 103, 104, 57,
+ 169, 209, 97, 135, 48, 97, 222, 192, 177, 249, 6, 205, 141, 176, 94, 133, 166, 170, 52, 39, 219, 123, 209, 26,
+ 172, 166, 185, 167, 71, 21, 122, 80, 115, 122, 123, 181, 214, 94, 26, 222, 214, 190, 239, 24, 214, 183, 11, 44,
+ 180, 253, 26, 54, 237, 63, 51, 130, 230, 92, 202, 238, 49, 26, 190, 34, 255, 89, 3, 161, 135, 32, 62, 70,
+ 223, 103, 100, 217, 39, 182, 67, 51, 110, 194, 233, 242, 55, 250, 82, 244, 240, 107, 217, 234, 202, 169, 29, 150,
+ 97, 197, 35, 168, 213, 91, 252, 76, 57, 95, 55, 220, 212, 185, 132, 241, 117, 60, 67, 112, 94, 136, 202, 240,
+ 234, 34, 202, 63, 107, 55, 209, 126, 26, 35, 246, 96, 39, 76, 104, 53, 56, 6, 39, 209, 51, 132, 231, 162,
+ 168, 119, 22, 13, 184, 60, 199, 11, 114, 96, 147, 220, 55, 88, 73, 100, 187, 144, 210, 67, 24, 92, 161, 45,
+ 198, 66, 187, 184, 157, 217, 211, 66, 121, 120, 241, 118, 165, 204, 177, 119, 215, 34, 148, 86, 187, 163, 135, 245,
+ 100, 191, 81, 144, 73, 232, 28, 194, 83, 242, 69, 92, 206, 104, 107, 232, 25, 143, 232, 49, 129, 175, 84, 8,
+ 214, 69, 93, 37, 158, 198, 64, 161, 118, 31, 238, 169, 76, 193, 22, 71, 22, 218, 117, 234, 15, 127, 12, 114,
+ 109, 63, 43, 229, 232, 109, 148, 176, 159, 128, 14, 11, 59, 252, 140, 234, 240, 121, 52, 126, 228, 25, 70, 67,
+ 150, 184, 241, 142, 245, 13, 130, 247, 169, 168, 208, 33, 229, 71, 99, 142, 119, 248, 48, 158, 4, 62, 244, 68,
+ 65, 181, 208, 159, 120, 234, 188, 71, 161, 157, 75, 14, 5, 182, 180, 176, 83, 242, 157, 110, 11, 74, 10, 87,
+ 159, 43, 73, 212, 16, 45, 157, 136, 10, 20, 222, 83, 212, 11, 191, 142, 254, 255, 22, 158, 246, 160, 212, 168,
+ 121, 131, 51, 138, 183, 104, 35, 161, 7, 118, 236, 22, 117, 233, 242, 196, 214, 130, 97, 158, 22, 152, 149, 34,
+ 20, 98, 76, 110, 216, 150, 223, 66, 200, 139, 16, 207, 203, 168, 182, 168, 102, 48, 76, 73, 85, 96, 68, 163,
+ 178, 129, 107, 79, 11, 53, 96, 191, 230, 195, 202, 187, 31, 103, 163, 35, 153, 109, 23, 226, 235, 244, 169, 243,
+ 15, 11, 208, 8, 86, 93, 123, 65, 131, 104, 229, 7, 231, 126, 34, 218, 177, 196, 232, 112, 212, 238, 16, 250,
+ 89, 185, 80, 44, 105, 151, 15, 227, 71, 139, 254, 96, 41, 16, 137, 71, 221, 110, 117, 110, 104, 159, 72, 30,
+ 240, 241, 5, 48, 100, 62, 46, 94, 85, 104, 251, 237, 112, 71, 186, 22, 218, 3, 43, 93, 62, 144, 60, 144,
+ 109, 129, 113, 192, 51, 110, 145, 114, 38, 7, 132, 96, 221, 39, 10, 126, 29, 116, 133, 72, 31, 72, 170, 189,
+ 81, 175, 13, 50, 229, 227, 19, 139, 235, 7, 27, 46, 31, 204, 42, 151, 211, 227, 187, 117, 49, 191, 195, 182,
+ 142, 100, 255, 239, 121, 24, 96, 228, 10, 162, 111, 141, 218, 238, 122, 227, 218, 90, 69, 141, 182, 177, 179, 181,
+ 221, 160, 158, 249, 85, 156, 218, 70, 172, 13, 234, 179, 125, 241, 217, 246, 28, 87, 127, 231, 221, 252, 61, 60,
+ 27, 98, 123, 202, 85, 109, 2, 3, 3, 11, 211, 16, 182, 192, 18, 214, 108, 6, 61, 163, 22, 126, 234, 240,
+ 187, 19, 39, 213, 206, 160, 246, 158, 229, 67, 27, 57, 76, 151, 203, 142, 160, 124, 127, 249, 225, 172, 29, 81,
+ 149, 254, 48, 67, 185, 141, 28, 91, 251, 232, 48, 232, 103, 41, 165, 236, 59, 218, 246, 98, 230, 64, 29, 71,
+ 1, 135, 197, 156, 8, 194, 225, 186, 95, 23, 234, 126, 205, 3, 37, 2, 11, 158, 80, 75, 52, 219, 243, 161,
+ 237, 134, 72, 225, 2, 200, 130, 249, 205, 170, 21, 97, 201, 83, 157, 123, 73, 142, 32, 55, 128, 168, 97, 116,
+ 213, 27, 73, 41, 227, 191, 155, 158, 26, 77, 44, 53, 255, 9, 93, 168, 253, 22, 74, 214, 101, 38, 251, 72,
+ 52, 123, 211, 201, 29, 197, 166, 183, 79, 4, 61, 63, 127, 114, 238, 125, 11, 110, 244, 234, 11, 60, 81, 213,
+ 2, 81, 118, 252, 91, 72, 12, 23, 167, 62, 251, 113, 232, 252, 181, 161, 72, 197, 14, 179, 235, 224, 121, 141,
+ 50, 132, 193, 130, 55, 210, 170, 185, 185, 155, 244, 39, 15, 35, 226, 135, 182, 91, 188, 208, 243, 25, 217, 2,
+ 140, 137, 143, 26, 11, 119, 77, 93, 56, 55, 119, 247, 179, 118, 162, 185, 221, 108, 138, 33, 90, 168, 238, 13,
+ 93, 244, 134, 234, 86, 166, 169, 162, 8, 0, 44, 203, 195, 187, 8, 46, 0, 28, 34, 162, 157, 1, 84, 103,
+ 121, 126, 69, 6, 18, 137, 9, 94, 184, 254, 48, 232, 149, 26, 241, 166, 100, 97, 0, 98, 44, 10, 88, 32,
+ 34, 203, 143, 251, 221, 114, 192, 170, 245, 91, 181, 247, 22, 50, 0, 213, 174, 44, 3, 71, 244, 84, 142, 202,
+ 248, 121, 136, 200, 26, 152, 4,
};
diff --git a/games/cookieclicker/src/icon.png b/games/cookieclicker/src/icon.png
index ddcb7bd3..18701cbf 100644
Binary files a/games/cookieclicker/src/icon.png and b/games/cookieclicker/src/icon.png differ
diff --git a/games/cookieclicker/src/main.c b/games/cookieclicker/src/main.c
index d78fcf19..eb602eea 100644
--- a/games/cookieclicker/src/main.c
+++ b/games/cookieclicker/src/main.c
@@ -4,9 +4,8 @@
* and catch the golden cookies. The numbers are the game's own (version 2.05): its 20 buildings
* with their prices and cookies per second, each one 15% dearer than the last, the tiered
* upgrades that double a building, the cursor's thousand fingers, the mice, flavored cookies,
- * grandma types, kittens that turn milk (achievements) into cookies, golden cookies with Frenzy,
- * Lucky and Click frenzy, and ascension, which trades the bakery for prestige levels: +1%
- * cookies per second each.
+ * kittens that turn milk (achievements) into cookies, and golden cookies with Frenzy, Lucky and
+ * Click frenzy.
*
* The bank is counted in doubles, as the game does; prices and rates in floats, whose 7 digits
* are more than the game shows (1.234 million). Inside NumPlay it draws with the launcher's
@@ -109,7 +108,7 @@ static float powi(float x, int n) {
}
static float p10(int e) { return e < 0 ? 1 / powi(10, -e) : powi(10, e); }
static float base_price(int b) { return bdata[b][0] * p10(bdata[b][1]); }
-static int many(void) { return sv.mode == 2 ? 100 : sv.mode * 9 + 1; }
+static int many(void) { return sv.mode == 2 ? 100 : sv.mode == 1 ? 10 : 1; }
/* the price of n more buildings b: 15% more for each one owned, rounded up */
static float price(int b, int n) {
float p = base_price(b) * powi(1.15f, sv.amount[b]);
@@ -138,7 +137,6 @@ static char *num(char *o, uint32_t v) { /* with commas: 1,234,567 */
/* 0.1 and 12.3 (a decimal when there is one, below 1,000), 123,456, then 1.234 million, 12.5 billion... */
static char *big(char *o, double v) {
int u = 0;
- if (!(v > 0)) v = 0;
if (v < 1e6) {
uint32_t t = (uint32_t)(v * 10 + .5);
if (v >= 1000 || t % 10 == 0) return num(o, v >= 1000 ? (uint32_t)v : t / 10);
@@ -256,8 +254,8 @@ static int ach_building(int a) { return a - A_BUILD < N_CURSOR_ACH ? 0 : a - A_B
static bool ach_won(int a) {
float v;
int k = threshold(a, &v);
- float have[7] = {0, raw_cps, 0, sv.amount[ach_building(a)], sv.golden, owned, nup};
- return k == 0 ? sv.earned >= v : k == 2 ? sv.handmade >= v : have[k] >= v;
+ return (k == 0 ? sv.earned : k == 2 ? sv.handmade : k == 1 ? raw_cps : k == 3 ? sv.amount[ach_building(a)]
+ : k == 4 ? (double)sv.golden : k == 5 ? owned : nup) >= v;
}
static void win(int a) {
if (has(sv.ach, a)) return;
@@ -266,12 +264,14 @@ static void win(int a) {
}
static void ach_desc(int a) { /* what it takes, in buf */
static const char *const pre[7] = {T("Bake "), T("Bake "), T("Make "), T("Have "), T("Click "), T("Own "), T("Purchase ")};
- static const char *const post[7] = {T(" cookies in one ascension."), T(" cookies per second."),
+ static const char *const post[7] = {T(" cookies."), T(" cookies per second."),
T(" cookies from clicking."), " x ", T(" golden cookies."), T(" buildings."),
T(" upgrades.")};
float v;
int k = threshold(a, &v);
cpy(cat(buf, pre[k], v, post[k]), k == 3 ? bname[ach_building(a)] : "");
+ if (v == 1) /* 1 cookie, 1 golden cookie: the plural s goes (none of the verbs ends in one) */
+ for (char *s = buf, *d = buf; (*d = *s); s++) d += !(*s == 's' && (s[1] == ' ' || s[1] == '.'));
}
static void check(void) { /* once a second, and after a purchase: what unlocks, what is won */
@@ -313,11 +313,10 @@ static void buy(void) {
Click frenzy */
static int luck(void) { return has(sv.up, U_GOLD) + has(sv.up, U_GOLD + 1); }
static void golden_pop(void) {
- uint32_t dur = has(sv.up, U_GOLD + 2) + 1, e = rnd() % 20;
- sv.golden++, sv.gc_t = 0;
- gc_life = 0;
- if (e < 2) sv.cfrenzy = 13000 * dur;
- else if (e < 11) sv.frenzy = 77000 * dur;
+ uint32_t dur = has(sv.up, U_GOLD + 2) + 1, e = rnd() % 30;
+ sv.golden++, gc_life = 0;
+ if (e == 0) sv.cfrenzy = 13000 * dur;
+ else if (e < 16) sv.frenzy = 77000 * dur;
else {
double v = sv.cookies * 0.15 < cps * 900.0 ? sv.cookies * 0.15 : cps * 900.0;
earn(v + 13);
@@ -354,7 +353,7 @@ static void left(void) {
uint32_t b = now - bounce_t; /* a little smaller for a moment when clicked */
cookie(CX, CY, b < 240 ? 48 + (int)b / 60 : 52, false);
/* the milk, which rises with the achievements and changes flavor every 25 */
- int h = 10 + (int)((milk > 1 ? 1 : milk) * 20), rank = nach / 25 < N_MILK ? nach / 25 : N_MILK - 1;
+ int h = 10 + (int)((milk > 1 ? 1 : milk) * 20), rank = nach / 25; /* (59 achievements: 3 milks) */
for (int x = 0; x < LW; x++) {
int w = (int)(now / 40 + x) % 48;
gfx_fill(x, SCREEN_H - h + (w < 24 ? w : 48 - w) / 6, 1, h + 8, gfx_rgb(milk_rgb[rank]));
@@ -365,7 +364,6 @@ static void left(void) {
big(buf, sv.cookies < 1e6 ? (double)(uint32_t)sv.cookies : sv.cookies); /* (whole cookies) */
for (char *s = buf; *s && !name; s++)
if (*s == ' ') *s = 0, name = s + 1;
- mid(&np_font_title, CX + 1, 41, buf, 0);
mid(&np_font_title, CX, 40, buf, WHITE);
cpy(name ? cpy(cpy(line2, name), " ") : line2, T("cookies"));
mid(&np_font_body, CX, 54, line2, WHITE);
@@ -478,7 +476,7 @@ static void store(void) {
/* ------------------------------------------------------------ the news, and the menus */
static void next_news(void) { /* how far the bakery's fame has gone: the digits of a tenth of all it baked */
int l = 0;
- for (double e = sv.earned / 10; e >= 1 && l < N_LORE - 1; e /= 10) l++;
+ while (l < N_LORE - 1 && sv.earned >= 10 * p10(l)) l++;
news_n = (uint32_t)(X_NEWS + l);
news_x = SCREEN_W, news_w = gfx_text_width(&np_font_small, txt(news_n));
}
@@ -526,14 +524,11 @@ static void scene(void *ctx) {
static void load(void) {
uint32_t len = 0;
const uint8_t *d = np_file_read(SAVE_NAME, &len);
- uint8_t *v = (uint8_t *)&sv;
- bool ok = d && len == sizeof sv && d[0] == 'C' && d[1] == 1;
- for (uint32_t i = 0; i < sizeof sv; i++) v[i] = ok ? d[i] : 0;
+ if (d && len == sizeof sv && d[0] == 'C' && d[1] == 1) /* (or a new bakery: sv starts as zeros) */
+ for (uint32_t i = 0; i < sizeof sv; i++) ((uint8_t *)&sv)[i] = d[i];
/* whatever it holds, a bakery this game could have saved */
- double *dv[3] = {&sv.cookies, &sv.earned, &sv.handmade};
- for (int i = 0; i < 3; i++)
- if (!(*dv[i] >= 0 && *dv[i] < 1e300)) *dv[i] = 0;
- if (sv.mode > 2) sv.mode = 0;
+ for (double *v = &sv.cookies; v <= &sv.handmade; v++)
+ if (!(*v >= 0 && *v < 1e300)) *v = 0;
}
static void move(int d) {
int n = rows(), shown = tab == 2 ? 12 : 6, *s = &sel[tab], *t = &top[tab];
@@ -557,8 +552,7 @@ int main(void) {
color_t *their_strip = gfx_buf;
gfx_buf = ram.strip;
now = (uint32_t)eadk_timing_millis();
- seed = eadk_random() ^ now;
- if (!seed) seed = 1;
+ seed = eadk_random() | 1;
load();
sort_list();
check();
@@ -603,7 +597,7 @@ int main(void) {
uint32_t lo = 300000u >> luck();
float f = (float)(sv.gc_t - lo) / (float)(2 * lo);
if (f > 1 || (float)(rnd() & 0xFFFF) < f * f * f * f * f * 65536)
- gc_dur = gc_life = 13000u << luck(), gc_x = 20 + (int)(rnd() % (LW - 40)), gc_y = 84 + (int)(rnd() % 100);
+ sv.gc_t = 0, gc_dur = gc_life = 13000u << luck(), gc_x = 20 + (int)(rnd() % (LW - 40)), gc_y = 84 + (int)(rnd() % 100);
}
if (now - second >= 1000) second = now, check();
if (now - saved >= 10000) saved = now, save();
diff --git a/games/cookieclicker/tools/data.py b/games/cookieclicker/tools/data.py
index 4569f2ef..ff4c4ba5 100644
--- a/games/cookieclicker/tools/data.py
+++ b/games/cookieclicker/tools/data.py
@@ -525,8 +525,8 @@ def icon_bytes(art):
# How much of the game fits in NumPlay (13 KB): the upgrades, achievements and news that come first, so
# far that milk (an achievement is 4%) takes the kittens to the engineers
-N = dict(cursor=8, mouse=6, kitten=3, cookie=9, bank=13, cps=10, click=6, cursor_ach=3, golden=4, owned=2,
- upgraded=2, milk=3, lore=10)
+N = dict(cursor=8, mouse=6, kitten=3, cookie=8, bank=13, cps=10, click=6, cursor_ach=3, golden=4, owned=2,
+ upgraded=2, milk=3, lore=9)
MISC_KEPT = []
@@ -552,7 +552,7 @@ def main():
text += bytes(data) # the pictures, packed with them
z = zopfli.zlib.compress(text, numiterations=100)[2:-4]
raw = len(text)
- L = ["/* Generated by tools/data.py: Cookie Clicker's names, news and the store's pictures. */",
+ L = ["/* Made by tools/data.py: Cookie Clicker's names, news and the store's pictures. */",
"#define TIER_N %d" % TIER_N, "#define ACH_TIERS %d" % ACH_TIERS,
"/* the upgrades, in the order of the save */",
"#define N_CURSOR %d" % N["cursor"], "#define U_MOUSE N_CURSOR", "#define N_MOUSE %d" % N["mouse"],
diff --git a/games/games.json b/games/games.json
index 44ed1b26..582b8a97 100644
--- a/games/games.json
+++ b/games/games.json
@@ -388,7 +388,7 @@
"top": "0x2E5480",
"bottom": "0x14263F",
"accent": "0xD9A25E",
- "colors": 8,
+ "colors": 6,
"records": [
"cookieclicker.sav"
],