mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-16 12:54:40 +00:00
[Audio 4/?] Build Samplebanks, match Audiotable (#2032)
* [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
This commit is contained in:
parent
c8ec6042e1
commit
d3b9ba17da
16 changed files with 1795 additions and 15 deletions
61
tools/audio/xml.h
Normal file
61
tools/audio/xml.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* 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
|
Loading…
Add table
Add a link
Reference in a new issue