[FL-2183] [FL-2209] Dolphin Deeds, Level up, assets generation, refactoring (#965)
* Desktop: cleanup headers * Get loader pubsub via record * [FL-2183] Dolphin refactoring 2022.01 * Restruct animations assets structure * Rename assets * Cleanup headers * Update Recording animation * Add BadBattery animation * Provide loader's pubsub via record * Fix load/unload animations * Scripts: add flipper format support, initial dolphin packager rework. Assets: internal and external dolphin. * Sync internal meta.txt and manifest.txt * Reorder, rename dolphin assets * Split essential generated assets * Add ReadMe for dolphin assets * Separate essential blocking animations * Scripts: full dolphin validation before packaging * Assets, Scripts: dolphin external resources packer * Github: update codeowners * Scripts: proper slots handling in dolphin animation meta * Scripts: correct frames enumeration and fix compiled assets. * [FL-2209] Add Dolphin Deeds points and many more * Remove excess frame_rate * Change dolphin assets directory * Scripts: add internal resource support to dolphin compiler * Scripts: add internal assets generation, renaming * Scripts: correct assert, renaming * Code cleanup, documentation, fixes * Update Levelup animations * Rename essential -> blocking * Fix Unlocked hint * Scripts: rewrite Templite compiller, replace regexps with token parser, split block types into code and variable blocks. Update dolphin templates. * Documentation: add key combos description and use information * Scripts: cleanup templit, more debug info and add dev comment Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_MF_UL_DATA_NOT_CHANGED (0UL)
|
||||
#define NFC_MF_UL_DATA_CHANGED (1UL)
|
||||
@@ -11,6 +12,7 @@ void nfc_emulate_mifare_ul_worker_callback(void* context) {
|
||||
|
||||
void nfc_scene_emulate_mifare_ul_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcEmulate);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
void nfc_scene_emulate_uid_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcEmulate);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_READ_CARD_CUSTOM_EVENT (10UL)
|
||||
|
||||
@@ -9,6 +10,7 @@ void nfc_read_card_worker_callback(void* context) {
|
||||
|
||||
void nfc_scene_read_card_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcRead);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
void nfc_scene_read_card_success_widget_callback(
|
||||
GuiButtonType result,
|
||||
@@ -17,6 +18,7 @@ void nfc_scene_read_card_success_on_enter(void* context) {
|
||||
string_t uid_str;
|
||||
string_init(data_str);
|
||||
string_init(uid_str);
|
||||
DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
|
||||
|
||||
// Send notification
|
||||
notification_message(nfc->notifications, &sequence_success);
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_READ_EMV_APP_CUSTOM_EVENT (10UL)
|
||||
|
||||
@@ -9,6 +10,7 @@ void nfc_read_emv_app_worker_callback(void* context) {
|
||||
|
||||
void nfc_scene_read_emv_app_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcRead);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "../nfc_i.h"
|
||||
#include "../helpers/nfc_emv_parser.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_SCENE_READ_SUCCESS_SHIFT " "
|
||||
|
||||
@@ -11,6 +12,7 @@ void nfc_scene_read_emv_app_success_dialog_callback(DialogExResult result, void*
|
||||
|
||||
void nfc_scene_read_emv_app_success_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
|
||||
|
||||
// Setup view
|
||||
NfcDeviceCommonData* nfc_data = &nfc->dev->dev_data.nfc_data;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_READ_EMV_DATA_CUSTOM_EVENT (10UL)
|
||||
|
||||
@@ -9,6 +10,7 @@ void nfc_read_emv_data_worker_callback(void* context) {
|
||||
|
||||
void nfc_scene_read_emv_data_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcRead);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "../nfc_i.h"
|
||||
#include "../helpers/nfc_emv_parser.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
void nfc_scene_read_emv_data_success_widget_callback(
|
||||
GuiButtonType result,
|
||||
@@ -15,6 +16,7 @@ void nfc_scene_read_emv_data_success_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
NfcEmvData* emv_data = &nfc->dev->dev_data.emv_data;
|
||||
NfcDeviceCommonData* nfc_data = &nfc->dev->dev_data.nfc_data;
|
||||
DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
|
||||
|
||||
// Setup Custom Widget view
|
||||
// Add frame
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_READ_MIFARE_UL_CUSTOM_EVENT (10UL)
|
||||
|
||||
@@ -9,6 +10,7 @@ void nfc_read_mifare_ul_worker_callback(void* context) {
|
||||
|
||||
void nfc_scene_read_mifare_ul_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcRead);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define NFC_SCENE_READ_SUCCESS_SHIFT " "
|
||||
#define NFC_SCENE_READ_MF_UL_CUSTOM_EVENT (0UL)
|
||||
@@ -22,6 +23,7 @@ void nfc_scene_read_mifare_ul_success_text_box_callback(void* context) {
|
||||
|
||||
void nfc_scene_read_mifare_ul_success_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
|
||||
|
||||
// Send notification
|
||||
notification_message(nfc->notifications, &sequence_success);
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define SCENE_SAVE_SUCCESS_CUSTOM_EVENT (0UL)
|
||||
|
||||
@@ -9,6 +10,7 @@ void nfc_scene_save_success_popup_callback(void* context) {
|
||||
|
||||
void nfc_scene_save_success_on_enter(void* context) {
|
||||
Nfc* nfc = (Nfc*)context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcSave);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#define SCENE_SET_UID_CUSTOM_EVENT (0UL)
|
||||
|
||||
@@ -30,6 +31,7 @@ bool nfc_scene_set_uid_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SCENE_SET_UID_CUSTOM_EVENT) {
|
||||
DOLPHIN_DEED(DolphinDeedNfcAdd);
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneSaveName);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user