Skip to content

Commit

Permalink
Move all bin2c frontend embeded to imports.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf3s committed Jan 1, 2025
1 parent f3792c7 commit 9d4e286
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 46 deletions.
175 changes: 175 additions & 0 deletions include/imports.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
#ifndef IMPORTS_H
#define IMPORTS_H

#define IMPORT_BIN2C(_n) \
extern void *_n[]; \
extern int size_##_n
// Try to keep this list alphabetical

/* Irx modules */

IMPORT_BIN2C(apemodpatch_irx);

IMPORT_BIN2C(audsrv_irx);

IMPORT_BIN2C(bdm_irx);

IMPORT_BIN2C(bdm_ata_cdvdman_irx);

IMPORT_BIN2C(bdm_cdvdman_irx);

IMPORT_BIN2C(bdm_mcemu_irx);

IMPORT_BIN2C(bdmevent_irx);

IMPORT_BIN2C(bdmfs_fatfs_irx);

IMPORT_BIN2C(bt_pademu_irx);

IMPORT_BIN2C(cdvdfsv_irx);

IMPORT_BIN2C(cleareffects_irx);

IMPORT_BIN2C(deci2_img);

IMPORT_BIN2C(drvtif_irx);

IMPORT_BIN2C(drvtif_ingame_irx);

IMPORT_BIN2C(ds34bt_irx);

IMPORT_BIN2C(ds34usb_irx);

IMPORT_BIN2C(filexio_irx);

IMPORT_BIN2C(genvmc_irx);

IMPORT_BIN2C(hdd_cdvdman_irx);

IMPORT_BIN2C(hdd_hdpro_cdvdman_irx);

IMPORT_BIN2C(lwnbdsvr_irx);

IMPORT_BIN2C(hdd_mcemu_irx);

IMPORT_BIN2C(hdpro_atad_irx);

IMPORT_BIN2C(httpclient_irx);

IMPORT_BIN2C(IEEE1394_bd_irx);

IMPORT_BIN2C(iLinkman_irx);

IMPORT_BIN2C(imgdrv_irx);

IMPORT_BIN2C(ingame_smstcpip_irx);

IMPORT_BIN2C(iomanx_irx);

IMPORT_BIN2C(ioptrap_irx);

IMPORT_BIN2C(isofs_irx);

IMPORT_BIN2C(iremsndpatch_irx);

IMPORT_BIN2C(libsd_irx);

IMPORT_BIN2C(mcman_irx);

IMPORT_BIN2C(mcserv_irx);

IMPORT_BIN2C(nbns_irx);

IMPORT_BIN2C(netman_irx);

IMPORT_BIN2C(f2techioppatch_irx);

IMPORT_BIN2C(padman_irx);

IMPORT_BIN2C(poweroff_irx);

IMPORT_BIN2C(ppctty_irx);

IMPORT_BIN2C(ps2atad_irx);

IMPORT_BIN2C(ps2dev9_irx);

IMPORT_BIN2C(ps2fs_irx);

IMPORT_BIN2C(ps2hdd_irx);

IMPORT_BIN2C(ps2ips_irx);

IMPORT_BIN2C(ps2ip_irx);

IMPORT_BIN2C(ps2link_irx);

IMPORT_BIN2C(resetspu_irx);

IMPORT_BIN2C(sio2man_irx);

IMPORT_BIN2C(mx4sio_bd_irx);

IMPORT_BIN2C(smap_irx);

IMPORT_BIN2C(smap_ingame_irx);

IMPORT_BIN2C(smb_mcemu_irx);

IMPORT_BIN2C(smb_cdvdman_irx);

IMPORT_BIN2C(smbinit_irx);

IMPORT_BIN2C(smbman_irx);

IMPORT_BIN2C(smsutils_irx);

IMPORT_BIN2C(tifinet_irx);

IMPORT_BIN2C(tifinet_ingame_irx);

IMPORT_BIN2C(udptty_irx);

IMPORT_BIN2C(udptty_ingame_irx);

IMPORT_BIN2C(udnl_irx);

IMPORT_BIN2C(usbd_irx);

IMPORT_BIN2C(usbmass_bd_irx);

IMPORT_BIN2C(usb_pademu_irx);

IMPORT_BIN2C(xhdd_irx);

/*-- Theme Sound Effects ----------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------*/
IMPORT_BIN2C(boot_adp);

IMPORT_BIN2C(bd_connect_adp);

IMPORT_BIN2C(bd_disconnect_adp);

IMPORT_BIN2C(cancel_adp);

IMPORT_BIN2C(confirm_adp);

IMPORT_BIN2C(cursor_adp);

IMPORT_BIN2C(message_adp);

IMPORT_BIN2C(transition_adp);

/* icon images */

IMPORT_BIN2C(icon_sys);

IMPORT_BIN2C(icon_icn);

/* OPL Config */
IMPORT_BIN2C(conf_theme_OPL_cfg);

/* Raw Font */
IMPORT_BIN2C(poeveticanew_raw);

