Initial PCem OpenGL 3.x renderer port

This commit is contained in:
Cacodemon345
2025-03-08 02:13:14 +06:00
parent 02df55185f
commit 86343327be
17 changed files with 2442 additions and 16 deletions

View File

@@ -157,6 +157,23 @@ find_entry(section_t *section, const char *name)
return (NULL);
}
int
ini_has_entry(ini_section_t self, const char *name)
{
section_t *section = (section_t *) self;
const entry_t *entry;
int value = 0;
if (section == NULL)
return 0;
entry = find_entry(section, name);
if (entry == NULL)
return 0;
return 1;
}
static int
entries_num(section_t *section)
{
@@ -593,6 +610,11 @@ ini_section_get_int(ini_section_t self, const char *name, int def)
if (entry == NULL)
return def;
if (stricmp(entry->data, "true") == 0)
return 1;
if (stricmp(entry->data, "false") == 0)
return 0;
sscanf(entry->data, "%i", &value);
return value;