type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines | #define FOURCC_DXT5 MAKEFOURCC('D', 'X', 'T', '5') |
defines |
#define R_LoadDDSImage_MAX_MIPS 16 |
defines | #define loadCubeFace(glTarget) \ |
defines |
#define shiftMipOffsets() \ |
functions | void UnpackRGB565(byte rgb[3], uint16_t cl)
{
byte r = (byte) ((cl >> 11) & 0x1F);
byte g = (byte) ((cl >> 5) & 0x3F);
byte b = (byte) (cl & 0x1F);
rgb[0] = (byte) ((r << 3) | (r >> 2)); // multiply by 8.22 -> 8.25
rgb[1] = (byte) ((g << 2) | (g >> 4)); // multiply by 4.047 -> 4.0625
rgb[2] = (byte) ((b << 3... |
functions | void R_DecodeS3TCBlock(byte out[4][4][4], int bx, int by, int format, int iw, int ih, const void *image_base)
{
int x, y;
int blocksize;
const byte *block_base, *color_base = NULL, *alpha_base = NULL;
uint16_t c0, c1;
byte rgba[4][4];
switch (format)
{
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case ... |
functions | void R_DecodeRGB565Block(byte out[4][4][4], int bx, int by, int format, int iw, int ih, const void *image_base)
{
int x, y;
const byte *row;
size_t pitch;
// REF_PARAM(format);
pitch = iw * 2;
row = (byte *) image_base + (by * iw + bx) * 2;
for(y = 0; y < 4; y++)
... |
functions | data
for (y = 0; y < height; y += 4)
{
for (x = 0; x < width; x += 4)
{
int uw = width - x;
int uh = height - y;
if (uw > 4)
{
uw = 4;
} |
functions | void R_UploadCompressedImage2D(image_t *img, GLenum target, int level, GLenum format, int width, int height, int size,
const void *data)
{
GLenum int_fmat;
if (glConfig2.ARBTextureCompressionAvailable && glConfig.textureCompression == TC_S3TC)
{
glCompressedTexImage2DARB(targ... |
functions | void R_UploadImage2D(image_t *img, GLenum target, int level, GLenum int_fmat,
int width, int height, GLenum format, GLenum type, const void *data)
{
/*
#ifdef Q3_BIG_ENDIAN
// OSX 10.3.9 has problems with GL_UNSIGNED_SHORT_5_6_5 which gives us the multicolored lightmaps
if(type == G... |
functions | volume
if (ddsd->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
{
// cube texture
if (ddsd->dwWidth != ddsd->dwHeight)
{
Ren_Warning("R_LoadDDSImage: invalid dds image \"%s\"\n", name);
goto ret_error;
} |
functions | formats
switch (ddsd->u4.ddpfPixelFormat.dwFourCC)
{
case FOURCC_DXT1:
blockSize = 8;
usingAlpha = qtrue;
format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
break;
case FOURCC_DXT3:
blockSize = 16;
usingAlpha = qtrue;
format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
break;
case FOURCC_DXT5... |
functions | offsets
if (format)
{
int w = width;
int h = height;
int offset = 0;
int i;
if (h == 0)
{
h = w; //cube map
} |
functions | format
if (ddsd->u4.ddpfPixelFormat.dwFlags & DDPF_RGB)
{
switch (ddsd->u4.ddpfPixelFormat.u0.dwRGBBitCount)
{
case 32:
internal_format = usingAlpha ? GL_RGBA8 : GL_RGB8;
format = GL_BGRA_EXT;
break;
case 24:
internal_format = GL_RGB8;
format = GL_BGR_EXT;
break... |
functions | else if (ddsd->u4.ddpfPixelFormat.dwFlags & DDPF_LUMINANCE)
{
internal_format = usingAlpha ? GL_LUMINANCE8_ALPHA8 : GL_LUMINANCE8;
format = usingAlpha ? GL_LUMINANCE_ALPHA : GL_LUMINANCE;
} |
functions | else if (ddsd->u4.ddpfPixelFormat.dwFlags & DDPF_ALPHA)
{
internal_format = GL_ALPHA8;
format = GL_ALPHA;
} |
functions | else if (ddsd->u4.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED4)
{
internal_format = usingAlpha ? GL_RGB5_A1 : GL_RGB5;
format = GL_COLOR_INDEX4_EXT;
} |
functions | else if (ddsd->u4.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8)
{
internal_format = usingAlpha ? GL_RGBA : GL_RGB;
format = GL_COLOR_INDEX8_EXT;
} |
functions | else if (!height)
{
// cube texture - must be power of 2
int w;
int i;
size_t shift = mipOffsets[mipLevels] - mipOffsets[0];
/*
if(!GARB_texture_cube_map && !GLEW_EXT_texture_cube_map && !GLEW_VERSION_1_2)
{
Ren_Warning( "R_LoadDDSImage: Tried to load Cube texture but missing hardware suppo... |
functions | shift
if (filterType == FT_DEFAULT && mipLevels == 1 && glConfig2.generateMipmapAvailable)
{
glTexParameteri(ret->type, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
} |
functions | upload
if (ddsd->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP_POSITIVEX)
{
loadCubeFace(GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB);
shiftMipOffsets();
} |
functions | extensions
if (glConfig2.textureNPOTAvailable)
{
ret->type = GL_TEXTURE_2D;
} |
functions | anisotropy
if (glConfig2.textureAnisotropyAvailable)
{
glTexParameterf(ret->type, GL_TEXTURE_MAX_ANISOTROPY_EXT, r_extTextureFilterAnisotropic->value);
} |
functions | void eventExit( iOLcDriver inst, const char* blockId, Boolean curBlockEvent, Boolean dstBlockEvent ) {
iOLcDriverData data = Data(inst);
Boolean newExitEvent = False;
if( data->prevexit + data->ignevt < SystemOp.getTick() && StrOp.equals( blockId, data->prevexitbkid ) ) {
data->prevexit = SystemOp.getTick();... |
functions | else if( newExitEvent ) {
if( !dstBlockEvent ) {
TraceOp.trc( name, TRCLEVEL_DEBUG, __LINE__, 9999,
"Check wheels of leaving train for dirt or using some isolated wheels?" );
} |
includes | #include <faur.v.h> |
defines | #define F__EMBED_HASH_SLOTS 8 |
defines | #define F__EMBED_HASH_SLOTS 256 |
functions | void f_embed__init(void)
{
g_dirs = f_hash_newStr(F__EMBED_HASH_SLOTS, false);
g_files = f_hash_newStr(F__EMBED_HASH_SLOTS, false);
f_embed__populate();
} |
functions | void f_embed__uninit(void)
{
f_hash_free(g_dirs);
f_hash_free(g_files);
} |
functions | void f_embed__dirFree(FEmbeddedDir* Dir)
{
f_hash_removeKey(g_dirs, Dir->path);
f_mem_free(Dir->entries);
f_mem_free(Dir);
} |
functions | void f_embed__dirAdd(const FEmbeddedDir* Dir)
{
f_hash_add(g_dirs, Dir->path, (void*)Dir);
} |
functions | void f_embed__fileFree(FEmbeddedFile* File)
{
f_hash_removeKey(g_files, File->path);
f_mem_free(File);
} |
functions | void f_embed__fileAdd(const FEmbeddedFile* File)
{
f_hash_add(g_files, File->path, (void*)File);
} |
functions | bool f_embed__stat(const char* Path, FPathInfo* Info)
{
const FEmbeddedFile* f = f_embed__fileGet(Path);
if(f) {
Info->flags = F_PATH_EMBEDDED | F_PATH_FILE;
Info->size = f->size;
return true;
} |
functions | bool f_embed__stat(const char* Path, FPathInfo* Info)
{
F_UNUSED(Path);
F_UNUSED(Info);
return false;
} |
includes |
#include <assert.h> |
includes | #include <stdint.h> |
includes | #include <stdatomic.h> |
includes | #include <pthread.h> |
main | int main(int argc, char *argv[]){
pthread_t thr0;
pthread_t thr1;
atomic_init(&vars[2], 0);
atomic_init(&vars[1], 0);
atomic_init(&vars[0], 0);
atomic_init(&atom_1_r1_1, 0);
atomic_init(&atom_1_r6_1, 0);
atomic_init(&atom_1_r7_0, 0);
pthread_create(&thr0, NULL, t0, NULL);
pthread_create(&thr1, N... |
includes | #include <string.h> |
structs | struct data {
char *protocol;
char *host;
char *port;
char *path;
int cur_path;
char *key;
int cur_key_value;
char *value;
int call_order;
int errors;
char *url;
}; |
functions | void on_begin(void *data)
{
int _errors = 0;
struct data *dat = data;
ASSERT_EQUAL(dat->call_order, 0);
dat->call_order = dat->call_order | 1;
dat->errors += _errors;
} |
functions | void on_protocol(void *data, const char* protocol, size_t length)
{
int _errors = 0;
struct data *dat = data;
ASSERT_EQUAL(dat->call_order, 1);
dat->call_order = dat->call_order | 2;
ASSERT_EQUAL(strncmp(protocol, dat->protocol, length), 0);
dat->errors += _errors;
strncat(dat->url, protocol, length)... |
functions | void on_host(void *data, const char* host, size_t length)
{
int _errors = 0;
struct data *dat = data;
ASSERT_EQUAL((dat->call_order & 61), 1);
dat->call_order = dat->call_order | 4;
ASSERT_EQUAL(strncmp(host, dat->host, length), 0);
dat->errors += _errors;
strncat(dat->url, host, length);
} |
functions | void on_port(void *data, const char* port, size_t length)
{
int _errors = 0;
struct data *dat = data;
ASSERT_EQUAL((dat->call_order & 61), 5);
dat->call_order = dat->call_order | 8;
ASSERT_EQUAL(strncmp(port, dat->port, length), 0);
dat->errors += _errors;
strcat(dat->url, ":");
strncat(dat->url, ... |
functions | void on_path_segment(void *data, const char* seg, size_t length)
{
int i;
int _errors = 0;
struct data *dat = data;
// Find expect
char *expect = dat->path;
ASSERT_EQUAL((dat->call_order & 33), 1);
dat->call_order = dat->call_order | 16;
for (i = 0; i < dat->cur_path; i++) {
expect = &exp... |
functions | void on_path_complete(void *data, const char* seg, size_t length)
{
int i;
int _errors = 0;
struct data *dat = data;
// Check order
ASSERT_EQUAL((dat->call_order & 49), 17);
// Construct expect
char *expect = malloc(sizeof(char));
expect[0] = '\0';
char *ptr = dat->path;
int len = 1;
... |
functions | void on_key_value(void * data,
const char* key, size_t key_length,
const char* value, size_t value_length)
{
int i;
int _errors = 0;
struct data *dat = data;
char *expect_key = dat->key;
char *expect_val = dat->value;
ASSERT_EQUAL((dat->call_order & 17), 17);
dat... |
includes |
#include <sys/time.h> |
includes | #include <sys/poll.h> |
includes | #include <stdlib.h> |
includes | #include <unistd.h> |
includes | #include <X11/X.h> |
includes | #include <X11/Xlib.h> |
includes | #include <X11/cursorfont.h> |
includes | #include <X11/Xmu/WinUtil.h> |
includes | #include <X11/Xatom.h> |
includes | #include <X11/extensions/Xfixes.h> |
includes | #include <X11/extensions/Xdamage.h> |
includes | #include <X11/Xproto.h> |
includes |
#include <glib.h> |
includes | #include <gdk/gdkx.h> |
includes | #include <glade/glade.h> |
includes | #include <pthread.h> |
includes | #include <signal.h> |
includes | #include <errno.h> |
defines |
#define DEBUGFILE "gnome_ui.c" |
defines | #define DEBUGFUNCTION "glade_create_led_meter()" |
defines | #define DEBUGFUNCTION "GtkChangeLabel()" |
defines | #define DEBUGFUNCTION "warning_submit()" |
defines | #define DEBUGFUNCTION "get_frame_extents()" |
defines | #define DEBUGFUNCTION "xvc_toggle_cap_type()" |
defines | #define DEBUGFUNCTION "xvc_undo_toggle_cap_type()" |
defines | #define DEBUGFUNCTION "do_record_thread()" |
defines | #define DEBUGFUNCTION "stop_recording_nongui_stuff()" |
defines | #define DEBUGFUNCTION "stop_recording_gui_stuff()" |
defines | #define DEBUGFUNCTION "timer_stop_recording()" |
defines | #define DEBUGFUNCTION "start_recording_gui_stuff()" |
defines | #define DEBUGFUNCTION "start_recording_nongui_stuff()" |
defines | #define DEBUGFUNCTION "position_popup_menu()" |
defines | #define DEBUGFUNCTION "xvc_reset_ctrl_main_window_according_to_current_prefs()" |
defines | #define DEBUGFUNCTION "xvc_init_pre()" |
defines | #define DEBUGFUNCTION "xvc_ui_create()" |
defines | #define DEBUGFUNCTION "xvc_frame_create()" |
defines | #define DEBUGFUNCTION "xvc_check_start_options()" |
defines | #define DEBUGFUNCTION "xvc_ui_init()" |
defines | #define DEBUGFUNCTION "xvc_ui_run()"; |
defines | #define DEBUGFUNCTION "xvc_change_filename_display()" |
defines | #define DEBUGFUNCTION "xvc_capture_stop_signal()" |
defines | #define DEBUGFUNCTION "xvc_capture_stop()" |
defines | #define DEBUGFUNCTION "xvc_capture_start()" |
defines | #define DEBUGFUNCTION "xvc_frame_change()" |
defines | #define DEBUGFUNCTION "xvc_frame_monitor()" |
defines | #define DEBUGFUNCTION "on_xvc_ctrl_main_window_delete_event()" |
defines | #define DEBUGFUNCTION "on_xvc_ctrl_main_window_destroy_event()" |
defines | #define DEBUGFUNCTION "on_xvc_ctrl_m1_mitem_preferences_activate()" |
defines | #define DEBUGFUNCTION "on_xvc_ctrl_m1_mitem_save_preferences_activate()" |
defines | #define DEBUGFUNCTION "on_xvc_ctrl_m1_mitem_sf_capture_activate()" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.