type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
includes | #include <file/file_path.h> |
includes | #include <streams/file_stream.h> |
includes | #include <formats/image.h> |
includes | #include <string/stdstring.h> |
includes | #include <retro_miscellaneous.h> |
defines | #define PI 3.14159265359f |
defines | #define ANIMATION_LOAD_CONTENT_DURATION 333 |
defines |
#define LOAD_CONTENT_ANIMATION_INITIAL_ICON_SIZE 320 |
defines | #define LOAD_CONTENT_ANIMATION_TARGET_ICON_SIZE 240 |
defines | #define GENERIC_MESSAGE_SIZE 256 |
defines | #define LIBRETRO_MESSAGE_SIZE 512 |
functions | void msg_widget_msg_transition_animation_done(void *userdata)
{
menu_widget_msg_t *msg = (menu_widget_msg_t*) userdata;
free(msg->msg);
msg->msg = msg->msg_new;
msg->msg_new = NULL;
msg->msg_transition_animation = 0.0f;
} |
functions | void menu_widgets_msg_queue_push(
retro_task_t *task, const char *msg,
unsigned duration,
char *title,
enum message_queue_icon icon,
enum message_queue_category category,
unsigned prio, bool flush)
{
menu_widget_msg_t* msg_widget = NULL;
if (fifo_write_avail(msg_queue) > 0)
... |
functions | void menu_widgets_unfold_end(void *userdata)
{
menu_widget_msg_t *unfold = (menu_widget_msg_t*) userdata;
unfold->unfolding = false;
widgets_moving = false;
} |
functions | void menu_widgets_move_end(void *userdata)
{
if (userdata)
{
menu_widget_msg_t *unfold = (menu_widget_msg_t*) userdata;
menu_animation_ctx_entry_t entry;
entry.cb = menu_widgets_unfold_end;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASI... |
functions | void menu_widgets_msg_queue_expired(void *userdata)
{
menu_widget_msg_t *msg = (menu_widget_msg_t *) userdata;
if (msg && !msg->expired)
msg->expired = true;
} |
functions | void menu_widgets_msg_queue_move(void)
{
int i;
float y = 0;
menu_widget_msg_t *unfold = NULL; /* there should always be one and only one unfolded message */
if (current_msgs->size == 0)
return;
for (i = (int)(current_msgs->size-1); i >= 0; i--)
{
menu_widget_msg_t *msg = (menu_widget_... |
functions | void menu_widgets_msg_queue_free(menu_widget_msg_t *msg, bool touch_list)
{
size_t i;
menu_animation_ctx_tag tag = (uintptr_t) msg;
if (msg->task_ptr)
{
/* remove the reference the task has of ourself
only if the task is not finished already
(finished tasks are freed before the widg... |
functions | void menu_widgets_msg_queue_kill_end(void *userdata)
{
menu_widget_msg_t *msg = (menu_widget_msg_t*)
file_list_get_userdata_at_offset(current_msgs, msg_queue_kill);
if (!msg)
return;
menu_widgets_msg_queue_free(msg, true);
} |
functions | void menu_widgets_msg_queue_kill(unsigned idx)
{
menu_animation_ctx_entry_t entry;
menu_widget_msg_t *msg = (menu_widget_msg_t*)
file_list_get_userdata_at_offset(current_msgs, idx);
if (!msg)
return;
widgets_moving = true;
msg->dying = true;
msg_queue_kill = idx;
/* Drop down *... |
functions | void menu_widgets_draw_icon(
video_frame_info_t *video_info,
unsigned icon_width,
unsigned icon_height,
uintptr_t texture,
float x, float y,
unsigned width, unsigned height,
float rotation, float scale_factor,
float *color)
{
menu_display_ctx_rotate_draw_t rotate_draw;... |
functions | void menu_widgets_draw_icon_blend(
video_frame_info_t *video_info,
unsigned icon_width,
unsigned icon_height,
uintptr_t texture,
float x, float y,
unsigned width, unsigned height,
float rotation, float scale_factor,
float *color)
{
menu_display_ctx_rotate_draw_t rotate... |
functions | float menu_widgets_get_thumbnail_scale_factor(const float dst_width, const float dst_height,
const float image_width, const float image_height)
{
float dst_ratio = dst_width / dst_height;
float image_ratio = image_width / image_height;
return (dst_ratio > image_ratio) ? dst_height / image_height... |
functions | void menu_widgets_screenshot_dispose(void *userdata)
{
screenshot_loaded = false;
video_driver_texture_unload(&screenshot_texture);
} |
functions | void menu_widgets_screenshot_end(void *userdata)
{
menu_animation_ctx_entry_t entry;
entry.cb = menu_widgets_screenshot_dispose;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &screenshot_y;
entry.tag = menu_w... |
functions | void menu_widgets_start_msg_expiration_timer(menu_widget_msg_t *msg_widget, unsigned duration)
{
menu_timer_ctx_entry_t timer;
if (msg_widget->expiration_timer_started)
return;
timer.cb = menu_widgets_msg_queue_expired;
timer.duration = duration;
timer.userdata = msg_widget;
menu_timer_s... |
functions | void menu_widgets_hourglass_end(void *userdata)
{
menu_timer_ctx_entry_t timer;
menu_widget_msg_t *msg = (menu_widget_msg_t*) userdata;
msg->hourglass_rotation = 0.0f;
timer.cb = menu_widgets_hourglass_tick;
timer.duration = HOURGLASS_INTERVAL;
timer.userdata = msg;... |
functions | void menu_widgets_hourglass_tick(void *userdata)
{
menu_widget_msg_t *msg = (menu_widget_msg_t*) userdata;
menu_animation_ctx_tag tag = (uintptr_t) msg;
menu_animation_ctx_entry_t entry;
entry.easing_enum = EASING_OUT_QUAD;
entry.tag = tag;
entry.duration = HOURGLASS_DURATION;
... |
functions | void menu_widgets_iterate(unsigned width, unsigned height)
{
size_t i;
settings_t *settings = config_get_ptr();
/* Messages queue */
/* Consume one message if available */
if (fifo_read_avail(msg_queue) > 0 && !widgets_moving && current_msgs->size < MSG_QUEUE_ONSCREEN_MAX)
{
menu_widget_msg_t ... |
functions | int menu_widgets_draw_indicator(video_frame_info_t *video_info,
menu_texture_item icon, int y, int top_right_x_advance,
enum msg_hash_enums msg)
{
unsigned width;
settings_t *settings = config_get_ptr();
menu_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
if (icon)
{
... |
functions | void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_t *video_info)
{
unsigned text_color;
unsigned bar_width;
unsigned rect_x;
unsigned rect_y;
unsigned rect_width;
unsigned rect_height;
float *msg_queue_current_background;
float *msg_queue_current_bar;
unsigned task_p... |
functions | void menu_widgets_draw_regular_msg(menu_widget_msg_t *msg, video_frame_info_t *video_info)
{
menu_texture_item icon = 0;
unsigned bar_width;
unsigned text_color;
if (!icon)
icon = menu_widgets_icons_textures[MENU_WIDGETS_ICON_INFO]; /* TODO: Real icon logic here */
/* Icon */
menu_display... |
functions | void menu_widgets_draw_backdrop(video_frame_info_t *video_info, float alpha)
{
menu_display_set_alpha(menu_widgets_backdrop, alpha);
menu_display_draw_quad(video_info, 0, 0, video_info->width, video_info->height, video_info->width, video_info->height, menu_widgets_backdrop);
} |
functions | void menu_widgets_draw_load_content_animation(video_frame_info_t *video_info)
{
/* TODO: scale this right ? (change metrics) */
int icon_size = (int) load_content_animation_icon_size;
uint32_t text_alpha = load_content_animation_fade_alpha * 255.0f;
uint32_t text_color = COLOR_TEXT_ALPHA(0xB8B8B80... |
functions | void menu_widgets_frame(video_frame_info_t *video_info)
{
size_t i;
int top_right_x_advance = video_info->width;
settings_t *settings = config_get_ptr();
menu_widgets_frame_count++;
menu_display_set_viewport(video_info->width, video_info->height);
/* Font setup */
font_driver_bind_block(font_re... |
functions | else if (volume_percent <= 1.0f)
{
if (volume_percent <= 0.5f)
volume_icon = menu_widgets_icons_textures[MENU_WIDGETS_ICON_VOLUME_MIN];
else
volume_icon = menu_widgets_icons_textures[MENU_WIDGETS_ICON_VOLUME_MED];
bar_background = volume_bar_background;
... |
functions | else if (volume_percent > 1.0f && volume_percent <= 2.0f)
{
volume_icon = menu_widgets_icons_textures[MENU_WIDGETS_ICON_VOLUME_MAX];
bar_background = volume_bar_normal;
bar_foreground = volume_bar_loud;
bar_percentage = volume_percent - 1.0f;
} |
functions | bool menu_widgets_init(bool video_is_threaded)
{
if (!menu_display_init_first_driver(video_is_threaded))
goto error;
menu_widgets_frame_count = 0;
msg_queue = fifo_new(MSG_QUEUE_PENDING_MAX * sizeof(menu_widget_msg_t*));
if (!msg_queue)
goto error;
current_msgs = (file_list_t*)calloc(1, s... |
functions | void menu_widgets_context_reset(bool is_threaded,
unsigned width, unsigned height)
{
int i;
char xmb_path[PATH_MAX_LENGTH];
char monochrome_png_path[PATH_MAX_LENGTH];
char menu_widgets_path[PATH_MAX_LENGTH];
char theme_path[PATH_MAX_LENGTH];
char ozone_path[PATH_MAX_LENGTH];
char font_path[PA... |
functions | void menu_widgets_context_destroy(void)
{
int i;
/* TODO: Dismiss onscreen notifications that have been freed */
/* Textures */
for (i = 0; i < MENU_WIDGETS_ICON_LAST; i++)
{
video_driver_texture_unload(&menu_widgets_icons_textures[i]);
} |
functions | void menu_widgets_achievement_free(void *userdata)
{
if (cheevo_title)
{
free(cheevo_title);
cheevo_title = NULL;
} |
functions | void menu_widgets_free(void)
{
size_t i;
menu_animation_ctx_tag libretro_tag;
/* Kill any pending animation */
menu_animation_kill_by_tag(&volume_tag);
menu_animation_kill_by_tag(&menu_widgets_generic_tag);
/* Purge everything from the fifo */
if (msg_queue)
{
while (fifo_read_avail(msg_... |
functions | void menu_widgets_volume_timer_end(void *userdata)
{
menu_animation_ctx_entry_t entry;
entry.cb = NULL;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &volume_alpha;
entry.tag = volume_tag;
entry.target_val... |
functions | void menu_widgets_volume_update_and_show(void)
{
settings_t *settings = config_get_ptr();
bool mute = *(audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE));
float new_volume = settings->floats.audio_volume;
menu_timer_ctx_entry_t entry;
menu_animation_kill_by_tag(&volume_tag);
volume_db ... |
functions | bool menu_widgets_set_fps_text(const char *new_fps_text)
{
strlcpy(menu_widgets_fps_text,
new_fps_text, sizeof(menu_widgets_fps_text));
return true;
} |
functions | int menu_widgets_ai_service_overlay_get_state()
{
return ai_service_overlay_state;
} |
functions | bool menu_widgets_ai_service_overlay_set_state(int state)
{
ai_service_overlay_state = state;
return true;
} |
functions | bool menu_widgets_ai_service_overlay_load(
char* buffer, unsigned buffer_len, enum image_type_enum image_type)
{
if (ai_service_overlay_state == 0)
{
bool res;
res = menu_display_reset_textures_list_buffer(
&ai_service_overlay_texture,
TEXTURE_FILTER_MIPMAP_LINEA... |
functions | void menu_widgets_ai_service_overlay_unload()
{
if (ai_service_overlay_state == 1)
{
video_driver_texture_unload(&ai_service_overlay_texture);
ai_service_overlay_state = 0;
} |
functions | void menu_widgets_screenshot_fadeout(void *userdata)
{
menu_animation_ctx_entry_t entry;
entry.cb = NULL;
entry.duration = SCREENSHOT_DURATION_OUT;
entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &screenshot_alpha;
entry.tag = menu_widgets_generic_tag;
e... |
functions | void menu_widgets_play_screenshot_flash(void)
{
menu_animation_ctx_entry_t entry;
entry.cb = menu_widgets_screenshot_fadeout;
entry.duration = SCREENSHOT_DURATION_IN;
entry.easing_enum = EASING_IN_QUAD;
entry.subject = &screenshot_alpha;
entry.tag = menu_widgets... |
functions | void menu_widgets_screenshot_taken(const char *shotname, const char *filename)
{
menu_widgets_play_screenshot_flash();
strlcpy(screenshot_filename, filename, sizeof(screenshot_filename));
strlcpy(screenshot_shotname, shotname, sizeof(screenshot_shotname));
} |
functions | void menu_widgets_end_load_content_animation(void *userdata)
{
#if 0
task_load_content_resume(); /* TODO: Restore that */
#endif
} |
functions | void menu_widgets_cleanup_load_content_animation(void)
{
load_content_animation_running = false;
free(load_content_animation_content_name);
} |
functions | void menu_widgets_start_load_content_animation(const char *content_name, bool remove_extension)
{
/* TODO: finish the animation based on design, correct all timings */
/* TODO: scale the icon correctly */
menu_animation_ctx_entry_t entry;
menu_timer_ctx_entry_t timer_entry;
int i;
float icon_color[16... |
functions | void menu_widgets_achievement_dismiss(void *userdata)
{
menu_animation_ctx_entry_t entry;
/* Slide up animation */
entry.cb = menu_widgets_achievement_free;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &cheevo_y;
en... |
functions | void menu_widgets_achievement_fold(void *userdata)
{
menu_animation_ctx_entry_t entry;
/* Fold */
entry.cb = menu_widgets_achievement_dismiss;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &cheevo_unfold;
entry.tag ... |
functions | void menu_widgets_achievement_unfold(void *userdata)
{
menu_animation_ctx_entry_t entry;
menu_timer_ctx_entry_t timer;
/* Unfold */
entry.cb = NULL;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &cheevo_unfold;
en... |
functions | void menu_widgets_start_achievement_notification()
{
settings_t *settings = config_get_ptr();
menu_animation_ctx_entry_t entry;
cheevo_height = settings->floats.video_font_size * 4;
cheevo_width = MAX(
font_driver_get_message_width(font_regular, msg_hash_to_str(MSG_ACHIEVEMENT_UNLOCKED), 0, 1),
... |
functions | void menu_widgets_get_badge_texture(menu_texture_item *tex, const char *badge)
{
char badge_file[16];
char fullpath[PATH_MAX_LENGTH];
if (!badge)
{
*tex = 0;
return;
} |
functions | void menu_widgets_push_achievement(const char *title, const char *badge)
{
menu_widgets_achievement_free(NULL);
/* TODO: Make a queue of notifications to display */
cheevo_title = strdup(title);
menu_widgets_get_badge_texture(&cheevo_badge, badge);
menu_widgets_start_achievement_notification();
} |
functions | void menu_widgets_generic_message_fadeout(void *userdata)
{
menu_animation_ctx_tag tag = (uintptr_t) &generic_message_timer;
menu_animation_ctx_entry_t entry;
/* Start fade out animation */
entry.cb = NULL;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASING... |
functions | void menu_widgets_set_message(char *msg)
{
menu_animation_ctx_tag tag = (uintptr_t) &generic_message_timer;
menu_timer_ctx_entry_t timer;
strlcpy(generic_message, msg, GENERIC_MESSAGE_SIZE);
generic_message_alpha = DEFAULT_BACKDROP;
/* Kill and restart the timer / animation */
menu_timer_kill(&gene... |
functions | void menu_widgets_libretro_message_fadeout(void *userdata)
{
menu_animation_ctx_tag tag = (uintptr_t) &libretro_message_timer;
menu_animation_ctx_entry_t entry;
/* Start fade out animation */
entry.cb = NULL;
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
entry.easing_enum = EASI... |
functions | void menu_widgets_set_libretro_message(const char *msg, unsigned duration)
{
menu_animation_ctx_tag tag = (uintptr_t) &libretro_message_timer;
menu_timer_ctx_entry_t timer;
strlcpy(libretro_message, msg, LIBRETRO_MESSAGE_SIZE);
libretro_message_alpha = DEFAULT_BACKDROP;
/* Kill and restart the timer /... |
includes |
#include <stdio.h> |
includes | #include <ctype.h> |
defines |
#define LTYPESTR "\n#ifndef YYLTYPE\ntypedef\n struct yyltype\n\ |
functions | else if (c == '\n')
{
lineno++;
putc(c, fattrs1);
c = getc(finput);
} |
functions | else if (token == IDENTIFIER)
{
if (symval->class == what_is_not)
fatals("symbol %s redefined", symval->tag);
symval->class = what_is;
if (what_is == SNTERM)
symval->value = nvars++;
if (typename)
{
if (symval->type_name == NULL)
symval->type_name = typename;
... |
functions | else if (prev == IDENTIFIER && token == NUMBER)
{
symval->user_token_number = numval;
translations = 1;
} |
functions | else if (c == '\n')
{
lineno++;
putc(c, fguard);
c = getc(finput);
} |
functions | else if (c == '=')
{
c = getc(finput);
if (c = '{')
copy_action(rule, stack_offset);
} |
functions | else if (c == '\n')
{
lineno++;
putc(c, faction);
c = getc(finput);
} |
functions | else if (t == LEFT_CURLY)
{
if (actionflag) fatal("two actions at end of one rule");
copy_action(crule, rulelength);
t = lex();
} |
functions | else if(!xactions && first_rhs && lhs->type_name!=first_rhs->type_name) {
if(lhs->type_name == 0 || first_rhs->type_name == 0 ||
strcmp(lhs->type_name,first_rhs->type_name))
fprintf(stderr,"%s:%d: warning: type clash ('%s' '%s') on default action\n",
infile,lineno,lhs->t... |
functions | else if (t == TOKEN)
{
parse_token_decl(STOKEN, SNTERM);
t = lex();
} |
functions | else if (t == NTERM)
{
parse_token_decl(SNTERM, STOKEN);
t = lex();
} |
functions | else if (t == TYPE)
{
t = get_type();
} |
functions | else if (t == UNION)
{
parse_union_decl();
t = lex();
} |
functions | else if (t == START)
{
parse_start_decl();
t = lex();
} |
functions | int
get_type()
{
register int k;
register int t;
register char *name;
extern char token_buffer[];
t = lex();
if (t != TYPENAME)
fatal("ill-formed %type declaration");
k = strlen(token_buffer);
name = NEW2(k + 1, char);
strcpy(name, token_buffer);
for (;;)
{
t = lex();
switc... |
includes | #include <stdarg.h> |
includes |
#include <ox/linkage.h> |
includes | #include <ox/error_rpt.h> |
includes |
#include <ox/lib/printk.h> |
includes | #include <ox/lib/vsprintk.h> |
includes |
#include <drivers/chara/console.h> |
functions | int
printk(const char *message,...)
{
static char buf[MAX_BUFFER];
int count = 0;
va_list param;
memset(buf,0x0,MAX_BUFFER);
va_start (param,message);
count = vsprintk (buf,message,param);
va_end (param);
console_write(buf);
return (count);
} |
functions | int
sprintk(char *buf, const char *message,...)
{
int count = 0, i = 0;
va_list param;
if(buf) {
*buf = 0x0;
} |
functions | void print_reg(unsigned int reg)
{
printk(" register [%d]\n", reg);
} |
includes | #include <stdint.h> |
includes | #include <stdlib.h> |
includes | #include <unistd.h> |
includes | #include <string.h> |
includes | #include <limits.h> |
includes | #include <errno.h> |
includes |
#include <sys/types.h> |
includes | #include <sys/inotify.h> |
includes | #include <linux/joystick.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.