Просмотр исходного кода

Merge pull request #1 from RogueMaster/main

More Figure IDs & Info shows Figure ID
Eric Betts 8 месяцев назад
Родитель
Сommit
8add90da5d
8 измененных файлов с 561 добавлено и 18 удалено
  1. 6 0
      .catalog/changelog.md
  2. 10 13
      application.fam
  3. 531 1
      assets/figure_ids.nfc
  4. BIN
      images/Nfc_10px.png
  5. 1 0
      scenes/weebo_scene_info.c
  6. 11 4
      weebo.c
  7. 2 0
      weebo.h
  8. BIN
      weebo.png

+ 6 - 0
.catalog/changelog.md

@@ -1,2 +1,8 @@
+## 0.2
+ - Info shows the ID of the figure
+ - More IDs added for Smash characters and many older figures
+ - Image assets fixed using fbt format_img
+ - FAM file expanded to include app creator / source information
+
 ## 0.1
  - Initial release

+ 10 - 13
application.fam

@@ -1,24 +1,21 @@
-# For details & more options, see documentation/AppManifests.md in firmware repo
-
 App(
-    appid="weebo",  # Must be unique
-    name="Weebo",  # Displayed in menus
+    appid="weebo",
+    name="Weebo",
     apptype=FlipperAppType.EXTERNAL,
     entry_point="weebo_app",
     stack_size=5 * 1024,
-    fap_category="NFC",
-    # Optional values
-    fap_version="0.1",
-    fap_icon="weebo.png",  # 10x10 1-bit PNG
-    fap_description="A maker",
-    fap_author="bettse",
-    fap_weburl="https://github.com/bettse/weebo",
-    fap_icon_assets="images",  # Image assets to compile for this application
+    fap_icon="weebo.png",
+    fap_icon_assets="images",
+    fap_file_assets="assets",
     fap_libs=["mbedtls"],
     fap_private_libs=[
         Lib(
             name="amiitool",
         ),
     ],
-    fap_file_assets="assets",
+    fap_category="NFC",
+    fap_author="bettse",
+    fap_weburl="https://github.com/bettse/weebo",
+    fap_version="0.2",
+    fap_description="An NTAG215 parser, writer, emulator, remixer, duplicator",
 )

+ 531 - 1
assets/figure_ids.nfc

@@ -5,8 +5,538 @@ Version: 1
 0001: Luigi
 0002: Peach
 0003: Yoshi
+0004: Rosalina and Luma
 0005: Bowser
-0007: Wario
 0006: Bowser Jr.
+0007: Wario
 0008: Donkey Kong
 0009: Diddy Kong
