Skip to content

Commit

Permalink
Merge branch 'dev' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Jul 24, 2023
2 parents ca47930 + a0f59f6 commit 3a676f7
Show file tree
Hide file tree
Showing 58 changed files with 702 additions and 372 deletions.
49 changes: 9 additions & 40 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,14 @@
## New changes
* !!! **Warning! After installing, Desktop settings (Favoutite apps, PIN Code, AutoLock time..) will be resetted to default due to settings changes, Please set your PIN code, Favourite apps again in Settings->Desktop** !!!
* This next text applies to you only **If you have copied any apps manually** into `apps` folder and don't know that you need to update those apps manually in same way you added them - remove `apps` folder or that specific apps you copied on your microSD before installing this release to avoid issues due to OFW API version update! **If you using regular builds or extra pack builds (e) without your manually added apps, all included apps will be installed automatically, no extra actions needed!**
-----
* Archive (FileBrowser): Added Cut/Copy/Paste & NewDir options in new menu (original feature made by (@Willy-JL | XFW) - and ported by @gid9798)
* Plugins: SubGHz Bruteforcer (3.7 update) - New extra settings menu (by @gid9798)
```
- Added the ability to change repeats
- Added the ability to change Te for protocols that use it
- The settings will be reset after returning to the main menu
```
* SubGHz Remote: Merged SubGHz Remote and Remote maker in one app, **use back button to access remote maker** (by @gid9798 | PR #545)
* SubGHz: Replace FM15k with AM_Q in default modulations
* SubGHz: Port latest OFW external radio driver, fix issues (now you can make drivers for other radio chips) (by @gid9798 | PR #539 #536 #535 #534)
* GUI module: SubMenu fix vertical orientation (by @gid9798 | PR #543)
* Apps: After merge fixes (by @gid9798 | PR #537)
* Docs: Update docs for debug build and update vscode example, please remove `debug_pack` target if you had it in your workflow
* Infrared: Updated universal remote assets (by @amec0e | PR #544 #546)
* Plugins: Barcode app - embed assets (encoding tables) in plugin
* Plugins: NRF24 plugins -> Updates by @Sil333033 with some changes by @xMasterX -> furi_hal_speaker direct calls was removed and replaced with notification service to avoid bypassing of user set silent mode -> What was changed - NRF24 connection check added, app folders was moved (uses migrate, all done automatically), and mousejacker now uses badusb folder for badusb scripts
* Plugins: Added Camera Suite GPIO application for the ESP32-CAM module. [(by CodyTolene)](https://github.com/CodyTolene/Flipper-Zero-Camera-Suite) (PR #541)
* Plugins: Updated ESP32: WiFi Marauder companion plugin [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-wifi-marauder)
* Plugins: Updated **NFC Maker** plugin (make tags with URLs, Wifi and other things) [(by Willy-JL)](https://github.com/ClaraCrazy/Flipper-Xtreme/tree/dev/applications/external/nfc_maker)
* Plugins: Updated **Mifare Nested** [(by AloneLiberty)](https://github.com/AloneLiberty/FlipperNested)
* SubGHz: OFW PR: change the operation of the TIM17 timer in CC1101_ext to 2µs -> **CAME Atomo and other protocols issues with external module should be fixed now**
* SubGHz: Temporatily revert new AM_Q in default modulations due to external CC1101 module issues
* Plugins: NRF24 MouseJacker -> Fixed issue #551 - Wrong folder path
* Plugins: Spectrum Analyzer -> Add a Precise mode and other small changes (by @ALEEF02 | PR #550 #553)
* Plugins: Updated Lightmeter [(by oleksiikutuzov)](https://github.com/oleksiikutuzov/flipperzero-lightmeter)
* Plugins: Updated **Multi (RFID/iButton) Fuzzer** [(by @gid9798)](https://github.com/DarkFlippers/Multi_Fuzzer)
* OFW PR: faploader: always create app dir, even if it doesn't have subdirs (by @hedger)
* OFW: Gauge initialization routine refactoring, new DataMemory layout, configuration update
* OFW: fbt: `build` target for faps
* OFW: IButton: on delete scene key name not fully display if so long
* OFW: Radio headers in SDK
* OFW: Loader: good looking error messages
* OFW: Desktop,Cli: add uptime info
* OFW: Archive and file browser fixes
* OFW: Loader: exit animation fix
* OFW: SubGhz: fix check connect cc1101_ext
* OFW: NFC: Improved MFC emulation on some readers
* OFW: Dolphin: add new animation
* OFW: Update toolchain to v23
* OFW: More descriptive error messages for the log command
* OFW: **External menu apps** -> now we have ton of free internal space
* OFW: Device Info update
* Plugins: Various uFBT fixes (by @hedger)
* Infrared: Universal remote assets - Add Xiaomi TV and (Daikin AC from OFW PR 2913 by minchogaydarov)
* OFW PR 2912: NFC: Fix key invalidation (again) (by AloneLiberty)
* OFW PR 2907: Fix about screen (by andzhr)
* OFW PR 2896: BadUSB - Added French Canadian layout (by francis2054)

----

Expand Down
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ You can support us by using links or addresses below:
- ESP32-CAM -> Camera Suite [(by CodyTolene)](https://github.com/CodyTolene/Flipper-Zero-Camera-Suite)

Games:
- DOOM (fixed) [(by p4nic4ttack)](https://github.com/p4nic4ttack/doom-flipper-zero/)
- DOOM (ported and fixed by @xMasterX & @Svarich & @hedger) [(original by p4nic4ttack)](https://github.com/p4nic4ttack/doom-flipper-zero/)
- Zombiez [(Reworked By DevMilanIan)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/pull/240) [(Original By Dooskington)](https://github.com/Dooskington/flipperzero-zombiez)
- Flappy Bird [(by DroomOne)](https://github.com/DroomOne/flipperzero-firmware/tree/dev/applications/flappy_bird)
- Arkanoid (refactored by xMasterX) [(by gotnull)](https://github.com/gotnull/flipperzero-firmware-wPlugins)
Expand Down
16 changes: 9 additions & 7 deletions applications/drivers/subghz/cc1101_ext/cc1101_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_FULL (256)
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_HALF \
(SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_FULL / 2)
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME 999
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME 999 << 1

/** SubGhz state */
typedef enum {
Expand Down Expand Up @@ -500,7 +500,7 @@ static void subghz_device_cc1101_ext_capture_ISR() {

subghz_device_cc1101_ext->async_rx.capture_callback(
true,
LL_TIM_GetCounter(TIM17),
LL_TIM_GetCounter(TIM17) << 1,
(void*)subghz_device_cc1101_ext->async_rx.capture_callback_context);
}
} else {
Expand All @@ -510,11 +510,11 @@ static void subghz_device_cc1101_ext_capture_ISR() {

subghz_device_cc1101_ext->async_rx.capture_callback(
false,
LL_TIM_GetCounter(TIM17),
LL_TIM_GetCounter(TIM17) << 1,
(void*)subghz_device_cc1101_ext->async_rx.capture_callback_context);
}
}
LL_TIM_SetCounter(TIM17, 6);
LL_TIM_SetCounter(TIM17, 4); //8>>1
}

void subghz_device_cc1101_ext_start_async_rx(
Expand All @@ -529,7 +529,8 @@ void subghz_device_cc1101_ext_start_async_rx(
furi_hal_bus_enable(FuriHalBusTIM17);

// Configure TIM
LL_TIM_SetPrescaler(TIM17, 64 - 1);
//Set the timer resolution to 2 µs
LL_TIM_SetPrescaler(TIM17, (64 << 1) - 1);
LL_TIM_SetCounterMode(TIM17, LL_TIM_COUNTERMODE_UP);
LL_TIM_SetAutoReload(TIM17, 0xFFFF);
LL_TIM_SetClockDivision(TIM17, LL_TIM_CLOCKDIVISION_DIV1);
Expand Down Expand Up @@ -623,7 +624,7 @@ static void subghz_device_cc1101_ext_async_tx_refill(uint32_t* buffer, size_t sa

uint32_t duration = level_duration_get_duration(ld);
furi_assert(duration > 0);
*buffer = duration - 1;
*buffer = duration >> 1;
buffer++;
samples--;
}
Expand Down Expand Up @@ -709,7 +710,8 @@ bool subghz_device_cc1101_ext_start_async_tx(SubGhzDeviceCC1101ExtCallback callb
furi_hal_bus_enable(FuriHalBusTIM17);

// Configure TIM
LL_TIM_SetPrescaler(TIM17, 64 - 1);
// Set the timer resolution to 2 µs
LL_TIM_SetPrescaler(TIM17, (64 << 1) - 1);
LL_TIM_SetCounterMode(TIM17, LL_TIM_COUNTERMODE_UP);
LL_TIM_SetAutoReload(TIM17, 0xFFFF);
LL_TIM_SetClockDivision(TIM17, LL_TIM_CLOCKDIVISION_DIV1);
Expand Down
4 changes: 4 additions & 0 deletions applications/external/doom/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/*
.vscode
.clang-format
.editorconfig
70 changes: 6 additions & 64 deletions applications/external/doom/README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,10 @@
# Doom Flipper Zero edition

<div style="text-align:center"><img src="assets/logo_inv.png"/></div>

## Will it run Doom?
As tradition goes, Doom is being ported to almost every possible embedded electronic device. Therefore I did an attempt to come up with something close to Doom and still compatible on the Flipper Zero's hardware.<br> This is not the actual Doom game but a port made from yet another Doom port to the Arduino Nano (https://github.com/daveruiz/doom-nano/). This port is basically a raycasting engine, using Doom sprites.<br>
As tradition goes, Doom is being ported to almost every possible embedded electronic device. Therefore I did an attempt to come up with something close to Doom and still compatible on the Flipper Zero's hardware. This is not the actual Doom game but a port made from yet another Doom port to the Arduino Nano - https://github.com/daveruiz/doom-nano/. This port is basically a raycasting engine, using Doom sprites.
This version is very basic and might be improved over time.

## How to install on Flipper Zero
During the porting process, minor changes were made to the workings (and build options) of the current firmware. These changes are documented here and are necessary in order to get a working firmware build that contains this Doom port.
### Modifying the firmware & build options
* In the `sites/cc.scons` add the following values to the `CCFLAGS` section:
```
...
"-Wno-unused-parameter",
"-Wno-type-limits",
"-Wno-unused-variable",
...
```
* In `applications/gui/canvas_i.h` comment out the following line:<br>
`uint8_t* canvas_get_buffer(Canvas* canvas);` --> `//uint8_t* canvas_get_buffer(Canvas* canvas);`

* In `applications/gui/canvas.h` add the following lines:
```
uint8_t* canvas_get_buffer(Canvas* canvas);
void canvas_draw_icon_bitmap(Canvas* canvas, uint8_t x, uint8_t y, int16_t w, int16_t h, const Icon* icon);
```
* In `applications/gui/canvas.c` add the following function:
```
void canvas_draw_icon_bitmap(Canvas* canvas, uint8_t x, uint8_t y, int16_t w, int16_t h, const Icon* icon){
furi_assert(canvas);
furi_assert(icon);
x += canvas->offset_x;
y += canvas->offset_y;
uint8_t* icon_data = NULL;
furi_hal_compress_icon_decode(icon_get_data(icon), &icon_data);
u8g2_DrawXBM(&canvas->fb, x, y, w, h, icon_data);
}
```

### Installing the plugin in the firmware
* Make a folder called Doom in the applications folder. Add all the source files (also the compiled folder and it's files) in the Doom folder.
* Make the `applications/meta/application.fam` look like the following:
```
App(
appid="basic_plugins",
name="Basic applications for plug-in menu",
apptype=FlipperAppType.METAPACKAGE,
provides=[
...
"doom_game",
...
],
)
```

If all went well the only thing left to do is building the firmware and installing it to the Flipper.

## Screenshots
![Intro screen](assets/screenshot-intro2.jpg)

![Start screen](assets/screenshot-start2.jpg)

![Imp](assets/screenshot-imp2.jpg)

![Medkit](assets/screenshot-medkit2.jpg)
## Credits
@xMasterX - Porting to latest firmware using new plugins system, fixing many issues, adding sound
@Svaarich - New logo screen and cool icon
@hedger - uFBT fixes and some bugfixes
@p4nic4ttack - First raw implementation based on doom-nano
4 changes: 4 additions & 0 deletions applications/external/doom/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ App(
order=75,
fap_icon="doom_10px.png",
fap_category="Games",
fap_icon_assets="assets",
fap_author="@xMasterX & @Svarich & @hedger (original code by @p4nic4ttack)",
fap_version="1.0",
fap_description="Will it run Doom?",
)
Original file line number Diff line number Diff line change
@@ -1,78 +1,4 @@
#include "assets_icons.h"

#include <gui/icon_i.h>

// Inverted icons

const uint8_t _I_fire_inv_0[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x30, 0x00, 0x40, 0xee, 0x00, 0x80, 0xe6, 0x00,
0x80, 0xa7, 0x01, 0x80, 0xc7, 0x03, 0x40, 0x45, 0x03, 0xe0, 0x41, 0x07, 0xf8, 0x82, 0x9f, 0xb9,
0x01, 0x3e, 0x7c, 0x00, 0x7a, 0x6e, 0x00, 0x56, 0x1c, 0x00, 0x6c, 0xf4, 0x01, 0x3a, 0x6c, 0x00,
0x7e, 0xfc, 0x00, 0x1a, 0x08, 0x00, 0x3c, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const uint8_t* const _I_fire_inv[] = {_I_fire_inv_0};

const uint8_t _I_gun_inv_0[] = {
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x80, 0x23, 0x00, 0x00, 0x40,
0x20, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x57, 0x00, 0x00, 0x20, 0x8b, 0x00, 0x00,
0x90, 0x11, 0x01, 0x00, 0x98, 0x00, 0x00, 0x00, 0xb0, 0x43, 0x01, 0x00, 0x94, 0x81, 0x03,
0x00, 0xd0, 0x45, 0x04, 0x00, 0x8c, 0x02, 0x02, 0x00, 0xc4, 0x00, 0x03, 0x00, 0xc8, 0x00,
0x02, 0x00, 0x4e, 0x40, 0x00, 0x00, 0x92, 0x00, 0x02, 0x80, 0x07, 0x15, 0x04, 0xe0, 0x8f,
0x00, 0x0c, 0xd0, 0x9d, 0x07, 0x17, 0xe0, 0x3a, 0xc0, 0x3f, 0xe0, 0xf7, 0xff, 0x77, 0xe0,
0xae, 0xfe, 0x4b, 0xd8, 0xdd, 0xff, 0x4d, 0x88, 0xea, 0xbe, 0x26, 0x4c, 0xf5, 0xff, 0x17,
0xc8, 0xfa, 0xae, 0x0b, 0xcc, 0xff, 0xdf, 0x19, 0xe8, 0xeb, 0xa7, 0x00, 0xd8, 0xf1, 0x4d,
0x0c, 0xc0, 0xbe, 0x1a, 0x08, 0xf6, 0xfd, 0x37, 0x04,
};
const uint8_t* const _I_gun_inv[] = {_I_gun_inv_0};

const uint8_t _I_gun_mask_inv_0[] = {
0x01, 0x00, 0x53, 0x00, 0x00, 0x0c, 0x38, 0x04, 0x38, 0x09, 0xf8, 0x0c, 0x78, 0x17, 0xf0,
0x18, 0xf8, 0x00, 0x67, 0xff, 0x01, 0xaf, 0xc3, 0xff, 0x01, 0x80, 0x7e, 0x3f, 0xf0, 0x38,
0x07, 0xf0, 0x0e, 0x40, 0x31, 0x03, 0x8f, 0xfb, 0xff, 0x07, 0x01, 0x94, 0x3c, 0x0e, 0xc0,
0x35, 0xff, 0x85, 0xc8, 0x06, 0x30, 0x7e, 0x00, 0x0c, 0x61, 0xe2, 0xe1, 0xff, 0xc7, 0xc5,
0xc3, 0xff, 0x9f, 0x80, 0xca, 0xfe, 0x03, 0x2f, 0xf8, 0x0c, 0xc6, 0xc2, 0x03, 0x4b, 0xf8,
0xa8, 0x42, 0xe2, 0x03, 0x28, 0xf8, 0x1e, 0x80, 0x68, 0x1e, 0x28, 0x78,
};
const uint8_t* const _I_gun_mask_inv[] = {_I_gun_mask_inv_0};

const uint8_t _I_logo_inv_0[] = {
0x01, 0x00, 0x92, 0x01, 0x00, 0x78, 0x03, 0xc0, 0x03, 0xfc, 0xff, 0xff, 0xfc, 0x1f, 0xf9, 0xff,
0xe3, 0xff, 0x0f, 0x8f, 0xfc, 0x2f, 0xe0, 0xf3, 0xdc, 0x6e, 0xf7, 0x7b, 0x1d, 0xdd, 0xef, 0x79,
0xbb, 0xcd, 0xce, 0xf7, 0x13, 0xb0, 0x79, 0xfc, 0x03, 0xe3, 0xfb, 0x01, 0x0f, 0xfb, 0xff, 0xbf,
0x11, 0x8c, 0x7c, 0x1e, 0x7e, 0x0f, 0x77, 0xbb, 0xd4, 0x02, 0x10, 0x00, 0xeb, 0xad, 0xde, 0xc8,
0x70, 0x3c, 0xf8, 0x01, 0xf7, 0xbf, 0xff, 0x20, 0xe0, 0xf3, 0xc0, 0x6e, 0x80, 0x0d, 0x7a, 0xde,
0x40, 0x83, 0xf8, 0x03, 0x10, 0xfa, 0x70, 0x07, 0xee, 0x02, 0x18, 0x30, 0x3d, 0x0a, 0xe3, 0xfb,
0x83, 0x86, 0xc7, 0x82, 0x1f, 0x1f, 0xf8, 0xfd, 0x61, 0x5a, 0x0d, 0x54, 0x0b, 0x55, 0xaa, 0xc0,
0x00, 0x84, 0x0c, 0x21, 0xf4, 0x8f, 0xf4, 0x3b, 0x70, 0x3e, 0xf7, 0x7b, 0x01, 0x9f, 0xef, 0xf7,
0xc3, 0xfe, 0x1f, 0x6f, 0x87, 0xee, 0x07, 0xfe, 0xff, 0x60, 0x07, 0xfe, 0x1f, 0x88, 0xef, 0xc3,
0xf3, 0x01, 0xfe, 0x7f, 0x30, 0x1b, 0xdf, 0xef, 0xf6, 0x0a, 0x1f, 0xf0, 0x79, 0xd0, 0x22, 0xf7,
0x0b, 0x9c, 0x0e, 0xed, 0x76, 0x80, 0x4d, 0xee, 0xf7, 0x71, 0xff, 0x87, 0xd6, 0x2b, 0x50, 0xa8,
0xc0, 0x6a, 0x95, 0x48, 0x04, 0x56, 0xab, 0x55, 0x1f, 0xf8, 0xff, 0xc7, 0xfe, 0x3f, 0xaa, 0xe4,
0x02, 0x3b, 0x55, 0xae, 0x8f, 0xfc, 0xbf, 0xe1, 0xff, 0x0f, 0xf8, 0x7d, 0x61, 0x18, 0x0c, 0x44,
0x03, 0x11, 0x88, 0x02, 0x0e, 0x23, 0x04, 0x0e, 0x30, 0xfa, 0x41, 0x43, 0xe2, 0x06, 0x18, 0xa8,
0x18, 0x43, 0xe9, 0x02, 0xd0, 0x68, 0xa1, 0x5a, 0x2d, 0x51, 0x10, 0x70, 0x5a, 0x21, 0xfc, 0x45,
0x43, 0xe3, 0x50, 0x0f, 0xc4, 0x20, 0x72, 0x20, 0x22, 0x02, 0x16, 0x00, 0x7e, 0xd5, 0x4a, 0x8d,
0x54, 0x3e, 0x35, 0x40, 0xfb, 0x80, 0x3c, 0x3e, 0x35, 0x5a, 0x09, 0xe8, 0x6a, 0x87, 0xc1, 0x23,
0x88, 0xfd, 0x40, 0x0c, 0x09, 0x20, 0xfa, 0x87, 0x06, 0x00, 0x1f, 0x38, 0x0c, 0x50, 0x3e, 0xa0,
0x0f, 0x0f, 0x8c, 0x56, 0x00, 0x5c, 0x1a, 0x80, 0x90, 0x62, 0x03, 0xf6, 0x80, 0x42, 0x17, 0xc2,
0x7b, 0x10, 0x20, 0x87, 0xde, 0xa9, 0x04, 0x80, 0x54, 0x20, 0x94, 0x08, 0xa0, 0x24, 0x47, 0xf5,
0x01, 0x20, 0x54, 0x44, 0x18, 0x80, 0x42, 0x88, 0x17, 0xfc, 0x7e, 0xb4, 0x40, 0x4c, 0x12, 0x04,
0x01, 0xe3, 0xf4, 0x2a, 0xf8, 0x03, 0xc0, 0x1f, 0xe0, 0xbc, 0xcf, 0xb8, 0xf8, 0x1e, 0xbf, 0xcc,
0x5b, 0x12, 0x0c, 0x56, 0x0a, 0x51, 0x82, 0xa8, 0x28, 0x08, 0x1f, 0x32, 0x0c, 0x00, 0x3e, 0x85,
0xe3, 0x1e, 0x17, 0x8f, 0x4f, 0xe6, 0x1f, 0x99, 0x44, 0x0a, 0x10, 0x2f, 0x13, 0xb4, 0xc8, 0x29,
0x03, 0xf3, 0x89, 0x03, 0xe7, 0x10, 0x5f, 0x2a, 0x87, 0xd1, 0x1b, 0xe0, 0x0f, 0x00, 0x78, 0x03,
0xc0, 0x1e, 0x00, 0xf0, 0x02, 0x00,
};
const uint8_t* const _I_logo_inv[] = {_I_logo_inv_0};

const Icon I_fire_inv =
{.width = 24, .height = 20, .frame_count = 1, .frame_rate = 0, .frames = _I_fire_inv};
const Icon I_gun_inv =
{.width = 32, .height = 32, .frame_count = 1, .frame_rate = 0, .frames = _I_gun_inv};
const Icon I_gun_mask_inv =
{.width = 32, .height = 32, .frame_count = 1, .frame_rate = 0, .frames = _I_gun_mask_inv};
const Icon I_logo_inv =
{.width = 128, .height = 64, .frame_count = 1, .frame_rate = 0, .frames = _I_logo_inv};
#include "assets.h"

const uint8_t space[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
const uint8_t zero[] = {0x00, 0x60, 0x90, 0x90, 0x90, 0x60};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
#define GRADIENT_WHITE 7
#define GRADIENT_BLACK 0

// Inverted icons
extern const Icon I_fire_inv;
extern const Icon I_gun_inv;
extern const Icon I_gun_mask_inv;
extern const Icon I_logo_inv;

// Fonts
extern const uint8_t zero[];
extern const uint8_t one[];
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 12 additions & 14 deletions applications/external/doom/display.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include <gui/gui.h>
#include <gui/canvas_i.h>
#include <furi_hal.h>
#include <u8g2_glue.h>
#include "constants.h"
#include "compiled/assets_icons.h"
#include <doom_icons.h>
#include "assets.h"

#define CHECK_BIT(var, pos) ((var) & (1 << (pos)))

Expand Down Expand Up @@ -50,14 +49,12 @@ void fadeScreen(uint8_t intensity, bool color, Canvas* const canvas);
bool getGradientPixel(uint8_t x, uint8_t y, uint8_t i);
double getActualFps();
void fps();
void setupDisplay(Canvas* canvas);
uint8_t reverse_bits(uint8_t num);

// FPS control
double delta = 1;
uint32_t lastFrameTime = 0;
uint8_t zbuffer[128]; /// 128 = screen width & REMOVE WHEN DISPLAY.H IMPLEMENTED
uint8_t* display_buf = NULL;

void drawGun(
int16_t x,
Expand Down Expand Up @@ -88,12 +85,6 @@ void drawVLine(uint8_t x, int8_t start_y, int8_t end_y, uint8_t intensity, Canva
}
}

void setupDisplay(Canvas* canvas) {
memset(zbuffer, 0xff, 128);
display_buf = (uint8_t*)canvas->fb.tile_buf_ptr;
//display_buf = u8g2_GetBufferPtr(&canvas->fb);
}

void drawBitmap(
int16_t x,
int16_t y,
Expand All @@ -102,13 +93,20 @@ void drawBitmap(
int16_t h,
uint16_t color,
Canvas* const canvas) {
UNUSED(color);
canvas_draw_icon_bitmap(canvas, x, y, w, h, i);
UNUSED(w);
UNUSED(h);
if(!color) {
canvas_invert_color(canvas);
}
canvas_draw_icon(canvas, x, y, i);
if(!color) {
canvas_invert_color(canvas);
}
}

void drawText(uint8_t x, uint8_t y, uint8_t num, Canvas* const canvas) {
char buf[4];
itoa(num, buf, 10);
snprintf(buf, 4, "%d", num);
drawTextSpace(x, y, buf, 1, canvas);
}

Expand Down
Loading

0 comments on commit 3a676f7

Please sign in to comment.