本文整理汇总了C++中resources_register_int函数的典型用法代码示例。如果您正苦于以下问题:C++ resources_register_int函数的具体用法?C++ resources_register_int怎么用?C++ resources_register_int使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resources_register_int函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: joy_arch_resources_init
int joy_arch_resources_init(void)
{
if (joyport_get_port_name(JOYPORT_1)) {
if (resources_register_int(joy1_resources_int) < 0) {
return -1;
}
}
if (joyport_get_port_name(JOYPORT_2)) {
if (resources_register_int(joy2_resources_int) < 0) {
return -1;
}
}
if (joyport_get_port_name(JOYPORT_3)) {
if (resources_register_int(joy3_resources_int) < 0) {
return -1;
}
}
if (joyport_get_port_name(JOYPORT_4)) {
if (resources_register_int(joy4_resources_int) < 0) {
return -1;
}
}
return 0;
}
示例2: output_text_init_resources
int output_text_init_resources(void)
{
output_select_t output_select;
output_select.output_name = "text";
output_select.output_open = output_text_open;
output_select.output_close = output_text_close;
output_select.output_putc = output_text_putc;
output_select.output_getc = output_text_getc;
output_select.output_flush = output_text_flush;
output_select_register(&output_select);
if (resources_register_string(resources_string) < 0) {
return -1;
}
if (machine_class != VICE_MACHINE_C64DTV
&& machine_class != VICE_MACHINE_PLUS4) {
if (resources_register_int(resources_int_userport) < 0) {
return -1;
}
}
return resources_register_int(resources_int);
}
示例3: drive_resources_init
int drive_resources_init(void)
{
unsigned int dnr;
drive_t *drive;
for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
drive = drive_context[dnr]->drive;
res_drive[0].name = lib_msprintf("Drive%iExtendImagePolicy", dnr + 8);
res_drive[0].value_ptr = (int *)&(drive->extend_image_policy);
res_drive[0].param = uint_to_void_ptr(dnr);
res_drive[1].name = lib_msprintf("Drive%iIdleMethod", dnr + 8);
res_drive[1].value_ptr = &(drive->idling_method);
res_drive[1].param = uint_to_void_ptr(dnr);
if (resources_register_int(res_drive) < 0) {
return -1;
}
lib_free((char *)(res_drive[0].name));
lib_free((char *)(res_drive[1].name));
}
return machine_drive_resources_init()
| resources_register_int(resources_int);
}
示例4: sfx_soundexpander_resources_init
int sfx_soundexpander_resources_init(void)
{
if (machine_class == VICE_MACHINE_VIC20) {
if (resources_register_int(resources_mascuerade_int) < 0) {
return -1;
}
}
return resources_register_int(resources_int);
}
示例5: joystick_init_resources
int joystick_init_resources(void)
{
resources_register_int(resources_int);
if (machine_class != VICE_MACHINE_PLUS4) {
resources_register_int(extra_resources_int);
}
return joystick_arch_init_resources();
}
示例6: drive_resources_init
int drive_resources_init(void)
{
unsigned int dnr;
drive_t *drive;
int has_iec;
switch (machine_class) {
case VICE_MACHINE_NONE:
case VICE_MACHINE_PET:
case VICE_MACHINE_CBM5x0:
case VICE_MACHINE_CBM6x0:
case VICE_MACHINE_VSID:
has_iec = 0;
break;
default:
has_iec = 1;
}
for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
drive = drive_context[dnr]->drive;
res_drive[0].name = lib_msprintf("Drive%iExtendImagePolicy", dnr + 8);
res_drive[0].value_ptr = (int *)&(drive->extend_image_policy);
res_drive[0].param = uint_to_void_ptr(dnr);
res_drive[1].name = lib_msprintf("Drive%iIdleMethod", dnr + 8);
res_drive[1].value_ptr = &(drive->idling_method);
res_drive[1].param = uint_to_void_ptr(dnr);
if (has_iec) {
res_drive_rtc[0].name = lib_msprintf("Drive%iRTCSave", dnr + 8);
res_drive_rtc[0].value_ptr = &(drive->rtc_save);
res_drive_rtc[0].param = uint_to_void_ptr(dnr);
if (resources_register_int(res_drive_rtc) < 0) {
return -1;
}
}
if (resources_register_int(res_drive) < 0) {
return -1;
}
lib_free((char *)(res_drive[0].name));
lib_free((char *)(res_drive[1].name));
if (has_iec) {
lib_free((char *)(res_drive_rtc[0].name));
}
}
return machine_drive_resources_init()
| resources_register_int(resources_int);
}
示例7: sid_resources_init
int sid_resources_init(void)
{
#if defined(HAVE_RESID) || defined(HAVE_RESID_DTV)
if (resources_register_int(resid_resources_int) < 0) {
return -1;
}
#endif
if (resources_register_int(stereo_resources_int) < 0) {
return -1;
}
return sid_common_resources_init();
}
示例8: tfe_resources_init
int tfe_resources_init(void)
{
if (resources_register_string(resources_string) < 0) {
return -1;
}
if (machine_class == VICE_MACHINE_VIC20) {
if (resources_register_int(resources_mascuerade_int) < 0) {
return -1;
}
}
return resources_register_int(resources_int);
}
示例9: cbm2_resources_init
int cbm2_resources_init(void)
{
if (resources_register_string(resources_string) < 0) {
return -1;
}
if (resources_register_int(resources_int) < 0) {
return -1;
}
if (resources_register_string(cbm5x0_resources_string) < 0) {
return -1;
}
return resources_register_int(cbm5x0_resources_int);
}
示例10: drive_resources_type_init
int drive_resources_type_init(unsigned int default_type)
{
unsigned int dnr, type;
drive_t *drive;
for (dnr = 0; dnr < DRIVE_NUM; dnr++) {
drive = drive_context[dnr]->drive;
if (dnr == 0) {
type = default_type;
} else {
type = DRIVE_TYPE_NONE;
}
res_drive_type[0].name = lib_msprintf("Drive%iType", dnr + 8);
res_drive_type[0].factory_value = (int)type;
res_drive_type[0].value_ptr = (int *)&(drive->type);
res_drive_type[0].param = uint_to_void_ptr(dnr);
if (resources_register_int(res_drive_type) < 0) {
return -1;
}
lib_free((char *)(res_drive_type[0].name));
}
return 0;
}
示例11: raster_resources_chip_init
int raster_resources_chip_init(const char *chipname, raster_t *raster,
struct video_chip_cap_s *video_chip_cap)
{
unsigned int i;
raster_resource_chip_t *raster_resource_chip;
raster_resource_chip = lib_calloc(1, sizeof(raster_resource_chip_t));
raster->raster_resource_chip = raster_resource_chip;
raster_resource_chip->raster = raster;
for (i = 0; rname_chip[i] != NULL; i++) {
resources_chip[i].name = util_concat(chipname, rname_chip[i], NULL);
resources_chip[i].value_ptr
= &(raster_resource_chip->video_cache_enabled);
resources_chip[i].param = (void *)raster_resource_chip;
}
raster->canvas = video_canvas_init();
if (resources_register_int(resources_chip) < 0) {
return -1;
}
for (i = 0; rname_chip[i] != NULL; i++) {
lib_free((char *)(resources_chip[i].name));
}
if (video_resources_chip_init(chipname, &raster->canvas, video_chip_cap) < 0) {
return -1;
}
return 0;
}
示例12: flash_trap_resources_init
int flash_trap_resources_init(void)
{
if (resources_register_string(resources_string) < 0)
return -1;
return resources_register_int(resources_int);
}
示例13: acia_resources_init
int acia_resources_init(void)
{
if (_acia_resources_init() < 0) {
return -1;
}
return resources_register_int(resources_i);
}
示例14: sidcart_resources_init
int sidcart_resources_init(void)
{
if (sid_resources_init() < 0) {
return -1;
}
return resources_register_int(sidcart_resources_int);
}
示例15: functionrom_resources_init
int functionrom_resources_init(void)
{
if (resources_register_string(resources_string) < 0)
return -1;
return resources_register_int(resources_int);
}