Skip to content

Commit

Permalink
Remove redudant dependencies on opl´s frontend.
Browse files Browse the repository at this point in the history
Remove hack code inside of sound.c
  • Loading branch information
Wolf3s committed Jan 1, 2025
1 parent 9334294 commit f3792c7
Show file tree
Hide file tree
Showing 37 changed files with 41 additions and 135 deletions.
2 changes: 0 additions & 2 deletions include/appsupport.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef __APP_SUPPORT_H
#define __APP_SUPPORT_H

#include "include/iosupport.h"

#define APP_MODE_UPDATE_DELAY 240

#define APP_TITLE_MAX 128
Expand Down
4 changes: 0 additions & 4 deletions include/bdmsupport.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#ifndef __BDM_SUPPORT_H
#define __BDM_SUPPORT_H

#include "include/iosupport.h"

#define BDM_MODE_UPDATE_DELAY MENU_UPD_DELAY_GENREFRESH

#include "include/mcemu.h"

typedef struct
{
int active; /* Activation flag */
Expand Down
9 changes: 0 additions & 9 deletions include/cheatman.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@
#ifndef _CHEATMAN_H_
#define _CHEATMAN_H_

#include "opl.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <fcntl.h>
#include <malloc.h>
#include <ctype.h>
#include <string.h>

#define CHEAT_VERSION "0.5.3.7"

#define MAX_HOOKS 5
Expand Down
2 changes: 0 additions & 2 deletions include/dia.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef __DIA_H
#define __DIA_H

#include "include/opl.h"

// UI dialog item definition
typedef enum {
// terminates the definition of dialog. Mandatory
Expand Down
3 changes: 0 additions & 3 deletions include/ethsupport.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#ifndef __ETH_SUPPORT_H
#define __ETH_SUPPORT_H

#include "include/iosupport.h"

#define ETH_MODE_UPDATE_DELAY 300

#include "include/mcemu.h"
typedef struct
{
int active; /* Activation flag */
Expand Down
6 changes: 0 additions & 6 deletions include/gui.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#ifndef __GUI_H
#define __GUI_H

#include "include/iosupport.h"
#include "include/opl.h"
#include "include/texcache.h"
#include "include/dialogs.h"
#include "include/menu.h"

typedef enum {
// Informs gui that init is over and main gui can be rendered
GUI_INIT_DONE = 1,
Expand Down
2 changes: 2 additions & 0 deletions include/hdd.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef __HDD_H
#define __HDD_H

#include <hdd-ioctl.h>

typedef struct
{
u32 start; // Sector address
Expand Down
2 changes: 0 additions & 2 deletions include/hddsupport.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef __HDD_SUPPORT_H
#define __HDD_SUPPORT_H

#include "include/iosupport.h"
#include "include/hdd.h"

#define HDD_MODE_UPDATE_DELAY MENU_UPD_DELAY_NOUPDATE
Expand Down Expand Up @@ -38,7 +37,6 @@ typedef struct
u32 length;
} apa_subs;

#include "include/mcemu.h"
typedef struct
{
int active; /* Activation flag */
Expand Down
1 change: 0 additions & 1 deletion include/menu.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef __MENUSYS_H
#define __MENUSYS_H

#include "include/config.h"
#include "include/dia.h"

typedef struct menu_hint_item
Expand Down
28 changes: 2 additions & 26 deletions include/opl.h
Original file line number Diff line number Diff line change
@@ -1,49 +1,25 @@
#ifndef __OPL_H
#define __OPL_H

#include <tamtypes.h>
#include <kernel.h>
#include <sifrpc.h>
#include <hdd-ioctl.h>
#include "opl-hdd-ioctl.h"
#include <iopcontrol.h>
#include <iopheap.h>
#include <string.h>
#include <loadfile.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <sbv_patches.h>
#include <libcdvd.h>
#include <libpad.h>
#include <libmc.h>
#include <netman.h>
#include <ps2ips.h>
#include <debug.h>
#include <gsKit.h>
#include <dmaKit.h>
#include <malloc.h>
#include <math.h>
#include <osd_config.h>
#include <libpwroff.h>
#include <usbhdfsd-common.h>
#include <smod.h>
#include <smem.h>
#include <debug.h>
#include <ps2smb.h>
#include "config.h"

#include "include/iosupport.h"
#include "include/mcemu.h"
#include "include/hddsupport.h"
#include "include/supportbase.h"
#include "include/bdmsupport.h"

// Last Played Auto Start
#include <time.h>

// Master password for disabling the parental lock.
#define OPL_PARENTAL_LOCK_MASTER_PASS "989765"

Expand Down
2 changes: 0 additions & 2 deletions include/system.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef __SYSTEM_H
#define __SYSTEM_H

#include "include/mcemu.h"

#define SYS_LOAD_MC_MODULES 0x01
#define SYS_LOAD_USB_MODULES 0x02
#define SYS_LOAD_ISOFS_MODULE 0x04
Expand Down
2 changes: 0 additions & 2 deletions include/texcache.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef __TEX_CACHE_H
#define __TEX_CACHE_H

#include "include/iosupport.h"

/// A single cache entry...
typedef struct
{
Expand Down
11 changes: 2 additions & 9 deletions src/OSDHistory.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,10 @@
However, OPL does not need any of that, so it can be made simpler. */

#include <errno.h>
#include <kernel.h>

#include <libcdvd.h>
#include <limits.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/fcntl.h>
#include <sys/unistd.h>
#include <libmc.h>
#include <libmc-common.h>
#include "include/opl.h"

#include "include/util.h"
#include "include/OSDHistory.h"
Expand Down
4 changes: 0 additions & 4 deletions src/appsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#include "include/ioman.h"
#include "include/util.h"

#include "include/bdmsupport.h"
#include "include/ethsupport.h"
#include "include/hddsupport.h"

#include <elf-loader.h>

static int appForceUpdate = 1;
Expand Down
2 changes: 0 additions & 2 deletions src/atlas.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Review OpenUsbLd README & LICENSE files for further details.
*/

#include <stdio.h>
#include <malloc.h>
#include "include/opl.h"
#include "include/atlas.h"
#include "include/renderman.h"
Expand Down
3 changes: 1 addition & 2 deletions src/bdmsupport.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "include/opl.h"
#include "include/lang.h"
#include "include/gui.h"
#include "include/supportbase.h"
#include "include/bdmsupport.h"
#include "include/util.h"
#include "include/themes.h"
#include "include/textures.h"
Expand All @@ -14,6 +12,7 @@
#include "modules/iopcore/common/cdvd_config.h"

#include <usbhdfsd-common.h>
#include "opl-hdd-ioctl.h"

#include <ps2sdkapi.h>
#define NEWLIB_PORT_AWARE
Expand Down
3 changes: 2 additions & 1 deletion src/cheatman.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
* $Id$
*/

#include <unistd.h>
#include "include/opl.h"
#include "include/cheatman.h"
#include "include/ioman.h"
#include <ctype.h>

static int gEnableCheat; // Enables PS2RD Cheat Engine - 0 for Off, 1 for On
static int gCheatMode; // Cheat Mode - 0 Enable all cheats, 1 Cheats selected by user
Expand Down
1 change: 0 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "include/util.h"
#include "include/ioman.h"
#include "include/sound.h"
#include <string.h>

// FIXME: We should not need this function.
// Use newlib's 'stat' to get GMT time.
Expand Down
2 changes: 1 addition & 1 deletion src/dia.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include "include/opl.h"
#include "include/dia.h"
#include "include/dialogs.h"
#include "include/gui.h"
#include "include/lang.h"
#include "include/pad.h"
Expand Down
5 changes: 1 addition & 4 deletions src/dialogs.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#include "include/dialogs.h"
#include "include/opl.h"
#include "include/dia.h"
#include "include/dialogs.h"
#include "include/lang.h"
#include "include/gui.h"
#include "include/guigame.h"

#include <stdio.h>

// Network Config Menu
struct UIItem diaNetConfig[] = {
{UI_LABEL, 0, 1, 1, -1, 0, 0, {.label = {NULL, _STR_NETCONFIG}}},
Expand Down
7 changes: 5 additions & 2 deletions src/ethsupport.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "include/opl.h"
#include "include/mcemu.h"
#include "include/lang.h"
#include "include/gui.h"
#include "include/supportbase.h"
#include "include/ethsupport.h"
#include "include/util.h"
#include "include/renderman.h"
#include "include/themes.h"
Expand All @@ -12,9 +11,13 @@
#include "include/extern_irx.h"
#include "include/cheatman.h"
#include "modules/iopcore/common/cdvd_config.h"
#include "include/ethsupport.h"

#define NEWLIB_PORT_AWARE
#include <fileXio_rpc.h> // fileXioDevctl(ethBase, SMB_***)
#include <netman.h>
#include <ps2ips.h>
#include <ps2smb.h>

#include "include/nbns.h"
#include "httpclient.h"
Expand Down
4 changes: 1 addition & 3 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

#include "include/opl.h"
#include "include/dialogs.h"
#include "include/gui.h"
#include "include/renderman.h"
#include "include/menu.h"
#include "include/fntsys.h"
#include "include/ioman.h"
#include "include/lang.h"
Expand All @@ -23,8 +23,6 @@
#include "include/sound.h"
#include "include/guigame.h"

#include <limits.h>
#include <stdlib.h>
#include <libvux.h>

// Last Played Auto Start
Expand Down
3 changes: 1 addition & 2 deletions src/guigame.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
*/

#include "include/opl.h"
#include "include/dialogs.h"
#include "include/gui.h"
#include "include/ioman.h"
#include "include/lang.h"
#include "include/pad.h"
#include "include/config.h"
#include "include/ethsupport.h"
#include "include/compatupd.h"
#include "include/cheatman.h"
#include "include/system.h"
Expand Down
2 changes: 2 additions & 0 deletions src/hdd.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

#include "include/opl.h"
#include "include/hdd.h"
#include "include/ioman.h"
#include "include/hddsupport.h"

#define NEWLIB_PORT_AWARE
#include <fileXio_rpc.h>
#include "opl-hdd-ioctl.h"

typedef struct // size = 1024
{
Expand Down
4 changes: 2 additions & 2 deletions src/hddsupport.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include "sys/fcntl.h"
#include "include/opl.h"
#include "include/lang.h"
#include "include/gui.h"
#include "include/supportbase.h"
#include "include/hddsupport.h"
#include "include/util.h"
#include "include/themes.h"
#include "include/textures.h"
Expand All @@ -18,6 +16,8 @@
#include <io_common.h> // FIO_MT_RDWR

#include <hdd-ioctl.h>
#include <libcdvd-common.h>
#include "opl-hdd-ioctl.h"

#define OPL_HDD_MODE_PS2LOGO_OFFSET 0x17F8

Expand Down
5 changes: 0 additions & 5 deletions src/ioman.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#include "include/opl.h"
#include "include/ioman.h"
#include <kernel.h>
#include <string.h>
#include <malloc.h>
#include <stdio.h>
#include <unistd.h>
#ifdef __EESIO_DEBUG
#include <sio.h>
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
*/

#include "include/opl.h"
#include "include/menu.h"
#include "include/iosupport.h"
#include "include/dia.h"
#include "include/renderman.h"
#include "include/fntsys.h"
#include "include/lang.h"
Expand Down
Loading

0 comments on commit f3792c7

Please sign in to comment.