#endif
2 changes: 1 addition & 1 deletion src/bdmsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "include/textures.h"
#include "include/ioman.h"
#include "include/system.h"
#include "include/extern_irx.h"
#include "include/imports.h"
#include "include/cheatman.h"
#include "include/sound.h"
#include "modules/iopcore/common/cdvd_config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "include/ethsupport.h"
#include "include/system.h"
#include "include/ioman.h"
#include "include/extern_irx.h"
#include "include/imports.h"

static u8 modulesLoaded = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/ethsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "include/textures.h"
#include "include/ioman.h"
#include "include/system.h"
#include "include/extern_irx.h"
#include "include/imports.h"
#include "include/cheatman.h"
#include "modules/iopcore/common/cdvd_config.h"
#include "include/ethsupport.h"
Expand Down
4 changes: 1 addition & 3 deletions src/fntsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
#include "include/utf8.h"
#include "include/util.h"
#include "include/atlas.h"
#include "include/imports.h"

#include <sys/types.h>
#include <ft2build.h>

#include FT_FREETYPE_H

extern void *poeveticanew_raw;
extern int size_poeveticanew_raw;

/// Maximal count of atlases per font
#define ATLAS_MAX 4
/// Atlas width in pixels
Expand Down
2 changes: 1 addition & 1 deletion src/hddsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "include/textures.h"
#include "include/ioman.h"
#include "include/system.h"
#include "include/extern_irx.h"
#include "include/imports.h"
#include "include/cheatman.h"
#include "modules/iopcore/common/cdvd_config.h"

Expand Down
4 changes: 2 additions & 2 deletions src/opl.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "include/config.h"
#include "include/util.h"
#include "include/compatupd.h"
#include "include/extern_irx.h"
#include "include/imports.h"
#include "httpclient.h"
#include "include/ethsupport.h"
#include "include/appsupport.h"
Expand Down Expand Up @@ -1493,7 +1493,7 @@ static int loadLwnbdSvr(void)
};
struct lwnbd_config config;

// deinit audio lib and background music while nbd server is running
// deint audio lib while nbd server is running
audioEnd();

// block all io ops, wait for the ones still running to finish
Expand Down
28 changes: 1 addition & 27 deletions src/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,12 @@
#include <vorbis/vorbisfile.h>
#pragma GCC diagnostic pop

#include "include/imports.h"
#include "include/sound.h"
#include "include/opl.h"
#include "include/ioman.h"
#include "include/themes.h"

/*-- Theme Sound Effects ----------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------*/

extern unsigned char boot_adp[];
extern unsigned int size_boot_adp;

extern unsigned char cancel_adp[];
extern unsigned int size_cancel_adp;

extern unsigned char confirm_adp[];
extern unsigned int size_confirm_adp;

extern unsigned char cursor_adp[];
extern unsigned int size_cursor_adp;

extern unsigned char message_adp[];
extern unsigned int size_message_adp;

extern unsigned char transition_adp[];
extern unsigned int size_transition_adp;

extern unsigned char bd_connect_adp[];
extern unsigned int size_bd_connect_adp;

extern unsigned char bd_disconnect_adp[];
extern unsigned int size_bd_disconnect_adp;

struct sfxEffect
{
const char *name;
Expand Down
2 changes: 1 addition & 1 deletion src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "include/ioprp.h"
#include "include/OSDHistory.h"
#include "include/renderman.h"
#include "include/extern_irx.h"
#include "include/imports.h"
#include "../ee_core/include/modules.h"
#include "include/pggsm.h"
#include "include/cheatman.h"
Expand Down
6 changes: 2 additions & 4 deletions src/themes.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
#include "include/lang.h"
#include "include/pad.h"
#include "include/sound.h"
#include "include/imports.h"

#define MENU_POS_V 50
#define HINT_HEIGHT 32
#define DECORATOR_SIZE 20

extern const char conf_theme_OPL_cfg;
extern u16 size_conf_theme_OPL_cfg;

theme_t *gTheme;

static int screenWidth;
Expand Down Expand Up @@ -1272,7 +1270,7 @@ static void thmLoad(const char *themePath)
if (!themePath) {
// No theme specified. Prepare and load the default theme.
themeConfig = configAlloc(0, NULL, NULL);
configReadBuffer(themeConfig, &conf_theme_OPL_cfg, size_conf_theme_OPL_cfg);
configReadBuffer(themeConfig, (const char *)&conf_theme_OPL_cfg, size_conf_theme_OPL_cfg);
} else {
snprintf(path, sizeof(path), "%sconf_theme.cfg", themePath);
themeConfig = configAlloc(0, NULL, path);
Expand Down
10 changes: 5 additions & 5 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
#include "include/util.h"
#include "include/ioman.h"
#include "include/system.h"
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <malloc.h>
#include <rom0_info.h>
#include "include/imports.h"
#include "include/hdd.h"

#include "../modules/isofs/zso.h"

extern int probed_fd;
extern u32 probed_lba;

extern void *icon_sys;
extern int size_icon_sys;
extern void *icon_icn;
extern int size_icon_icn;

static int mcID = -1;

void guiWarning(const char *text, int count);
Expand Down

0 comments on commit 9d4e286

Please sign in to comment.