+000a: Toad
+0013: Daisy
+0014: Waluigi
+0017: Boo
+0024: Piranha Plant
+0080: Poochy
+0100: Link
+0101: Zelda
+0102: Ganondorf
+0103: Midna & Wolf Link
+0106: Urbosa
+0107: Mipha
+0108: Revali
+0140: Guardian
+0141: Bokoblin
+0180: Villager
+0181: Isabelle
+0182: K.K. Slider
+0183: Tom Nook
+0184: Timmy & Tommy
+0185: Timmy
+0186: Tommy
+0187: Sable
+0188: Mabel
+0189: Labelle
+018a: Reese
+018b: Cyrus
+018c: Digby
+018d: Rover
+018e: Resetti
+018f: Don Resetti
+0190: Brewster
+0191: Harriet
+0192: Blathers
+0193: Celeste
+0194: Kicks
+0195: Porter
+0196: Kapp'n
+0197: Leilani
+0198: Lelia
+0199: Grams
+019a: Chip
+019b: Nat
+019c: Phineas
+019d: Copper
+019e: Booker
+019f: Pete
+01a0: Pelly
+01a1: Phyllis
+01a2: Gulliver
+01a3: Joan
+01a4: Pascal
+01a5: Katarina
+01a6: Sahara
+01a7: Wendell
+01a8: Redd
+01a9: Gracie
+01aa: Lyle
+01ab: Pave
+01ac: Zipper
+01ad: Jack
+01ae: Franklin
+01af: Jingle
+01b0: Tortimer
+01b1: Dr. Shrunk
+01b3: Blanca
+01b4: Leif
+01b5: Luna
+01b6: Katie
+01c1: Lottie
+0200: Cyrano
+0201: Antonio
+0202: Pango
+0203: Anabelle
+0206: Snooty
+0208: Annalisa
+0209: Olaf
+0214: Teddy
+0215: Pinky
+0216: Curt
+0217: Chow
+0219: Nate
+021a: Groucho
+021b: Tutu
+021c: Ursala
+021d: Grizzly
+021e: Paula
+021f: Ike
+0220: Charlise
+0221: Beardo
+0222: Klaus
+022d: Jay
+022e: Robin
+022f: Anchovy
+0230: Twiggy
+0231: Jitters
+0232: Piper
+0233: Admiral
+0235: Midge
+0238: Jakey
+023c: Lucha
+023d: Jacques
+023e: Peck
+023f: Sparro
+024a: Angus
+024b: Rodeo
+024d: Stu
+024f: T-Bone
+0251: Coach
+0252: Vic
+025d: Bob
+025e: Mitzi
+025f: Rosie
+0260: Olivia
+0261: Kiki
+0262: Tangy
+0263: Punchy
+0264: Purrl
+0265: Moe
+0266: Kabuki
+0267: Kid Cat
+0268: Monique
+0269: Tabby
+026a: Stinky
+026b: Kitty
+026c: Tom
+026d: Merry
+026e: Felicity
+026f: Lolly
+0270: Ankha
+0271: Rudy
+0272: Katt
+027d: Bluebear
+027e: Maple
+027f: Poncho
+0280: Pudge
+0281: Kody
+0282: Stitches
+0283: Vladimir
+0284: Murphy
+0286: Olive
+0287: Cheri
+028a: June
+028b: Pekoe
+028c: Chester
+028d: Barold
+028e: Tammy
+028f: Marty
+0299: Goose
+029a: Benedict
+029b: Egbert
+029e: Ava
+02a2: Becky
+02a3: Plucky
+02a4: Knox
+02a5: Broffina
+02a6: Ken
+02b1: Patty
+02b2: Tipper
+02b7: Norma
+02b8: Naomi
+02c3: Alfonso
+02c4: Alli
+02c5: Boots
+02c7: Del
+02c9: Sly
+02ca: Gayle
+02cb: Drago
+02d6: Fauna
+02d7: Bam
+02d8: Zell
+02d9: Bruce
+02da: Deirdre
+02db: Lopez
+02dc: Fuchsia
+02dd: Beau
+02de: Diana
+02df: Erik
+02e0: Chelsea
+02ea: Goldie
+02eb: Butch
+02ec: Lucky
+02ed: Biskit
+02ee: Bones
+02ef: Portia
+02f0: Walker
+02f1: Daisy
+02f2: Cookie
+02f3: Maddie
+02f4: Bea
+02f8: Mac
+02f9: Marcel
+02fa: Benjamin
+02fb: Cherry
+02fc: Shep
+0307: Bill
+0308: Joey
+0309: Pate
+030a: Maelle
+030b: Deena
+030c: Pompom
+030d: Mallary
+030e: Freckles
+030f: Derwin
+0310: Drake
+0311: Scoot
+0312: Weber
+0313: Miranda
+0314: Ketchup
+0316: Gloria
+0317: Molly
+0318: Quillson
+0323: Opal
+0324: Dizzy
+0325: Big Top
+0326: Eloise
+0327: Margie
+0328: Paolo
+0329: Axel
+032a: Ellie
+032c: Tucker
+032d: Tia
+032e: Chai
+0338: Lily
+0339: Ribbot
+033a: Frobert
+033b: Camofrog
+033c: Drift
+033d: Wart Jr.
+033e: Puddles
+033f: Jeremiah
+0341: Tad
+0342: Cousteau
+0343: Huck
+0344: Prince
+0345: Jambette
+0347: Raddle
+0348: Gigi
+0349: Croque
+034a: Diva
+034b: Henry
+0356: Chevre
+0357: Nan
+0358: Billy
+035a: Gruff
+035c: Velma
+035d: Kidd
+035e: Pashmina
+0369: Cesar
+036a: Peewee
+036b: Boone
+036d: Louie
+036e: Boyd
+0370: Violet
+0371: Al
+0372: Rocket
+0373: Hans
+0374: Rilla
+037e: Hamlet
+037f: Apple
+0380: Graham
+0381: Rodney
+0382: Soleil
+0383: Clay
+0384: Flurry
+0385: Hamphrey
+0390: Rocco
+0392: Bubbles
+0393: Bertha
+0394: Biff
+0395: Bitty
+0398: Harry
+0399: Hippeux
+03a4: Buck
+03a5: Victoria
+03a6: Savannah
+03a7: Elmer
+03a8: Rosco
+03a9: Winnie
+03aa: Ed
+03ab: Cleo
+03ac: Peaches
+03ad: Annalise
+03ae: Clyde
+03af: Colton
+03b0: Papi
+03b1: Julian
+03bc: Yuka
+03bd: Alice
+03be: Melba
+03bf: Sydney
+03c0: Gonzo
+03c1: Ozzie
+03c4: Canberra
+03c5: Lyman
+03c6: Eugene
+03d1: Kitt
+03d2: Mathilda
+03d3: Carrie
+03d6: Astrid
+03d7: Sylvia
+03d9: Walt
+03da: Rooney
+03db: Marcie
+03e6: Bud
+03e7: Elvis
+03e8: Rex
+03ea: Leopold
+03ec: Mott
+03ed: Rory
+03ee: Lionel
+03fa: Nana
+03fb: Simon
+03fc: Tammi
+03fd: Monty
+03fe: Elise
+03ff: Flip
+0400: Shari
+0401: Deli
+040c: Dora
+040d: Limberg
+040e: Bella
+040f: Bree
+0410: Samson
+0411: Rod
+0414: Candi
+0415: Rizzo
+0416: Anicotti
+0418: Broccolo
+041a: Moose
+041b: Bettina
+041c: Greta
+041d: Penelope
+041e: Chadder
+0429: Octavian
+042a: Marina
+042b: Zucker
+0436: Queenie
+0437: Gladys
+0438: Sandy
+0439: Sprocket
+043b: Julia
+043c: Cranston
+043d: Phil
+043e: Blanche
+043f: Flora
+0440: Phoebe
+044b: Apollo
+044c: Amelia
+044d: Pierce
+044e: Buzz
+0450: Avery
+0451: Frank
+0452: Sterling
+0453: Keaton
+0454: Celia
+045f: Aurora
+0460: Roald
+0461: Cube
+0462: Hopper
+0463: Friga
+0464: Gwen
+0465: Puck
+0468: Wade
+0469: Boomer
+046a: Iggly
+046b: Tex
+046c: Flo
+046d: Sprinkle
+0478: Curly
+0479: Truffles
+047a: Rasher
+047b: Hugh
+047c: Lucy
+047d: Spork/Crackle
+0480: Cobb
+0481: Boris
+0482: Maggie
+0483: Peggy
+0485: Gala
+0486: Chops
+0487: Kevin
+0488: Pancetti
+0489: Agnes
+0494: Bunnie
+0495: Dotty
+0496: Coco
+0497: Snake
+0498: Gaston
+0499: Gabi
+049a: Pippy
+049b: Tiffany
+049c: Genji
+049d: Ruby
+049e: Doc
+049f: Claude
+04a0: Francine
+04a1: Chrissy
+04a2: Hopkins
+04a3: OHare
+04a4: Carmen
+04a5: Bonbon
+04a6: Cole
+04a7: Mira
+04a8: Toby
+04b2: Tank
+04b3: Rhonda
+04b4: Spike
+04b6: Hornsby
+04b9: Merengue
+04ba: Renée
+04c5: Vesta
+04c6: Baabara
+04c7: Eunice
+04c8: Stella
+04c9: Cashmere
+04cc: Willow
+04cd: Curlos
+04ce: Wendy
+04cf: Timbra
+04d0: Frita
+04d1: Muffy
+04d2: Pietro
+04d3: Etoile
+04dd: Peanut
+04de: Blaire
+04df: Filbert
+04e0: Pecan
+04e1: Nibbles
+04e2: Agent S
+04e3: Caroline
+04e4: Sally
+04e5: Static
+04e6: Mint
+04e7: Ricky
+04e8: Cally
+04ea: Tasha
+04eb: Sylvana
+04ec: Poppy
+04ed: Sheldon
+04ee: Marshal
+04ef: Hazel
+04fa: Rolf
+04fb: Rowan
+04fc: Tybalt
+04fd: Bangle
+04fe: Leonardo
+04ff: Claudia
+0500: Bianca
+050b: Chief
+050c: Lobo
+050d: Wolfgang
+050e: Whitney
+050f: Dobie
+0510: Freya
+0511: Fang
+0513: Vivian
+0514: Skye
+0515: Kyle
+0580: Fox
+0581: Falco
+0584: Wolf
+05c0: Samus
+05c2: Ridley
+0600: Captain Falcon
+0640: Olimar
+06c0: Little Mac
+0700: Wii Fit Trainer
+0740: Pit
+0741: Dark Pit
+0742: Palutena
+0780: Mr. G&W
+0781: R.O.B., Famicom
+0782: Duck Hunt
+07c0: Mii Figure
+0800: Inkling
+0801: Callie
+0802: Marie
+0a40: Min Min
+1906: Charizard
+1919: Pikachu
+1927: Jigglypuff
+1996: Mewtwo
+19ac: Pichu
+1ac0: Lucario
+1b92: Greninja
+1bd7: Incineroar
+1d00: Shadow Mewtwo
+1f00: Kirby
+1f01: Meta Knight
+1f02: King Dedede
+1f03: Waddle Dee
+2100: Marth
+2101: Ike
+2102: Lucina
+2103: Robin
+2104: Roy
+2105: Corrin
+2108: Chrom
+210b: Byleth
+2240: Shulk
+2242: Mythra
+2280: Ness
+2281: Lucas
+22c0: Chibi Robo
+3200: Sonic
+3240: Bayonetta
+3340: Pac-man
+33c0: Kazuya
+3480: Megaman
+34c0: Ryu
+34c1: Ken
+3500: Male Hunter
+3501: Nabiru
+3502: Rathian/Cheval
+3503: Barioth/Ayuria
+3504: Qurupeco/Dan
+35c0: Shovel Knight
+3600: Cloud Strife
+3601: Sephiroth
+3640: Hero
+37c1: Richter
+3840: Cloud Strife
+3980: Bayonetta
+3a00: Joker
+3b40: Banjo Kazooie
+3c80: Terry
+3dc0: Steve
+3dc1: Alex

