forked from Popn_Tools/popnhax
Compare commits
47 Commits
Author | SHA1 | Date | |
---|---|---|---|
ceffcc049d | |||
b936ae00d3 | |||
c3f4f9b93e | |||
b282cfa8f4 | |||
44fddc67ee | |||
25fa51d831 | |||
11ee17f48b | |||
dc63a6df08 | |||
1f630edb10 | |||
c18656658c | |||
d1c1d8a13f | |||
0b88b1253d | |||
f0daa9e761 | |||
d6ca83d076 | |||
5e57926b58 | |||
e838d88269 | |||
ed6a3a23f0 | |||
badd6535b3 | |||
2dcc503eca | |||
94b7eb014d | |||
a7bf74962b | |||
f2320cdf07 | |||
30ba232511 | |||
de69af2d66 | |||
4f22fd29be | |||
2543d2632f | |||
46ec71b83b | |||
5f2a9d7bc0 | |||
75ca8ba050 | |||
06957c8340 | |||
2e94df0984 | |||
d0ea7fcc00 | |||
298842bd61 | |||
ea0d9487b2 | |||
a7d65e2c72 | |||
4761082536 | |||
7f146dc5e9 | |||
3c459addea | |||
a4a4e53da1 | |||
fd529834b5 | |||
0cb685ef4b | |||
dc987c46ac | |||
4706d117a1 | |||
2535fba8d6 | |||
ccf3a4c8f8 | |||
c3e8eb5f13 | |||
783dafbe97 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*:Zone.Identifier
|
8
Makefile
8
Makefile
@ -232,8 +232,8 @@ $$(dll_$1_$2_$3) $$(implib_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) \
|
|||||||
$(ccache) $$(toolchain_$1)gcc -shared $$(srcdir_$3)/$3.def \
|
$(ccache) $$(toolchain_$1)gcc -shared $$(srcdir_$3)/$3.def \
|
||||||
-o $$(dll_$1_$2_$3) -Wl,--out-implib,$$(implib_$1_$2_$3) \
|
-o $$(dll_$1_$2_$3) -Wl,--out-implib,$$(implib_$1_$2_$3) \
|
||||||
$$^ $$(ldflags_$3) $(optflags_$1)
|
$$^ $$(ldflags_$3) $(optflags_$1)
|
||||||
strip -s $$(dll_$1_$2_$3)
|
$$(toolchain_$1)strip -s $$(dll_$1_$2_$3)
|
||||||
ranlib $$(implib_$1_$2_$3)
|
$$(toolchain_$1)ranlib $$(implib_$1_$2_$3)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ exe_$1_$2_$3 := $$(bindir_$1_$2)/$3.exe
|
|||||||
$$(exe_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) $$(absdpl_$1_$2_$3) \
|
$$(exe_$1_$2_$3): $$(obj_$1_$2_$3) $$(abslib_$1_$2_$3) $$(absdpl_$1_$2_$3) \
|
||||||
| $$(bindir_$1_$2)
|
| $$(bindir_$1_$2)
|
||||||
$(ccache) $$(toolchain_$1)gcc -o $$@ $$^ $$(ldflags_$3) $(optflags_$1)
|
$(ccache) $$(toolchain_$1)gcc -o $$@ $$^ $$(ldflags_$3) $(optflags_$1)
|
||||||
strip -s $$@
|
$$(toolchain_$1)strip -s $$@
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ define t_import
|
|||||||
impdef_$1_$2_$3 ?= imports/import_$1_$2_$3.def
|
impdef_$1_$2_$3 ?= imports/import_$1_$2_$3.def
|
||||||
|
|
||||||
$$(bindir_$1_$2)/lib$3.a: $$(impdef_$1_$2_$3) | $$(bindir_$1_$2)
|
$$(bindir_$1_$2)/lib$3.a: $$(impdef_$1_$2_$3) | $$(bindir_$1_$2)
|
||||||
dlltool -l $$@ -d $$<
|
$$(toolchain_$1)dlltool -l $$@ -d $$<
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
22
Module.mk
22
Module.mk
@ -14,17 +14,15 @@ include popnhax/Module.mk
|
|||||||
#
|
#
|
||||||
|
|
||||||
zipdir := $(BUILDDIR)/zip
|
zipdir := $(BUILDDIR)/zip
|
||||||
|
popnhax_version := $(shell grep "define PROGRAM_VERSION" popnhax/dllmain.cc | cut -d'"' -f2)
|
||||||
|
|
||||||
$(zipdir)/:
|
$(BUILDDIR)/popnhax_$(popnhax_version).zip: \
|
||||||
mkdir -p $@
|
build/bin/avs2_1508-32/popnhax.dll
|
||||||
|
@echo ... $@
|
||||||
|
@mkdir -p $(zipdir)
|
||||||
|
@cp -a -p build/bin/avs2_1508-32/popnhax.dll $(zipdir)
|
||||||
|
@cp -r -a -p dist/popnhax/* $(zipdir)
|
||||||
|
@cd $(zipdir) \
|
||||||
|
&& zip -r ../popnhax_$(popnhax_version).zip ./*
|
||||||
|
|
||||||
$(BUILDDIR)/popnhax.zip: \
|
all: $(BUILDDIR)/popnhax_$(popnhax_version).zip
|
||||||
build/bin/avs2_1508-32/popnhax.dll \
|
|
||||||
dist/popnhax/popnhax.xml \
|
|
||||||
dist/popnhax/D3d9.dll \
|
|
||||||
dist/popnhax/ifs_hook.dll \
|
|
||||||
| $(zipdir)/
|
|
||||||
echo ... $@
|
|
||||||
zip -j $@ $^
|
|
||||||
|
|
||||||
all: $(BUILDDIR)/popnhax.zip
|
|
||||||
|
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system24/ms_ifs/cate_cc.png
vendored
Normal file
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system24/ms_ifs/cate_cc.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system25/ms_ifs/cate_cc.png
vendored
Normal file
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system25/ms_ifs/cate_cc.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system26/ms_ifs/cate_cc.png
vendored
Normal file
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system26/ms_ifs/cate_cc.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system27/ms_ifs/cate_cc.png
vendored
Normal file
BIN
dist/popnhax/data_mods/_popnhax_assets/tex/system27/ms_ifs/cate_cc.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
48
dist/popnhax/popnhax.xml
vendored
48
dist/popnhax/popnhax.xml
vendored
@ -5,6 +5,18 @@
|
|||||||
<patch_db __type="bool">0</patch_db>
|
<patch_db __type="bool">0</patch_db>
|
||||||
<!-- Force unlock music, charts, characters, and deco parts when applicable -->
|
<!-- Force unlock music, charts, characters, and deco parts when applicable -->
|
||||||
<force_unlocks __type="bool">0</force_unlocks>
|
<force_unlocks __type="bool">0</force_unlocks>
|
||||||
|
<!-- Put customs into their own category (0: no, 1: simple category with all customs, 2: subcategories by folder name) -->
|
||||||
|
<custom_categ __type="u8">2</custom_categ>
|
||||||
|
<!-- Prevent customs from showing up in version folders -->
|
||||||
|
<custom_exclude_from_version __type="bool">1</custom_exclude_from_version>
|
||||||
|
<!-- Prevent customs from showing up in level folders -->
|
||||||
|
<custom_exclude_from_level __type="bool">0</custom_exclude_from_level>
|
||||||
|
|
||||||
|
<!-- Other categories -->
|
||||||
|
<!-- Bring back score challenge in the game for servers supporting it (only for kaimei onwards) -->
|
||||||
|
<score_challenge __type="bool">0</score_challenge>
|
||||||
|
<!-- Handle favorites through data_mods/<game>.<friendID>.fav files (Note: allows UNLIMITED favorites as well as favorites without an account/server) -->
|
||||||
|
<local_favorites __type="bool">0</local_favorites>
|
||||||
|
|
||||||
<!-- Classic patches -->
|
<!-- Classic patches -->
|
||||||
<!-- Prevent crash on boot when using a different default audio source (aka HDMI audio patch) -->
|
<!-- Prevent crash on boot when using a different default audio source (aka HDMI audio patch) -->
|
||||||
@ -27,10 +39,6 @@
|
|||||||
<!-- quick_retire with pfree also enables quick retry: press numpad 8 during song or on result screen to retry (keep holding to skip option select) -->
|
<!-- quick_retire with pfree also enables quick retry: press numpad 8 during song or on result screen to retry (keep holding to skip option select) -->
|
||||||
<quick_retire __type="bool">0</quick_retire>
|
<quick_retire __type="bool">0</quick_retire>
|
||||||
|
|
||||||
<!-- Network features -->
|
|
||||||
<!-- Bring back score challenge in the game for servers supporting it (only for kaimei onwards) -->
|
|
||||||
<score_challenge __type="bool">0</score_challenge>
|
|
||||||
|
|
||||||
<!-- Audio offset -->
|
<!-- Audio offset -->
|
||||||
<!-- Offset the audio by x ms (negative plays audio earlier). This will disable keysounds -->
|
<!-- Offset the audio by x ms (negative plays audio earlier). This will disable keysounds -->
|
||||||
<audio_offset __type="s8">0</audio_offset>
|
<audio_offset __type="s8">0</audio_offset>
|
||||||
@ -49,7 +57,7 @@
|
|||||||
<hispeed_default_bpm __type="u16">0</hispeed_default_bpm>
|
<hispeed_default_bpm __type="u16">0</hispeed_default_bpm>
|
||||||
|
|
||||||
<!-- IIDX-like hard gauge (start with full gauge, instant fail if gauge drops to 0) -->
|
<!-- IIDX-like hard gauge (start with full gauge, instant fail if gauge drops to 0) -->
|
||||||
<!-- Gauge details: increment: +0.1% for each cool/great/good (like spicy gauge), decrement: -9% for each bad, or -4.5% if gauge <=30% ) -->
|
<!-- Gauge details: increment: +0.1% for each cool/great/good (like spicy gauge), decrement: -9% for each bad, or -4.5% if gauge <=30% (like IIDX) -->
|
||||||
<iidx_hard_gauge __type="bool">0</iidx_hard_gauge>
|
<iidx_hard_gauge __type="bool">0</iidx_hard_gauge>
|
||||||
<!-- Force full options by default (useful when no numpad is available) -->
|
<!-- Force full options by default (useful when no numpad is available) -->
|
||||||
<force_full_opt __type="bool">0</force_full_opt>
|
<force_full_opt __type="bool">0</force_full_opt>
|
||||||
@ -96,14 +104,16 @@
|
|||||||
======================================================================================== -->
|
======================================================================================== -->
|
||||||
|
|
||||||
<!-- Datecode and Multiboot -->
|
<!-- Datecode and Multiboot -->
|
||||||
<!-- Force a different datecode than the one found in ea3-config (yyyymmdd00) -->
|
<!-- Force a different datecode than the one found in ea3-config (yyyymmdd00), or use "auto" to let music limit decide for you if patch_db is on -->
|
||||||
<force_datecode __type="str"></force_datecode>
|
<force_datecode __type="str">auto</force_datecode>
|
||||||
<!-- Also apply force_datecode to network packets -->
|
<!-- Also apply force_datecode to network packets -->
|
||||||
<network_datecode __type="bool">1</network_datecode>
|
<network_datecode __type="bool">1</network_datecode>
|
||||||
<!-- Disable multiboot auto conf tuning (which takes place when using popn22_yyyymmddrr.dll format and an xml without force_datecode option) -->
|
<!-- Disable multiboot auto conf tuning (which takes place when using popn22_yyyymmddrr.dll format and an xml without another datecode in force_datecode) -->
|
||||||
<disable_multiboot __type="bool">0</disable_multiboot>
|
<disable_multiboot __type="bool">0</disable_multiboot>
|
||||||
|
|
||||||
<!-- Timing and lanes -->
|
<!-- Timing and lanes -->
|
||||||
|
<!-- Base visual offset (value will be added to the base SD (-60) and base HD (-76) values) -->
|
||||||
|
<base_offset __type="s8">0</base_offset>
|
||||||
<!-- Automatically play keysounds during songs -->
|
<!-- Automatically play keysounds during songs -->
|
||||||
<disable_keysounds __type="bool">0</disable_keysounds>
|
<disable_keysounds __type="bool">0</disable_keysounds>
|
||||||
<!-- Offset the keysounds by x ms (negative is earlier). With disable_keysounds, becomes an audio offset -->
|
<!-- Offset the keysounds by x ms (negative is earlier). With disable_keysounds, becomes an audio offset -->
|
||||||
@ -122,14 +132,30 @@
|
|||||||
<enhanced_polling_priority __type="s8">1</enhanced_polling_priority>
|
<enhanced_polling_priority __type="s8">1</enhanced_polling_priority>
|
||||||
|
|
||||||
<!-- Song db patches -->
|
<!-- Song db patches -->
|
||||||
<!-- Auto select patch file from data_mods folder (will detect datecode from ea3-config or force_datecode option) -->
|
<!-- Auto select patch file from data_mods folder based on music limit, or datecode otherwise (will detect datecode from ea3-config or force_datecode option) -->
|
||||||
<patch_xml_auto __type="bool">1</patch_xml_auto>
|
<patch_xml_auto __type="bool">1</patch_xml_auto>
|
||||||
<!-- Manually set XML file containing patches (requires patch_xml_auto to be disabled) -->
|
<!-- Manually set XML file containing patches (requires patch_xml_auto to be disabled) -->
|
||||||
<patch_xml_filename __type="str"></patch_xml_filename>
|
<patch_xml_filename __type="str"></patch_xml_filename>
|
||||||
<!-- Force the newly created buffers to be the same size as the original buffers -->
|
<!-- Force the newly created buffers to be the same size as the original buffers (not recommended) -->
|
||||||
<disable_expansions __type="bool">0</disable_expansions>
|
<disable_expansions __type="bool">0</disable_expansions>
|
||||||
<!-- Copy the new table information over top the old tables (automatically enables disable_expansions) -->
|
<!-- Copy the new table information over top the old tables (automatically enables disable_expansions) (not recommended) -->
|
||||||
<disable_redirection __type="bool">0</disable_redirection>
|
<disable_redirection __type="bool">0</disable_redirection>
|
||||||
|
<!-- Do not perform music limit checks for patch_xml_auto (not recommended) -->
|
||||||
|
<ignore_music_limit __type="bool">0</ignore_music_limit>
|
||||||
|
|
||||||
|
<!-- Custom category options -->
|
||||||
|
<!-- minimum songid for a song to be seen as "custom" -->
|
||||||
|
<custom_categ_min_songid __type="u16">4000</custom_categ_min_songid>
|
||||||
|
<!-- maximum songid for a song to be seen as "custom" (0 = no limit) -->
|
||||||
|
<custom_categ_max_songid __type="u16">0</custom_categ_max_songid>
|
||||||
|
<!-- Category title for customs -->
|
||||||
|
<custom_category_title __type="str">Customs</custom_category_title>
|
||||||
|
<!-- Format used for category title (in BM2DXFontScript format, refer to popnhax_tools documentation) -->
|
||||||
|
<custom_category_format __type="str">[ol:4][olc:d92f0d]%s</custom_category_format>
|
||||||
|
<!-- Format used for custom song titles on song select (Note: colors not working for kaimei and above, but rotation does, e.g. "* [rz:3]%s[/rz]" ) -->
|
||||||
|
<custom_track_title_format __type="str"></custom_track_title_format>
|
||||||
|
<!-- Optional secondary format used for older games only (Full colors supported, e.g. "[ol:4][olc:d92f0d]%s") -->
|
||||||
|
<custom_track_title_format2 __type="str"></custom_track_title_format2>
|
||||||
|
|
||||||
<!-- Translation -->
|
<!-- Translation -->
|
||||||
<!-- Disable .dict string replacements and .ips patches -->
|
<!-- Disable .dict string replacements and .ips patches -->
|
||||||
|
@ -14,4 +14,5 @@ srcpp_popnhax := \
|
|||||||
dllmain.cc \
|
dllmain.cc \
|
||||||
loader.cc \
|
loader.cc \
|
||||||
SearchFile.cc \
|
SearchFile.cc \
|
||||||
translation.cc
|
translation.cc \
|
||||||
|
custom_categs.cc
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
struct popnhax_config {
|
struct popnhax_config {
|
||||||
|
uint8_t game_version;
|
||||||
bool practice_mode;
|
bool practice_mode;
|
||||||
bool hidden_is_offset;
|
bool hidden_is_offset;
|
||||||
bool iidx_hard_gauge;
|
bool iidx_hard_gauge;
|
||||||
@ -14,6 +15,11 @@ struct popnhax_config {
|
|||||||
bool quick_retire;
|
bool quick_retire;
|
||||||
bool back_to_song_select;
|
bool back_to_song_select;
|
||||||
bool score_challenge;
|
bool score_challenge;
|
||||||
|
uint8_t custom_categ;
|
||||||
|
uint16_t custom_categ_min_songid;
|
||||||
|
uint16_t custom_categ_max_songid;
|
||||||
|
bool custom_exclude_from_version;
|
||||||
|
bool custom_exclude_from_level;
|
||||||
bool force_hd_timing;
|
bool force_hd_timing;
|
||||||
uint8_t force_hd_resolution;
|
uint8_t force_hd_resolution;
|
||||||
bool force_unlocks;
|
bool force_unlocks;
|
||||||
@ -26,12 +32,14 @@ struct popnhax_config {
|
|||||||
bool force_full_opt;
|
bool force_full_opt;
|
||||||
bool netvs_off;
|
bool netvs_off;
|
||||||
bool guidese_off;
|
bool guidese_off;
|
||||||
|
bool local_favorites;
|
||||||
|
|
||||||
bool patch_db;
|
bool patch_db;
|
||||||
bool disable_expansions;
|
bool disable_expansions;
|
||||||
bool disable_redirection;
|
bool disable_redirection;
|
||||||
bool disable_multiboot;
|
bool disable_multiboot;
|
||||||
bool patch_xml_auto;
|
bool patch_xml_auto;
|
||||||
|
bool ignore_music_limit;
|
||||||
char patch_xml_filename[MAX_PATH];
|
char patch_xml_filename[MAX_PATH];
|
||||||
char force_datecode[11];
|
char force_datecode[11];
|
||||||
bool network_datecode;
|
bool network_datecode;
|
||||||
@ -51,6 +59,11 @@ struct popnhax_config {
|
|||||||
uint8_t survival_gauge;
|
uint8_t survival_gauge;
|
||||||
bool survival_iidx;
|
bool survival_iidx;
|
||||||
bool survival_spicy;
|
bool survival_spicy;
|
||||||
|
int8_t base_offset;
|
||||||
|
char custom_category_title[16];
|
||||||
|
char custom_category_format[64];
|
||||||
|
char custom_track_title_format[64];
|
||||||
|
char custom_track_title_format2[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
1069
popnhax/custom_categs.cc
Normal file
1069
popnhax/custom_categs.cc
Normal file
File diff suppressed because it is too large
Load Diff
10
popnhax/custom_categs.h
Normal file
10
popnhax/custom_categs.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef __CUSTOM_CATEGS_H__
|
||||||
|
#define __CUSTOM_CATEGS_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "popnhax/config.h"
|
||||||
|
|
||||||
|
bool patch_custom_categs(const char *dllFilename, struct popnhax_config *config);
|
||||||
|
bool patch_local_favorites(const char *dllFilename, uint8_t version);
|
||||||
|
|
||||||
|
#endif
|
1417
popnhax/dllmain.cc
1417
popnhax/dllmain.cc
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "imports/avs.h"
|
#include "imports/avs.h"
|
||||||
#include "util/patch.h"
|
#include "util/patch.h"
|
||||||
|
#include "util/log.h"
|
||||||
#include "xmlhelper.h"
|
#include "xmlhelper.h"
|
||||||
|
|
||||||
#include "tableinfo.h"
|
#include "tableinfo.h"
|
||||||
@ -66,7 +67,7 @@ uint32_t add_chart(uint32_t cur_idx, uint8_t *folder, uint8_t *filename, int32_t
|
|||||||
uint32_t file_type, uint16_t used_keys, bool override_idx);
|
uint32_t file_type, uint16_t used_keys, bool override_idx);
|
||||||
|
|
||||||
void parse_charadb(const char *input_filename, const char *target);
|
void parse_charadb(const char *input_filename, const char *target);
|
||||||
void parse_musicdb(const char *input_filename, const char *target);
|
void parse_musicdb(const char *input_filename, const char *target, struct popnhax_config *config);
|
||||||
|
|
||||||
std::map<uint32_t, int8_t> chart_type_overrides;
|
std::map<uint32_t, int8_t> chart_type_overrides;
|
||||||
|
|
||||||
@ -818,7 +819,7 @@ void parse_charadb(const char *input_filename, const char *target) {
|
|||||||
free(config_xml);
|
free(config_xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parse_musicdb(const char *input_filename, const char *target) {
|
void parse_musicdb(const char *input_filename, const char *target, struct popnhax_config *config) {
|
||||||
if (!file_exists(input_filename)) {
|
if (!file_exists(input_filename)) {
|
||||||
printf("Couldn't find %s, skipping...\n", input_filename);
|
printf("Couldn't find %s, skipping...\n", input_filename);
|
||||||
return;
|
return;
|
||||||
@ -915,6 +916,18 @@ void parse_musicdb(const char *input_filename, const char *target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//force loading background for unilab
|
||||||
|
//m->mask |= 0x100;
|
||||||
|
|
||||||
|
if ( config->custom_categ
|
||||||
|
&& config->custom_exclude_from_version
|
||||||
|
&& idx >= config->custom_categ_min_songid
|
||||||
|
&& (config->custom_categ_max_songid == 0 || idx <= config->custom_categ_max_songid) )
|
||||||
|
{
|
||||||
|
m->cs_version = 0;
|
||||||
|
m->folder = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ((prop_chart = property_search(config_xml, prop, "charts/chart"))) {
|
if ((prop_chart = property_search(config_xml, prop, "charts/chart"))) {
|
||||||
for (; prop_chart != NULL; prop_chart = property_node_traversal(
|
for (; prop_chart != NULL; prop_chart = property_node_traversal(
|
||||||
prop_chart, TRAVERSE_NEXT_SEARCH_RESULT)) {
|
prop_chart, TRAVERSE_NEXT_SEARCH_RESULT)) {
|
||||||
@ -992,7 +1005,7 @@ void parse_musicdb(const char *input_filename, const char *target) {
|
|||||||
free(config_xml);
|
free(config_xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_databases(const char *target_datecode) {
|
void load_databases(const char *target_datecode, struct popnhax_config *config) {
|
||||||
|
|
||||||
SearchFile s;
|
SearchFile s;
|
||||||
printf("XML db files search...\n");
|
printf("XML db files search...\n");
|
||||||
@ -1013,11 +1026,11 @@ void load_databases(const char *target_datecode) {
|
|||||||
if ( strstr(result[i].c_str(), "musicdb") == NULL )
|
if ( strstr(result[i].c_str(), "musicdb") == NULL )
|
||||||
continue;
|
continue;
|
||||||
printf("(musicdb) Loading %s...\n", result[i].c_str());
|
printf("(musicdb) Loading %s...\n", result[i].c_str());
|
||||||
parse_musicdb(result[i].c_str(), target_datecode);
|
parse_musicdb(result[i].c_str(), target_datecode, config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void musichax_core_init(bool force_unlocks, bool is_expansion_allowed, bool is_redirection_allowed,
|
void musichax_core_init(struct popnhax_config *config,
|
||||||
char *target_datecode,
|
char *target_datecode,
|
||||||
|
|
||||||
char *base_data,
|
char *base_data,
|
||||||
@ -1036,6 +1049,10 @@ void musichax_core_init(bool force_unlocks, bool is_expansion_allowed, bool is_r
|
|||||||
|
|
||||||
uint64_t chara_size, uint64_t *new_chara_size, char *orig_chara_data,
|
uint64_t chara_size, uint64_t *new_chara_size, char *orig_chara_data,
|
||||||
uint8_t **new_chara_table) {
|
uint8_t **new_chara_table) {
|
||||||
|
bool force_unlocks = config->force_unlocks;
|
||||||
|
bool is_expansion_allowed = !config->disable_expansions;
|
||||||
|
bool is_redirection_allowed = !config->disable_redirection;
|
||||||
|
|
||||||
if (style_size > fontstyle_table_size) {
|
if (style_size > fontstyle_table_size) {
|
||||||
fontstyle_table_size = style_size;
|
fontstyle_table_size = style_size;
|
||||||
}
|
}
|
||||||
@ -1181,7 +1198,7 @@ void musichax_core_init(bool force_unlocks, bool is_expansion_allowed, bool is_r
|
|||||||
cur->chara_x, cur->chara_y, cur->unk1, cur->display_bpm, cur->hold_flags, true);
|
cur->chara_x, cur->chara_y, cur->unk1, cur->display_bpm, cur->hold_flags, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
load_databases((const char *)target_datecode);
|
load_databases((const char *)target_datecode, config);
|
||||||
|
|
||||||
// Add some filler charts to fix some bugs (hack)
|
// Add some filler charts to fix some bugs (hack)
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
#define __LOADER_H__
|
#define __LOADER_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "popnhax/config.h"
|
||||||
|
|
||||||
int8_t get_chart_type_override(uint8_t *, uint32_t, uint32_t);
|
int8_t get_chart_type_override(uint8_t *, uint32_t, uint32_t);
|
||||||
|
|
||||||
void musichax_core_init(bool force_unlocks, bool is_expansion_allowed, bool is_redirection_allowed,
|
void musichax_core_init(struct popnhax_config *config,
|
||||||
char *target_datecode, char *base_data, uint64_t music_size,
|
char *target_datecode, char *base_data, uint64_t music_size,
|
||||||
uint64_t *new_music_size, char *orig_music_data, uint8_t **new_music_table,
|
uint64_t *new_music_size, char *orig_music_data, uint8_t **new_music_table,
|
||||||
uint64_t chart_size, uint64_t *new_chart_size, char *orig_chart_data,
|
uint64_t chart_size, uint64_t *new_chart_size, char *orig_chart_data,
|
||||||
|
@ -73,3 +73,8 @@ int search(char *haystack, size_t haystack_size, const char *needle, size_t need
|
|||||||
int res = _search((unsigned char*) haystack, haystack_size, (const unsigned char *)needle, needle_size, orig_offset, 0);
|
int res = _search((unsigned char*) haystack, haystack_size, (const unsigned char *)needle, needle_size, orig_offset, 0);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int search_debug(char *haystack, size_t haystack_size, const char *needle, size_t needle_size, size_t orig_offset) {
|
||||||
|
int res = _search((unsigned char*) haystack, haystack_size, (const unsigned char *)needle, needle_size, orig_offset, 2);
|
||||||
|
return res;
|
||||||
|
}
|
@ -2,5 +2,6 @@
|
|||||||
#define __SEARCH_H__
|
#define __SEARCH_H__
|
||||||
|
|
||||||
int search(char *haystack, size_t haystack_size, const char *needle, size_t needle_size, size_t orig_offset);
|
int search(char *haystack, size_t haystack_size, const char *needle, size_t needle_size, size_t orig_offset);
|
||||||
|
int search_debug(char *haystack, size_t haystack_size, const char *needle, size_t needle_size, size_t orig_offset);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user