Explorar o código

Merge pull request #9 from rdefeo/tilt_bug

fix: tilt bug fix, Endless table update
SDK 1.2
actions/upload-artifact v3 to v4
rdefeo hai 11 meses
pai
achega
26ed6d3b52
Modificáronse 6 ficheiros con 13 adicións e 8 borrados
  1. 1 1
      .github/workflows/build.yml
  2. 5 0
      CHANGELOG.md
  3. 1 1
      application.fam
  4. 4 4
      assets/tables/05_Endless.json
  5. 1 1
      pinball0.cxx
  6. 1 1
      pinball0.h

+ 1 - 1
.github/workflows/build.yml

@@ -34,7 +34,7 @@ jobs:
         with:
           sdk-channel: ${{ matrix.sdk-channel }}
       - name: Upload app artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           # See ufbt action docs for other output variables
           name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}

+ 5 - 0
CHANGELOG.md

@@ -1,3 +1,8 @@
+## 0.5.2
+
+- Prevent tilt before ball is in play
+- Fixed Endless table by making bottom portal extend full width
+
 ## 0.5.1
 
 - Stop scores when moving ball in debug mode

+ 1 - 1
application.fam

@@ -9,7 +9,7 @@ App(
     fap_category="Games",
     requires=["gui"],
     # Optional values
-    fap_version="0.5.1",
+    fap_version="0.5.2",
     fap_icon="pinball0.png",  # 10x10 1-bit PNG
     fap_description="Pinball game",
     fap_author="Roberto De Feo",

+ 4 - 4
assets/tables/05_Endless.json

@@ -66,18 +66,18 @@
         // left wall
         {
             "start": [ 0, 200 ],
-            "end": [ 0, 1160 ]
+            "end": [ 0, 1270 ]
         },
         // right wall
         {
-            "start": [ 630, 1160 ],
+            "start": [ 630, 1270 ],
             "end": [ 630, 200 ]
         }
     ],
     "portals": [
         {
-            "a_start": [ 200, 1270 ],
-            "a_end": [ 440, 1270 ],
+            "a_start": [ 0, 1270 ],
+            "a_end": [ 630, 1270 ],
             "b_start": [ 440, 0 ],
             "b_end": [ 200, 0 ]
         }

+ 1 - 1
pinball0.cxx

@@ -502,7 +502,7 @@ extern "C" int32_t pinball0_app(void* p) {
                             app.table->balls[0].prev_p.y -= MANUAL_ADJUSTMENT;
                             break;
                         }
-                        if(event.type == InputTypePress) {
+                        if(event.type == InputTypePress && app.table->balls_released) {
                             // Table bump and Tilt tracking
                             uint32_t current_tick = furi_get_tick();
                             if(current_tick - app.table->last_bump >= BUMP_COOLDOWN) {

+ 1 - 1
pinball0.h

@@ -21,7 +21,7 @@
 // #define DRAW_NORMALS
 
 #define TAG     "Pinball0"
-#define VERSION "v0.5.1"
+#define VERSION "v0.5.2"
 
 // Vertical orientation
 #define LCD_WIDTH  64