From 1e4807cfafe44c46a421ce59c76a382d9e0051de Mon Sep 17 00:00:00 2001 From: milang Date: Thu, 29 Aug 2019 17:06:19 +0200 Subject: [PATCH] completed bitmaps --- doc/html/annotated.html | 37 +- doc/html/annotated_dup.js | 7 + doc/html/bitmap_8h.html | 44 +- doc/html/bitmap_8h.js | 8 + doc/html/bitmap_8h_source.html | 46 +- doc/html/classes.html | 37 +- .../dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.html | 44 +- .../dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.js | 4 + .../dir_ada157988d47c0ed8971be2c0e2fe61c.html | 44 +- .../dir_ada157988d47c0ed8971be2c0e2fe61c.js | 7 + .../dir_d44c64559bbebec7f509842c48db8b23.html | 44 +- .../dir_d44c64559bbebec7f509842c48db8b23.js | 5 + doc/html/files.html | 37 +- doc/html/files_dup.js | 4 + doc/html/functions.html | 37 +- doc/html/functions_vars.html | 37 +- doc/html/globals.html | 37 +- doc/html/globals_defs.html | 37 +- doc/html/globals_func.html | 37 +- doc/html/globals_type.html | 37 +- doc/html/globals_vars.html | 37 +- doc/html/index.html | 37 +- doc/html/keyboard_8h.html | 44 +- doc/html/keyboard_8h.js | 6 + doc/html/keyboard_8h_source.html | 44 +- doc/html/navtree.css | 146 +++++ doc/html/navtree.js | 540 ++++++++++++++++++ doc/html/navtreedata.js | 54 ++ doc/html/navtreeindex0.js | 73 +++ doc/html/parameters_8h.html | 44 +- doc/html/parameters_8h.js | 9 + doc/html/parameters_8h_source.html | 44 +- doc/html/resize.js | 136 +++++ doc/html/struct_f_e__floating__position.html | 40 +- doc/html/struct_f_e__floating__position.js | 6 + doc/html/struct_f_e__integer__point.html | 40 +- doc/html/struct_f_e__integer__point.js | 5 + doc/html/struct_f_e__integer__position.html | 40 +- doc/html/struct_f_e__integer__position.js | 6 + doc/html/structbitmap__rich.html | 40 +- doc/html/structbitmap__rich.js | 10 + doc/html/translate_8h.html | 44 +- doc/html/translate_8h.js | 17 + doc/html/translate_8h_source.html | 44 +- doc/html/zbuffer_8h.html | 44 +- doc/html/zbuffer_8h.js | 5 + doc/html/zbuffer_8h_source.html | 44 +- include/render/bitmap.h | 10 +- src/render/bitmap.c | 33 +- 49 files changed, 2020 insertions(+), 212 deletions(-) create mode 100644 doc/html/annotated_dup.js create mode 100644 doc/html/bitmap_8h.js create mode 100644 doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.js create mode 100644 doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.js create mode 100644 doc/html/dir_d44c64559bbebec7f509842c48db8b23.js create mode 100644 doc/html/files_dup.js create mode 100644 doc/html/keyboard_8h.js create mode 100644 doc/html/navtree.css create mode 100644 doc/html/navtree.js create mode 100644 doc/html/navtreedata.js create mode 100644 doc/html/navtreeindex0.js create mode 100644 doc/html/parameters_8h.js create mode 100644 doc/html/resize.js create mode 100644 doc/html/struct_f_e__floating__position.js create mode 100644 doc/html/struct_f_e__integer__point.js create mode 100644 doc/html/struct_f_e__integer__position.js create mode 100644 doc/html/structbitmap__rich.js create mode 100644 doc/html/translate_8h.js create mode 100644 doc/html/zbuffer_8h.js diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 6639d6a..83cd138 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+ - + diff --git a/doc/html/annotated_dup.js b/doc/html/annotated_dup.js new file mode 100644 index 0000000..864e0d9 --- /dev/null +++ b/doc/html/annotated_dup.js @@ -0,0 +1,7 @@ +var annotated_dup = +[ + [ "bitmap_rich", "structbitmap__rich.html", "structbitmap__rich" ], + [ "FE_floating_position", "struct_f_e__floating__position.html", "struct_f_e__floating__position" ], + [ "FE_integer_point", "struct_f_e__integer__point.html", "struct_f_e__integer__point" ], + [ "FE_integer_position", "struct_f_e__integer__position.html", "struct_f_e__integer__position" ] +]; \ No newline at end of file diff --git a/doc/html/bitmap_8h.html b/doc/html/bitmap_8h.html index 838cf69..8a058bd 100644 --- a/doc/html/bitmap_8h.html +++ b/doc/html/bitmap_8h.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
Data Structures | @@ -299,11 +319,15 @@ Functions
+ - + diff --git a/doc/html/bitmap_8h.js b/doc/html/bitmap_8h.js new file mode 100644 index 0000000..a58e67f --- /dev/null +++ b/doc/html/bitmap_8h.js @@ -0,0 +1,8 @@ +var bitmap_8h = +[ + [ "bitmap_rich", "structbitmap__rich.html", "structbitmap__rich" ], + [ "bitmap_rich", "bitmap_8h.html#a4ce04fd15af6abbbc6427c95ad7807af", null ], + [ "bitmap_display_pixel_r", "bitmap_8h.html#ae1b667a294c2d69346ae3ddae679f945", null ], + [ "bitmap_get_pixel_r", "bitmap_8h.html#a9153decdd49572286686861518a60929", null ], + [ "bitmap_new_rich", "bitmap_8h.html#a12b3899d0900dff435e02de4372413a0", null ] +]; \ No newline at end of file diff --git a/doc/html/bitmap_8h_source.html b/doc/html/bitmap_8h_source.html index e2d285d..74366da 100644 --- a/doc/html/bitmap_8h_source.html +++ b/doc/html/bitmap_8h_source.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
bitmap.h
-Go to the documentation of this file.
1 #include <stdint.h>
2 #include <stdbool.h>
3 
9 struct bitmap_rich
10 {
11  uint32_t size_px_x;
12  uint32_t size_px_y;
13  uint32_t size_o_y;
14 
15  uint32_t * color;
17  uint32_t * layout;
19 };
20 typedef struct bitmap_rich bitmap_rich;
21 
22 
35 bitmap_rich* bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t* color, bool copy_color,
36  uint32_t *layout, bool copy_layout);
37 
57 inline uint8_t bitmap_get_pixel_r(const bitmap_rich * bmp, uint32_t x, uint32_t y);
58 
59 
69 void bitmap_display_pixel_r(const bitmap_rich * bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t x, uint32_t y);
70 
71 
72 
bitmap rich type transparency is in the layout
Definition: bitmap.h:9
+Go to the documentation of this file.
1 #include <stdint.h>
2 #include <stdbool.h>
3 
9 struct bitmap_rich
10 {
11  uint32_t size_px_x;
12  uint32_t size_px_y;
13  uint32_t size_o_y;
14 
15  uint32_t * color;
17  uint32_t * layout;
19 };
20 typedef struct bitmap_rich bitmap_rich;
21 
22 
35 bitmap_rich* bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t* color, bool copy_color,
36  uint32_t *layout, bool copy_layout);
37 
57 inline uint8_t bitmap_get_pixel_r(const bitmap_rich * bmp, uint32_t x, uint32_t y);
58 
59 
69 void bitmap_display_pixel_r(const bitmap_rich * bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t x, uint32_t y);
70 
71 
72 
bitmap rich type transparency is in the layout
Definition: bitmap.h:9
bool color_dynamic
Definition: bitmap.h:16
bool layout dynamic
Definition: bitmap.h:18
bitmap_rich * bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t *color, bool copy_color, uint32_t *layout, bool copy_layout)
{ function_description }
@@ -83,11 +103,15 @@ $(function() {
uint32_t size_o_y
Definition: bitmap.h:13
void bitmap_display_pixel_r(const bitmap_rich *bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t x, uint32_t y)
display a specific rich bitmap pixel on the screen
+
- + diff --git a/doc/html/classes.html b/doc/html/classes.html index b862d40..b142e7f 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
b | f
+
- + diff --git a/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.html b/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.html index 647eea8..fbb771a 100644 --- a/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.html +++ b/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
event Directory Reference
@@ -78,11 +98,15 @@ Files  
+ - + diff --git a/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.js b/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.js new file mode 100644 index 0000000..7839e9a --- /dev/null +++ b/doc/html/dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.js @@ -0,0 +1,4 @@ +var dir_6f3b2b0c21cca25b28b3bb6241d8a0d3 = +[ + [ "keyboard.h", "keyboard_8h.html", "keyboard_8h" ] +]; \ No newline at end of file diff --git a/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.html b/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.html index a2a8ddd..e6cea7f 100644 --- a/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.html +++ b/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
render Directory Reference
@@ -84,11 +104,15 @@ Files  
+ - + diff --git a/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.js b/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.js new file mode 100644 index 0000000..b591ba3 --- /dev/null +++ b/doc/html/dir_ada157988d47c0ed8971be2c0e2fe61c.js @@ -0,0 +1,7 @@ +var dir_ada157988d47c0ed8971be2c0e2fe61c = +[ + [ "bitmap.h", "bitmap_8h.html", "bitmap_8h" ], + [ "parameters.h", "parameters_8h.html", "parameters_8h" ], + [ "translate.h", "translate_8h.html", "translate_8h" ], + [ "zbuffer.h", "zbuffer_8h.html", "zbuffer_8h" ] +]; \ No newline at end of file diff --git a/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html b/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html index ff30e2e..73630bd 100644 --- a/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
include Directory Reference
@@ -80,11 +100,15 @@ Directories  
+ - + diff --git a/doc/html/dir_d44c64559bbebec7f509842c48db8b23.js b/doc/html/dir_d44c64559bbebec7f509842c48db8b23.js new file mode 100644 index 0000000..4b581d1 --- /dev/null +++ b/doc/html/dir_d44c64559bbebec7f509842c48db8b23.js @@ -0,0 +1,5 @@ +var dir_d44c64559bbebec7f509842c48db8b23 = +[ + [ "event", "dir_6f3b2b0c21cca25b28b3bb6241d8a0d3.html", "dir_6f3b2b0c21cca25b28b3bb6241d8a0d3" ], + [ "render", "dir_ada157988d47c0ed8971be2c0e2fe61c.html", "dir_ada157988d47c0ed8971be2c0e2fe61c" ] +]; \ No newline at end of file diff --git a/doc/html/files.html b/doc/html/files.html index e1e55d3..0e1ef61 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+ - + diff --git a/doc/html/files_dup.js b/doc/html/files_dup.js new file mode 100644 index 0000000..f1749d9 --- /dev/null +++ b/doc/html/files_dup.js @@ -0,0 +1,4 @@ +var files_dup = +[ + [ "include", "dir_d44c64559bbebec7f509842c48db8b23.html", "dir_d44c64559bbebec7f509842c48db8b23" ] +]; \ No newline at end of file diff --git a/doc/html/functions.html b/doc/html/functions.html index d8a12bb..28df65c 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html index f6a4494..b7a24ce 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/globals.html b/doc/html/globals.html index 447a4da..4f163ab 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index 2cbb33b..fe12449 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html index 692014e..b4a4b54 100644 --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html index a422a67..295b6cd 100644 --- a/doc/html/globals_type.html +++ b/doc/html/globals_type.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/globals_vars.html b/doc/html/globals_vars.html index e79d57d..6407e6c 100644 --- a/doc/html/globals_vars.html +++ b/doc/html/globals_vars.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/index.html b/doc/html/index.html index 3c3f274..7082dbd 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -9,6 +9,14 @@ + + + + + @@ -48,6 +56,22 @@ $(function() { /* @license-end */ +
+ +
+
+
+ +
+
- + diff --git a/doc/html/keyboard_8h.html b/doc/html/keyboard_8h.html index 191c73a..814bc34 100644 --- a/doc/html/keyboard_8h.html +++ b/doc/html/keyboard_8h.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ +
+
+ +
+
+
+ +
- -
Typedefs | @@ -162,11 +182,15 @@ Functions
+ - + diff --git a/doc/html/keyboard_8h.js b/doc/html/keyboard_8h.js new file mode 100644 index 0000000..7de76f0 --- /dev/null +++ b/doc/html/keyboard_8h.js @@ -0,0 +1,6 @@ +var keyboard_8h = +[ + [ "callback", "keyboard_8h.html#a30f3e13f816b2411155158754d407bfa", null ], + [ "event_keyboard_reload", "keyboard_8h.html#abe5e5e93ac4971d06197c6530a5919e8", null ], + [ "event_keyboard_set_key", "keyboard_8h.html#a7ea4d999902832273c81f1c3811ea141", null ] +]; \ No newline at end of file diff --git a/doc/html/keyboard_8h_source.html b/doc/html/keyboard_8h_source.html index 0c1ed29..0978d85 100644 --- a/doc/html/keyboard_8h_source.html +++ b/doc/html/keyboard_8h_source.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
keyboard.h
@@ -75,11 +95,15 @@ $(function() {
void event_keyboard_set_key(uint32_t matrix_code, uint32_t ev_type, callback function)
void(* callback)(void)
Definition: keyboard.h:16
+ - + diff --git a/doc/html/navtree.css b/doc/html/navtree.css new file mode 100644 index 0000000..33341a6 --- /dev/null +++ b/doc/html/navtree.css @@ -0,0 +1,146 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/doc/html/navtree.js b/doc/html/navtree.js new file mode 100644 index 0000000..7ce2935 --- /dev/null +++ b/doc/html/navtree.js @@ -0,0 +1,540 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + if ($.browser.msie && $.browser.version<=8) { + // script.onload does not work with older versions of IE + script.onreadystatechange = function() { + if (script.readyState=='complete' || script.readyState=='loaded') { + func(); if (show) showRoot(); + } + } + } + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } if (imm || ($.browser.msie && $.browser.version>8)) { + // somehow slideDown jumps to the start of tree for IE9 :-( + $(node.getChildrenUL()).show(); + } else { + $(node.getChildrenUL()).slideDown("fast"); + } + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + gotoAnchor(anchor,aname,false); +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + $(window).load(function(){ + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + }); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
@@ -189,11 +209,15 @@ Macros
+ - + diff --git a/doc/html/parameters_8h.js b/doc/html/parameters_8h.js new file mode 100644 index 0000000..ee2c632 --- /dev/null +++ b/doc/html/parameters_8h.js @@ -0,0 +1,9 @@ +var parameters_8h = +[ + [ "render_height", "parameters_8h.html#a287d41473ee77db859d4d709d66ddb03", null ], + [ "render_max_dist", "parameters_8h.html#a83f9e629cfbf1dcd0de077265b29a1f4", null ], + [ "render_min_dist", "parameters_8h.html#a0ba94ff36e6c2a548735e40012f7ccbd", null ], + [ "render_width", "parameters_8h.html#a791a4a111886d2cab059ebc5ab6aa722", null ], + [ "render_x_mid", "parameters_8h.html#a887e6ccc340beb6774eb95667d3bfe05", null ], + [ "render_y_mid", "parameters_8h.html#ab67f355ab6184dcd911f0bf9380196c4", null ] +]; \ No newline at end of file diff --git a/doc/html/parameters_8h_source.html b/doc/html/parameters_8h_source.html index e25ff81..c34d76b 100644 --- a/doc/html/parameters_8h_source.html +++ b/doc/html/parameters_8h_source.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
- -
parameters.h
Go to the documentation of this file.
1 #ifndef RENDER_PARAM
2 #define RENDER_PARAM
3 
4 
5 // Render param
6 
7 #define render_width 128
8 #define render_height 64
9 #define render_x_mid ((render_width - 1) / 2) // depends on screen width
10 #define render_y_mid ((render_height - 1) / 2)
11 
12 #define render_max_dist 3000
13 #define render_min_dist 1
14 
15 
16 
17 #endif
+ - + diff --git a/doc/html/resize.js b/doc/html/resize.js new file mode 100644 index 0000000..6617aee --- /dev/null +++ b/doc/html/resize.js @@ -0,0 +1,136 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; + + function readCookie(cookie) + { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; + } + + function writeCookie(cookie, val, expiration) + { + if (val==undefined) return; + if (expiration == null) { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth-barWidth, null); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px"}); + var width=$(window).width(); + if (width!=collapsedWidth) { + if (width=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).load(resizeHeight); +} +/* @license-end */ diff --git a/doc/html/struct_f_e__floating__position.html b/doc/html/struct_f_e__floating__position.html index e22ae2f..86cc37a 100644 --- a/doc/html/struct_f_e__floating__position.html +++ b/doc/html/struct_f_e__floating__position.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
+ +
+
+
+ +
-
@@ -137,11 +161,15 @@ Data Fields
  • include/render/translate.h
  • + - + diff --git a/doc/html/struct_f_e__floating__position.js b/doc/html/struct_f_e__floating__position.js new file mode 100644 index 0000000..0aadadf --- /dev/null +++ b/doc/html/struct_f_e__floating__position.js @@ -0,0 +1,6 @@ +var struct_f_e__floating__position = +[ + [ "x", "struct_f_e__floating__position.html#af88b946fb90d5f08b5fb740c70e98c10", null ], + [ "y", "struct_f_e__floating__position.html#ab927965981178aa1fba979a37168db2a", null ], + [ "z", "struct_f_e__floating__position.html#ab3e6ed577a7c669c19de1f9c1b46c872", null ] +]; \ No newline at end of file diff --git a/doc/html/struct_f_e__integer__point.html b/doc/html/struct_f_e__integer__point.html index fa20dfc..ca961bd 100644 --- a/doc/html/struct_f_e__integer__point.html +++ b/doc/html/struct_f_e__integer__point.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    -
    @@ -119,11 +143,15 @@ Data Fields
  • include/render/translate.h
  • + - + diff --git a/doc/html/struct_f_e__integer__point.js b/doc/html/struct_f_e__integer__point.js new file mode 100644 index 0000000..18da67b --- /dev/null +++ b/doc/html/struct_f_e__integer__point.js @@ -0,0 +1,5 @@ +var struct_f_e__integer__point = +[ + [ "real", "struct_f_e__integer__point.html#a360c6b164ab81d7b9be24c5c969eb7c3", null ], + [ "translated", "struct_f_e__integer__point.html#a5dcb58bfcc85786010474592d78029cb", null ] +]; \ No newline at end of file diff --git a/doc/html/struct_f_e__integer__position.html b/doc/html/struct_f_e__integer__position.html index 700caaf..c18aa51 100644 --- a/doc/html/struct_f_e__integer__position.html +++ b/doc/html/struct_f_e__integer__position.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    -
    @@ -137,11 +161,15 @@ Data Fields
  • include/render/translate.h
  • + - + diff --git a/doc/html/struct_f_e__integer__position.js b/doc/html/struct_f_e__integer__position.js new file mode 100644 index 0000000..efbf10b --- /dev/null +++ b/doc/html/struct_f_e__integer__position.js @@ -0,0 +1,6 @@ +var struct_f_e__integer__position = +[ + [ "x", "struct_f_e__integer__position.html#af6d3062751bd565decb1a2cd3b63bdb2", null ], + [ "y", "struct_f_e__integer__position.html#af64066d134a77e01b3d6eb8da813627a", null ], + [ "z", "struct_f_e__integer__position.html#ac2fb30be1b894e32b31b68bb513262a3", null ] +]; \ No newline at end of file diff --git a/doc/html/structbitmap__rich.html b/doc/html/structbitmap__rich.html index 82ac3b8..684a166 100644 --- a/doc/html/structbitmap__rich.html +++ b/doc/html/structbitmap__rich.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    -
    @@ -214,11 +238,15 @@ Data Fields
  • include/render/bitmap.h
  • + - + diff --git a/doc/html/structbitmap__rich.js b/doc/html/structbitmap__rich.js new file mode 100644 index 0000000..70a9f7d --- /dev/null +++ b/doc/html/structbitmap__rich.js @@ -0,0 +1,10 @@ +var structbitmap__rich = +[ + [ "color", "structbitmap__rich.html#a500773ac49db355fb288f70dc1a9303a", null ], + [ "color_dynamic", "structbitmap__rich.html#a50fb3cab4fd784c4d5a5ff87fe95cb89", null ], + [ "dynamic", "structbitmap__rich.html#aae2586772c20f2cc9d3304dfaa5658db", null ], + [ "layout", "structbitmap__rich.html#a07f7f964deb3a167048f7fccaef23c52", null ], + [ "size_o_y", "structbitmap__rich.html#a4be8704a07fb39c310a7f403499f95d2", null ], + [ "size_px_x", "structbitmap__rich.html#adbb4f0394792d5c377b12ed98719c3d1", null ], + [ "size_px_y", "structbitmap__rich.html#addbfd7b270cfe443d1e9ee853bbde93e", null ] +]; \ No newline at end of file diff --git a/doc/html/translate_8h.html b/doc/html/translate_8h.html index ecff3a0..989b0f5 100644 --- a/doc/html/translate_8h.html +++ b/doc/html/translate_8h.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    - -
    Data Structures | @@ -327,11 +347,15 @@ Variables
    + - + diff --git a/doc/html/translate_8h.js b/doc/html/translate_8h.js new file mode 100644 index 0000000..f83b36c --- /dev/null +++ b/doc/html/translate_8h.js @@ -0,0 +1,17 @@ +var translate_8h = +[ + [ "FE_integer_position", "struct_f_e__integer__position.html", "struct_f_e__integer__position" ], + [ "FE_floating_position", "struct_f_e__floating__position.html", "struct_f_e__floating__position" ], + [ "FE_integer_point", "struct_f_e__integer__point.html", "struct_f_e__integer__point" ], + [ "FE_floating_position", "translate_8h.html#a83166ae9b8c23749f0910073d570ef3e", null ], + [ "FE_integer_point", "translate_8h.html#a35c4a457f046ca4f02dcc94a58daa4bf", null ], + [ "FE_integer_position", "translate_8h.html#a3f5d3995e107856579b9052675abfc39", null ], + [ "cos", "translate_8h.html#ac7a1183c29d9d3cd34e73d7cb2213b8a", null ], + [ "modulo_2pi", "translate_8h.html#a70d5f87988b0725ee2fbd0a84bdd9e81", null ], + [ "render_set", "translate_8h.html#a92fa63cabc18462be74711f65c5e5466", null ], + [ "render_translate", "translate_8h.html#ad9469e65551169eb575e264a8ad0e9e6", null ], + [ "sin", "translate_8h.html#a6fcd1947589f80d925b2a945cbb2156f", null ], + [ "pi", "translate_8h.html#a43016d873124d39034edb8cd164794db", null ], + [ "pi2", "translate_8h.html#a2c0cc2347cdb41873a6b0dbc108b15d3", null ], + [ "pi_sur_2", "translate_8h.html#a29539de4d4f8937b304e70fc4aa3b672", null ] +]; \ No newline at end of file diff --git a/doc/html/translate_8h_source.html b/doc/html/translate_8h_source.html index 3684292..0cd9441 100644 --- a/doc/html/translate_8h_source.html +++ b/doc/html/translate_8h_source.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    - -
    translate.h
    @@ -91,11 +111,15 @@ $(function() {
    double cos(double angle)
    + - + diff --git a/doc/html/zbuffer_8h.html b/doc/html/zbuffer_8h.html index db4f6cd..ee82904 100644 --- a/doc/html/zbuffer_8h.html +++ b/doc/html/zbuffer_8h.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    - -
    @@ -141,11 +161,15 @@ Functions
    + - + diff --git a/doc/html/zbuffer_8h.js b/doc/html/zbuffer_8h.js new file mode 100644 index 0000000..2115537 --- /dev/null +++ b/doc/html/zbuffer_8h.js @@ -0,0 +1,5 @@ +var zbuffer_8h = +[ + [ "render_zbuffer_clear", "zbuffer_8h.html#a42b8d8385be4bd07a2fe0c30967d16b5", null ], + [ "render_zbuffer_set_px", "zbuffer_8h.html#ae829a01df94b7c47ee12c4443bd38027", null ] +]; \ No newline at end of file diff --git a/doc/html/zbuffer_8h_source.html b/doc/html/zbuffer_8h_source.html index 485b1d2..6e15336 100644 --- a/doc/html/zbuffer_8h_source.html +++ b/doc/html/zbuffer_8h_source.html @@ -9,6 +9,14 @@ + + + + + @@ -47,6 +55,23 @@ $(function() { }); /* @license-end */ + +
    + +
    +
    +
    + +
    - -
    zbuffer.h
    @@ -74,11 +94,15 @@ $(function() { Go to the documentation of this file.
    1 #ifndef RENDER_ZBUFFER
    2 #define RENDER_ZBUFFER
    3 
    4 #include <fxengine/render/parameters.h>
    5 #include <stdint.h>
    6 
    12 
    13 #include <stdbool.h>
    19 bool render_zbuffer_set_px(uint32_t x, uint32_t y, uint32_t dist); // if you are allowed to draw the pixel on vram
    20 
    21 #endif
    void render_zbuffer_clear()
    bool render_zbuffer_set_px(uint32_t x, uint32_t y, uint32_t dist)
    + - + diff --git a/include/render/bitmap.h b/include/render/bitmap.h index b44b4f5..1c34a26 100644 --- a/include/render/bitmap.h +++ b/include/render/bitmap.h @@ -33,7 +33,15 @@ typedef struct bitmap_rich bitmap_rich; * @return a rich bitmap, ready to use ! */ bitmap_rich* bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t* color, bool copy_color, - uint32_t *layout, bool copy_layout); + uint32_t *layout, bool copy_layout); + +/** + * @brief delete a rich bitmap created with bitmap_new_rich() + * + * @param bmp The bitmap to delete + */ +void bitmap_delete_rich(bitmap_rich* bmp); + /** * @brief get the color of pixel from rich bitmap diff --git a/src/render/bitmap.c b/src/render/bitmap.c index 049dbc4..8b67625 100644 --- a/src/render/bitmap.c +++ b/src/render/bitmap.c @@ -5,6 +5,9 @@ bitmap_rich* bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t* color, bool copy_color, uint32_t *layout, bool copy_layout) { bitmap_rich* bmp = malloc(sizeof(bitmap_rich)); + if (!bmp) + return 0; + bmp->size_px_x = size_px_x; bmp->size_px_y = size_px_y; @@ -17,7 +20,12 @@ bitmap_rich* bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t* c if (copy_color) { - bmp->color=malloc(size_octets); + bmp->color = malloc(size_octets); + if (!bmp->color) + { + free(bmp); + return 0; + } memcpy(bmp->color, color, size_octets); } else @@ -26,10 +34,33 @@ bitmap_rich* bitmap_new_rich(uint32_t size_px_x, uint32_t size_px_y, uint32_t* c if (copy_layout && layout) { bmp->layout=malloc(size_octets); + if (!bmp->layout) + { + + free(bmp); + if (copy_color) + free(bmp->color); + return 0; + } memcpy(bmp->layout, layout, size_octets); } else bmp->layout = layout; + return bmp; +} + +void bitmap_delete_rich(bitmap_rich* bmp) +{ + if (!bmp) + return; + + if (bmp->layout_dynamic && bmp->layout) + free(bmp->layout); + + if (bmp->color) + free(bmp->color); + + free(bmp); } inline uint8_t bitmap_get_pixel_r(const bitmap_rich * bmp, uint32_t x, uint32_t y)