BIN
images/Nfc_10px.png


+ 1 - 0
scenes/weebo_scene_info.c

@@ -17,6 +17,7 @@ void weebo_scene_info_on_enter(void* context) {
         furi_string_cat_printf(str, "Unknown\n");
     }
     furi_string_free(name);
+    furi_string_cat_printf(str, "ID: %04x\n", weebo_get_figure_id(weebo));
 
     text_box_set_font(weebo->text_box, TextBoxFontText);
     text_box_set_text(weebo->text_box, furi_string_get_cstr(weebo->text_box_store));

+ 11 - 4
weebo.c

@@ -139,13 +139,18 @@ static bool
     return parsed;
 }
 
-bool weebo_get_figure_name(Weebo* weebo, FuriString* name) {
-    bool parsed = false;
-
+uint16_t weebo_get_figure_id(Weebo* weebo) {
     uint16_t id = 0;
     id |= weebo->figure[UNPACKED_FIGURE_ID + 0] << 8;
     id |= weebo->figure[UNPACKED_FIGURE_ID + 1] << 0;
     FURI_LOG_D(TAG, "id = %04x", id);
+    return id;
+}
+
+bool weebo_get_figure_name(Weebo* weebo, FuriString* name) {
+    bool parsed = false;
+
+    uint16_t id = weebo_get_figure_id(weebo);
 
     FuriString* key = furi_string_alloc_printf("%04x", id);
     if(weebo_search_data(weebo->storage, FIGURE_ID_LIST, key, name)) {
@@ -168,7 +173,9 @@ bool weebo_file_select(Weebo* weebo) {
 
     FuriString* weebo_app_folder;
 
-    if(storage_dir_exists(weebo->storage, "/ext/nfc/Amiibo")) {
+    if(storage_dir_exists(weebo->storage, "/ext/nfc/SmashAmiibo")) {
+        weebo_app_folder = furi_string_alloc_set("/ext/nfc/SmashAmiibo");
+    } else if(storage_dir_exists(weebo->storage, "/ext/nfc/Amiibo")) {
         weebo_app_folder = furi_string_alloc_set("/ext/nfc/Amiibo");
     } else if(storage_dir_exists(weebo->storage, "/ext/nfc/Amiibos")) {
         weebo_app_folder = furi_string_alloc_set("/ext/nfc/Amiibos");

+ 2 - 0
weebo.h

@@ -2,4 +2,6 @@
 
 typedef struct Weebo Weebo;
 
+uint16_t weebo_get_figure_id(Weebo* weebo);
+
 bool weebo_get_figure_name(Weebo* weebo, FuriString* name);