builtin: define u8 = byte alias
parent
546dc91967
commit
21c452c5cd
|
@ -39,7 +39,7 @@ mut:
|
||||||
* Texture functions
|
* Texture functions
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
fn create_texture(w int, h int, buf &byte) C.sg_image {
|
fn create_texture(w int, h int, buf &u8) C.sg_image {
|
||||||
sz := w * h * 4
|
sz := w * h * 4
|
||||||
mut img_desc := C.sg_image_desc{
|
mut img_desc := C.sg_image_desc{
|
||||||
width: w
|
width: w
|
||||||
|
@ -407,7 +407,8 @@ fn my_event_manager(mut ev gg.Event, mut app App) {
|
||||||
* Main
|
* Main
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
[console] // is needed for easier diagnostics on windows
|
// is needed for easier diagnostics on windows
|
||||||
|
[console]
|
||||||
fn main() {
|
fn main() {
|
||||||
// App init
|
// App init
|
||||||
mut app := &App{
|
mut app := &App{
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// that can be found in the LICENSE file.
|
// that can be found in the LICENSE file.
|
||||||
module builtin
|
module builtin
|
||||||
|
|
||||||
|
type u8 = byte
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// old function for reference
|
// old function for reference
|
||||||
pub fn (nn int) str1() string {
|
pub fn (nn int) str1() string {
|
||||||
|
|
Loading…
Reference in New Issue