Standalone app api v3 (#2772)

Added file io, and updated some ui elements.
Also added Digital Rain standalone app for an example.
This commit is contained in:
Totoo 2025-09-01 11:50:46 +02:00 committed by GitHub
parent 776c9bc7c9
commit b15bb59678
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 14474 additions and 12 deletions

View file

@ -256,7 +256,7 @@ void GeoMap::map_read_line_bin(ui::Color* buffer, uint16_t pixels) {
for (int i = 0; i < geomap_rect_width; i++) {
buffer[i] = zoom_out_buffer[i * (-map_zoom)];
}
delete zoom_out_buffer;
delete[] zoom_out_buffer;
}
}
@ -660,7 +660,7 @@ bool GeoMap::init() {
map_height = 32768;
}
map_visible = map_opened;
map_visible = map_opened || has_osm;
map_center_x = map_width >> 1;
map_center_y = map_height >> 1;
@ -670,7 +670,7 @@ bool GeoMap::init() {
map_bottom = sin(-85.05 * pi / 180); // Map bitmap only goes from about -85 to 85 lat
map_world_lon = map_width / (2 * pi);
map_offset = (map_world_lon / 2 * log((1 + map_bottom) / (1 - map_bottom)));
return map_opened || has_osm;
return map_opened;
}
void GeoMap::set_mode(GeoMapMode mode) {