mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: ~500 more byte=>u8
This commit is contained in:
@ -68,7 +68,7 @@ fn destroy_texture(sg_img gfx.Image) {
|
||||
}
|
||||
|
||||
// Use only if usage: .dynamic is enabled
|
||||
fn update_text_texture(sg_img gfx.Image, w int, h int, buf &byte) {
|
||||
fn update_text_texture(sg_img gfx.Image, w int, h int, buf &u8) {
|
||||
sz := w * h * 4
|
||||
mut tmp_sbc := gfx.ImageData{}
|
||||
tmp_sbc.subimage[0][0] = gfx.Range{
|
||||
|
@ -18,7 +18,7 @@ import stbi
|
||||
/******************************************************************************
|
||||
* Texture functions
|
||||
******************************************************************************/
|
||||
pub fn create_texture(w int, h int, buf &byte) gfx.Image {
|
||||
pub fn create_texture(w int, h int, buf &u8) gfx.Image {
|
||||
sz := w * h * 4
|
||||
mut img_desc := gfx.ImageDesc{
|
||||
width: w
|
||||
|
@ -5,8 +5,8 @@ module particle
|
||||
// * Color
|
||||
pub struct Color {
|
||||
mut:
|
||||
r byte
|
||||
g byte
|
||||
b byte
|
||||
a byte
|
||||
r u8
|
||||
g u8
|
||||
b u8
|
||||
a u8
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ fn graphics_frame(mut state AppState) {
|
||||
}
|
||||
|
||||
[inline]
|
||||
fn (mut state AppState) bsample(idx int) byte {
|
||||
fn (mut state AppState) bsample(idx int) u8 {
|
||||
return u8(127 + state.frames[(state.gframe + idx) & 2047] * 128)
|
||||
}
|
||||
|
||||
|
@ -104,15 +104,15 @@ struct RIFFChunkHeader {
|
||||
}
|
||||
|
||||
struct RIFFFormat {
|
||||
format_tag u16 // PCM = 1; Values other than 1 indicate some form of compression.
|
||||
nchannels u16 // Nc ; 1 = mono ; 2 = stereo
|
||||
sample_rate u32 // F
|
||||
avg_bytes_per_second u32 // F * M*Nc
|
||||
nblock_align u16 // M*Nc
|
||||
bits_per_sample u16 // 8 * M
|
||||
cbsize u16 // Size of the extension: 22
|
||||
valid_bits_per_sample u16 // at most 8*M
|
||||
channel_mask u32 // Speaker position mask
|
||||
format_tag u16 // PCM = 1; Values other than 1 indicate some form of compression.
|
||||
nchannels u16 // Nc ; 1 = mono ; 2 = stereo
|
||||
sample_rate u32 // F
|
||||
avg_bytes_per_second u32 // F * M*Nc
|
||||
nblock_align u16 // M*Nc
|
||||
bits_per_sample u16 // 8 * M
|
||||
cbsize u16 // Size of the extension: 22
|
||||
valid_bits_per_sample u16 // at most 8*M
|
||||
channel_mask u32 // Speaker position mask
|
||||
sub_format [16]u8 // GUID
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user