mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Post rom extractor changes
This commit is contained in:
parent
4473bfffe9
commit
a9611cadd0
13 changed files with 31 additions and 28 deletions
|
@ -636,7 +636,7 @@ static void newcam_set_pan(void) {
|
|||
newcam_pan_z = newcam_pan_z*(min(newcam_distance/newcam_distance_target,1));
|
||||
}
|
||||
|
||||
static void newcam_level_bounds() {
|
||||
static void newcam_level_bounds(void) {
|
||||
u8 hasMinY = FALSE;
|
||||
f32 minY = 0;
|
||||
get_area_minimum_y(&hasMinY, &minY);
|
||||
|
|
|
@ -160,7 +160,7 @@ static void decapitalize_string_sm64(u8 *str64) {
|
|||
}
|
||||
}
|
||||
|
||||
void *get_course_name_table() {
|
||||
void *get_course_name_table(void) {
|
||||
void **courseNameTbl = segmented_to_virtual(seg2_course_name_table);
|
||||
|
||||
#ifdef VERSION_EU
|
||||
|
@ -174,7 +174,7 @@ void *get_course_name_table() {
|
|||
return courseNameTbl;
|
||||
}
|
||||
|
||||
void *get_act_name_table() {
|
||||
void *get_act_name_table(void) {
|
||||
void **actNameTbl = segmented_to_virtual(seg2_act_name_table);
|
||||
|
||||
#ifdef VERSION_EU
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
void *get_course_name_table();
|
||||
void *get_act_name_table();
|
||||
void *get_course_name_table(void);
|
||||
void *get_act_name_table(void);
|
||||
const char *get_level_name_ascii(s16 courseNum, s16 levelNum, s16 areaIndex, s16 charCase);
|
||||
const u8 *get_level_name_sm64(s16 courseNum, s16 levelNum, s16 areaIndex, s16 charCase);
|
||||
const char *get_level_name(s16 courseNum, s16 levelNum, s16 areaIndex);
|
||||
|
|
|
@ -363,7 +363,7 @@ static void moderator_write(FILE* file) {
|
|||
|
||||
static struct QueuedFile *sQueuedEnableDynosPacksHead = NULL;
|
||||
|
||||
void enable_queued_dynos_packs() {
|
||||
void enable_queued_dynos_packs(void) {
|
||||
while (sQueuedEnableDynosPacksHead) {
|
||||
int packCount = dynos_pack_get_count();
|
||||
const char *path = sQueuedEnableDynosPacksHead->path;
|
||||
|
|
|
@ -124,8 +124,8 @@ extern unsigned int configDjuiScale;
|
|||
extern bool configGlobalPlayerModels;
|
||||
extern char configLastVersion[];
|
||||
|
||||
void enable_queued_mods();
|
||||
void enable_queued_dynos_packs();
|
||||
void enable_queued_mods(void);
|
||||
void enable_queued_dynos_packs(void);
|
||||
void configfile_load(void);
|
||||
void configfile_save(const char *filename);
|
||||
const char *configfile_name(void);
|
||||
|
|
|
@ -30,21 +30,21 @@ void djui_panel_main_create(struct DjuiBase* caller) {
|
|||
struct DjuiBase* body = djui_three_panel_get_body(panel);
|
||||
{
|
||||
struct DjuiImage* logo = djui_image_create(body, texture_coopdx_logo, 2048, 1024, 32);
|
||||
djui_base_set_size(&logo->base, 370.0f, 185.0f);
|
||||
djui_base_set_size(&logo->base, 500, 250);
|
||||
djui_base_set_alignment(&logo->base, DJUI_HALIGN_CENTER, DJUI_VALIGN_TOP);
|
||||
djui_base_set_location_type(&logo->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||
djui_base_set_location(&logo->base, 0, -50.0f);
|
||||
djui_base_set_location(&logo->base, 0, -70);
|
||||
|
||||
struct DjuiButton* button1 = djui_button_create(body, DLANG(MAIN, HOST), DJUI_BUTTON_STYLE_NORMAL, djui_panel_host_create);
|
||||
djui_base_set_location(&button1->base, 0, -30.0f);
|
||||
djui_base_set_location(&button1->base, 0, -60);
|
||||
djui_cursor_input_controlled_center(&button1->base);
|
||||
|
||||
struct DjuiButton* button2 = djui_button_create(body, DLANG(MAIN, JOIN), DJUI_BUTTON_STYLE_NORMAL, djui_panel_join_create);
|
||||
djui_base_set_location(&button2->base, 0, -30.0f);
|
||||
djui_base_set_location(&button2->base, 0, -60);
|
||||
struct DjuiButton* button3 = djui_button_create(body, DLANG(MAIN, OPTIONS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_options_create);
|
||||
djui_base_set_location(&button3->base, 0, -30.0f);
|
||||
djui_base_set_location(&button3->base, 0, -60);
|
||||
struct DjuiButton* button4 = djui_button_create(body, DLANG(MAIN, QUIT), DJUI_BUTTON_STYLE_BACK, djui_panel_main_quit);
|
||||
djui_base_set_location(&button4->base, 0, -30.0f);
|
||||
djui_base_set_location(&button4->base, 0, -60);
|
||||
}
|
||||
|
||||
// these two cannot co-exist for some reason
|
||||
|
|
|
@ -30,11 +30,11 @@ void loading_screen_set_segment_text(const char *text) {
|
|||
snprintf(gCurrLoadingSegment.str, 256, text);
|
||||
}
|
||||
|
||||
static void loading_screen_produce_frame_callback() {
|
||||
static void loading_screen_produce_frame_callback(void) {
|
||||
if (sLoading && !gCLIOpts.hideLoadingScreen) { djui_base_render(&sLoading->base); }
|
||||
}
|
||||
|
||||
static void loading_screen_produce_one_frame() {
|
||||
static void loading_screen_produce_one_frame(void) {
|
||||
produce_one_dummy_frame(loading_screen_produce_frame_callback);
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static void loading_screen_destroy(struct DjuiBase* base) {
|
|||
sLoading = NULL;
|
||||
}
|
||||
|
||||
void init_loading_screen() {
|
||||
void init_loading_screen(void) {
|
||||
struct LoadingScreen* load = calloc(1, sizeof(struct LoadingScreen));
|
||||
struct DjuiBase* base = &load->base;
|
||||
|
||||
|
@ -93,7 +93,7 @@ void init_loading_screen() {
|
|||
{
|
||||
// splash image
|
||||
struct DjuiImage* splashImage = djui_image_create(base, texture_coopdx_logo, 2048, 1024, 32);
|
||||
djui_base_set_size(&splashImage->base, 740.0f, 364.0f);
|
||||
djui_base_set_size(&splashImage->base, 1024, 512);
|
||||
djui_base_set_alignment(&splashImage->base, DJUI_HALIGN_CENTER, DJUI_VALIGN_CENTER);
|
||||
djui_base_set_location(&splashImage->base, 0, -100);
|
||||
|
||||
|
@ -111,7 +111,7 @@ void init_loading_screen() {
|
|||
djui_base_set_color(&text->base, 200, 200, 200, 255);
|
||||
djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_TOP);
|
||||
djui_text_set_font(text, gDjuiFonts[0]);
|
||||
djui_text_set_font_scale(text, gDjuiFonts[0]->defaultFontScale * 1.5f);
|
||||
djui_text_set_font_scale(text, gDjuiFonts[0]->defaultFontScale * 1.9f);
|
||||
|
||||
load->loadingDesc = text;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ void init_loading_screen() {
|
|||
sLoading = load;
|
||||
}
|
||||
|
||||
void loading_screen_reset() {
|
||||
void loading_screen_reset(void) {
|
||||
djui_base_destroy(&sLoading->base);
|
||||
djui_shutdown();
|
||||
alloc_display_list_reset();
|
||||
|
@ -139,7 +139,7 @@ void loading_screen_reset() {
|
|||
configWindow.settings_changed = true;
|
||||
}
|
||||
|
||||
void render_loading_screen() {
|
||||
void render_loading_screen(void) {
|
||||
if (!sLoading) { init_loading_screen(); }
|
||||
|
||||
// loading screen loop
|
||||
|
@ -153,7 +153,7 @@ void render_loading_screen() {
|
|||
loading_screen_reset();
|
||||
}
|
||||
|
||||
void render_rom_setup_screen() {
|
||||
void render_rom_setup_screen(void) {
|
||||
if (!sLoading) { init_loading_screen(); }
|
||||
|
||||
loading_screen_set_segment_text("No rom detected, drag & drop Super Mario 64 (U) [!].z64 on to this screen");
|
||||
|
|
|
@ -25,7 +25,7 @@ extern pthread_mutex_t gLoadingThreadMutex;
|
|||
extern bool gIsThreaded;
|
||||
|
||||
void loading_screen_set_segment_text(const char *text);
|
||||
void render_loading_screen();
|
||||
void render_rom_setup_screen();
|
||||
void render_loading_screen(void);
|
||||
void render_rom_setup_screen(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@ void convert_string_sm64_to_ascii(char *strAscii, const u8 *str64);
|
|||
struct CourseName *gReplacedActNameTable[COURSE_END];
|
||||
|
||||
// Save all vanilla act names and course names
|
||||
void smlua_text_utils_init() {
|
||||
void smlua_text_utils_init(void) {
|
||||
void **actNameTbl = get_act_name_table();
|
||||
void **courseNameTbl = get_course_name_table();
|
||||
char courseBuffer[50];
|
||||
|
|
|
@ -21,7 +21,7 @@ struct CourseName {
|
|||
|
||||
extern struct CourseName *gReplacedActNameTable[];
|
||||
|
||||
void smlua_text_utils_init();
|
||||
void smlua_text_utils_init(void);
|
||||
void smlua_text_utils_reset_all(void);
|
||||
void smlua_text_utils_dialog_replace(enum DialogId dialogId, u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str);
|
||||
void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, const char* act1, const char* act2, const char* act3, const char* act4, const char* act5, const char* act6);
|
||||
|
|
|
@ -71,7 +71,7 @@ inline static bool scan_path_for_rom(const char *dir) {
|
|||
}
|
||||
|
||||
extern "C" {
|
||||
bool main_rom_handler() {
|
||||
bool main_rom_handler(void) {
|
||||
if (scan_path_for_rom(sys_user_path())) { return true; }
|
||||
scan_path_for_rom(sys_exe_path());
|
||||
return gRomIsValid;
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
extern bool gRomIsValid;
|
||||
extern char gRomFilename[];
|
||||
|
||||
bool main_rom_handler();
|
||||
bool main_rom_handler(void);
|
||||
void rom_on_drop_file(const char *path);
|
||||
|
|
|
@ -22,6 +22,9 @@ if not os.path.exists('sound/samples/extended/'):
|
|||
print('Created extended soundbank folder, as it was missing')
|
||||
|
||||
def copy_dir(source, destinations):
|
||||
if not os.path.exists(source):
|
||||
return
|
||||
|
||||
for filename in os.listdir(source):
|
||||
if not filename.endswith('.aiff'):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue