This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "fgd.h" | |
| enum { | |
| TOK_EMPTY, | |
| TOK_WORD, | |
| TOK_INTEGER, | |
| TOK_FLOAT, | |
| TOK_STRING, | |
| TOK_EOF, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define dsp_rfft_size(fftsize) ((fftsize) / 2 + 8) | |
| #define dsp_overlap_size(fftsize) ((fftsize) / 2) | |
| #define dsp_complex_array_count(fftsize) ((fftsize) * 2) | |
| enum { | |
| FFT_MIN_SIZE = 16, | |
| FFT_MAX_SIZE = 4096, | |
| }; | |
| struct fir_filter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "module.h" | |
| #define COBJMACROS | |
| #include <windows.h> | |
| #include <mmdeviceapi.h> | |
| #include <audioclient.h> | |
| struct audio_buffer audio_buffer; | |
| struct audio_device audio_device; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "array.h" | |
| // arenasize: | |
| // virtual address size of the backing arenai | |
| void * | |
| make_array(usize arenasize, usize elementsize, char *name) | |
| { | |
| struct arena *arena = make_arena(arenasize, name); | |
| struct array_header *array = arena_alloc_align(arena, 16, sizeof *array); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bits 64 | |
| default rel | |
| %define R_PITCH (160 * 4) | |
| %define R_PITCH_SHIFT 10 | |
| section .data | |
| float_1 dd 1.0 | |
| align 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define COBJMACROS | |
| #include <windows.h> | |
| #include <d3d11.h> | |
| #include <dxgi1_3.h> | |
| cvar_t vid_dxgi = {"vid_dxgi", 0, CVAR_BOOL | CVAR_ALLOW | CVAR_INIT}; // DXGI layer for OpenGL | |
| cvar_t vid_waitsync = {"vid_waitsync", 0, CVAR_BOOL | CVAR_ALLOW}; // lower latency, lower framerate | |
| cvar_t vid_display = {"vid_display", -1, CVAR_INT | CVAR_ALLOW}; // -1 = primary | |
| cvar_t vid_fullscreen = {"vid_fullscreen", 1, CVAR_BOOL | CVAR_ALLOW}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct arena { | |
| usize commitsize; | |
| char *name; | |
| char *start; // start of reserved address space | |
| char *end; // end of reserved address space | |
| char *heap; // start of user block | |
| char *allocated; // end of allocated block | |
| char *commited; // end of commited block | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Initializes an OpenGL device context for a given window. | |
| void | |
| gl_create_context(HWND hwnd) | |
| { | |
| HDC hdc; | |
| HGLRC hglrc; | |
| int pfd_index; | |
| PIXELFORMATDESCRIPTOR pfd, device_pfd; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "core/vector.h" | |
| #include "core/math.h" | |
| #include "physics/clip.h" | |
| struct phys_world { | |
| unsigned static_clips_count; | |
| struct aabb static_clips[PHYS_MAX_CLIP]; | |
| }; | |
| static struct phys_world phys; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spacing=1 | |
| id=1 | |
| nodes={} | |
| rects={} | |
| parent=nil | |
| child=nil | |
| function setpos(node) | |
| local d=0 | |
| local p=node.p |
NewerOlder