Build 29079818

This commit is contained in:
Renan LE CARO 2025-04-16 09:38:43 +02:00
parent 871a7f9c31
commit 277aa5682b
9 changed files with 53 additions and 18 deletions

View file

@ -29,6 +29,12 @@ languages, I may add features again.
## Done ## Done
- Imported levels : Mario, Minesweeper and Target
- Fixed an issue with localstorage saving of custom levels
## 29079805
- combo text on paddle will be grey if we're at the base combo - combo text on paddle will be grey if we're at the base combo
- transparency now rounds up - transparency now rounds up
- import level up to 21 x 21 - import level up to 21 x 21

View file

@ -29,8 +29,8 @@ android {
applicationId = "me.lecaro.breakout" applicationId = "me.lecaro.breakout"
minSdk = 21 minSdk = 21
targetSdk = 34 targetSdk = 34
versionCode = 29079805 versionCode = 29079818
versionName = "29079805" versionName = "29079818"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {
useSupportLibrary = true useSupportLibrary = true

File diff suppressed because one or more lines are too long

8
dist/index.html vendored

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
// The version of the cache. // The version of the cache.
const VERSION = "29079805"; const VERSION = "29079818";
// The name of the cache // The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`; const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1302,5 +1302,33 @@
"bricks": "___________Oyyyyyyy__Oyyyyyyy__Oyy__Oyy__Oyy_______Oyyyyyyy_______Oyy__Oyy__Oyy__Oyyyyyyy__Oyyyyyyy_", "bricks": "___________Oyyyyyyy__Oyyyyyyy__Oyy__Oyy__Oyy_______Oyyyyyyy_______Oyy__Oyy__Oyy__Oyyyyyyy__Oyyyyyyy_",
"name": "S", "name": "S",
"credit": "" "credit": ""
},
{
"color": "",
"size": 11,
"bricks": "____________S_vvv_SSS__S___v___S__SSS_vvv_S__________S__S_vvv_SSS__S___v______SSS_vvv_S____S_____S__v_SSS_SSS____________",
"name": "Abstract 15",
"credit": "Just random strokes"
},
{
"color": "",
"size": 11,
"bricks": "________________________RRRRR_____RRRRRRRRR__kkkOOkO___kOkOOOkOOO_kOkkOOOkOOOkkOOOOkkkk___OOOOOOO________________________",
"name": "Mario!",
"credit": "Suggested by Nicolas03. A Mario level ! Sprite taken from https://art.pixilart.com/sr2d5c0683c82aws3.png . The sprite belongs to Nintendo"
},
{
"color": "",
"size": 16,
"bricks": "___llltCCttBC______lllCBBttCB______ltttBttltt______ltBrBClttt______lttCCCttBt______llttCBtttt______ltCBCttlll______ltBCCtCtCt______lttCCBCBrB______llltBCCtrB______ttttttlltt______CBrttlllll______CBrBCttttl______ttCCBttBtl______tttCCCtCCt______tBttBtltBt___",
"name": "Minesweeper",
"credit": "Suggested by Noodlemire.For once, you'll want to trigger as many mines as possible."
},
{
"color": "",
"size": 19,
"bricks": "__________________________________________________________________________________________________________________________WWW_______________WrrrW_____________WrWWWrW____________WrWBWrW____________WrWWWrW_____________WrrrW_______________WWW__________________________________________________________________________________________________________________________",
"name": "Target",
"credit": "Suggested by Noodlemire. Unusually small level, with lots of room to miss your shots. Acts as decent aim practice."
} }
] ]

View file

@ -1 +1 @@
"29079805" "29079818"

View file

@ -1,6 +1,11 @@
import { icons, transformRawLevel } from "./loadGameData"; import { icons, transformRawLevel } from "./loadGameData";
import { t } from "./i18n/i18n"; import { t } from "./i18n/i18n";
import { getSettingValue, getTotalScore, setSettingValue } from "./settings"; import {
commitSettingsChangesToLocalStorage,
getSettingValue,
getTotalScore,
setSettingValue,
} from "./settings";
import { asyncAlert } from "./asyncAlert"; import { asyncAlert } from "./asyncAlert";
import { Palette, RawLevel } from "./types"; import { Palette, RawLevel } from "./types";
import { levelIconHTML } from "./levelIcon"; import { levelIconHTML } from "./levelIcon";

View file

@ -21,11 +21,9 @@ export function getSettingValue<T>(key: string, defaultValue: T) {
// We avoid using localstorage synchronously for perf reasons // We avoid using localstorage synchronously for perf reasons
let needsSaving: Set<string> = new Set(); let needsSaving: Set<string> = new Set();
export function setSettingValue<T>(key: string, value: T) { export function setSettingValue<T>(key: string, value: T) {
if (cachedSettings[key] !== value) {
needsSaving.add(key); needsSaving.add(key);
cachedSettings[key] = value; cachedSettings[key] = value;
} }
}
export function commitSettingsChangesToLocalStorage() { export function commitSettingsChangesToLocalStorage() {
try { try {
for (let key of needsSaving) { for (let key of needsSaving) {
@ -36,7 +34,7 @@ export function commitSettingsChangesToLocalStorage() {
console.warn(e); console.warn(e);
} }
} }
setInterval(commitSettingsChangesToLocalStorage, 500); setInterval(() => commitSettingsChangesToLocalStorage(), 500);
export function getTotalScore() { export function getTotalScore() {
return getSettingValue("breakout_71_total_score", 0); return getSettingValue("breakout_71_total_score", 0);