mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-26 14:46:16 +00:00
d3b9ba17da
* [Audio 4/?] Build Samplebanks, match Audiotable * Fix some makefile formatting * Add missing scope in MARK chunk handling * Add comment to generate asm file when buffer bug data is emitted, remove duplicate CC4 definition * Adjust comment * SBCFLAGS * Remove unnecessary comments on notes_lut * Split build directories creation command into several to avoid it becoming too long * objcopy -j -> --only-section * Fix mkdir warning when extracted/VERSION/assets doesn't exist
61 lines
1.5 KiB
C
61 lines
1.5 KiB
C
/**
|
|
* SPDX-FileCopyrightText: Copyright (C) 2024 ZeldaRET
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
#ifndef XML_H
|
|
#define XML_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include <libxml/parser.h>
|
|
|
|
#define XMLSTR_TO_STR(s) ((const char *)(s))
|
|
|
|
typedef void (*xml_parser_func)(const char *, void *);
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
bool optional;
|
|
xml_parser_func parser_func;
|
|
size_t offset;
|
|
} xml_attr_spec[];
|
|
|
|
void
|
|
xml_parse_int(const char *value, void *out);
|
|
void
|
|
xml_parse_uint(const char *value, void *out);
|
|
void
|
|
xml_parse_s16(const char *value, void *out);
|
|
void
|
|
xml_parse_u8(const char *value, void *out);
|
|
void
|
|
xml_parse_s8(const char *value, void *out);
|
|
void
|
|
xml_parse_note_number(const char *value, void *out);
|
|
void
|
|
xml_parse_string(const char *value, void *out);
|
|
void
|
|
xml_parse_c_identifier(const char *value, void *out);
|
|
void
|
|
xml_parse_bool(const char *value, void *out);
|
|
void
|
|
xml_parse_float(const char *value, void *out);
|
|
void
|
|
xml_parse_double(const char *value, void *out);
|
|
|
|
void
|
|
xml_get_single_property(void *out, const xmlNodePtr node, const char *name, xml_parser_func parser);
|
|
|
|
void
|
|
xml_parse_node_by_spec(void *out, const xmlNodePtr node, const xml_attr_spec spec, size_t spec_length);
|
|
|
|
void
|
|
xml_print_tree(xmlDocPtr document);
|
|
|
|
#endif
|