changeset 220:e79a93971d27

Cosmetic reorganization.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 27 Dec 2019 11:06:55 +0200
parents d4246534daad
children 8db9830e5d97
files sidlib.h
diffstat 1 files changed, 38 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/sidlib.h	Thu Dec 05 02:52:01 2019 +0200
+++ b/sidlib.h	Fri Dec 27 11:06:55 2019 +0200
@@ -16,12 +16,39 @@
 #endif
 
 
+//
 // Some constants
+//
 #define PSID_MAGIC_LEN    4
 #define PSID_STR_LEN      32
 #define PSID_BUFFER_SIZE  (1024 * 16)
 
 
+enum
+{
+    // Player flags
+    PSF_PLAYER_TYPE   = 0x01, // 0 = built-in, 1 = Compute! SIDPlayer MUS
+    PSF_PLAYSID_TUNE  = 0x02, // 0 = Real C64-compatible, 1 = PlaySID specific (v2NG)
+
+    // Video standard used (v2NG+)
+    PSF_CLOCK_UNKNOWN = 0x00,
+    PSF_CLOCK_PAL     = 0x01,
+    PSF_CLOCK_NTSC    = 0x02,
+    PSF_CLOCK_ANY     = 0x03,
+    PSF_CLOCK_MASK    = 0x03,
+
+    // SID model (v2NG+)
+    PSF_MODEL_UNKNOWN = 0x00,
+    PSF_MODEL_MOS6581 = 0x01,
+    PSF_MODEL_MOS8580 = 0x02,
+    PSF_MODEL_ANY     = 0x03,
+    PSF_MODEL_MASK    = 0x03,
+};
+
+
+//
+// Structures
+//
 typedef struct _SIDLibSLDBNode
 {
     th_md5hash_t    hash;       // MD5 hash-digest
@@ -70,42 +97,23 @@
 } PSIDHeader;
 
 
-enum
-{
-    PSF_PLAYER_TYPE   = 0x01, // 0 = built-in, 1 = Compute! SIDPlayer MUS
-    PSF_PLAYSID_TUNE  = 0x02, // 0 = Real C64-compatible, 1 = PlaySID specific (v2NG)
-
-    PSF_CLOCK_UNKNOWN = 0x00, // Video standard used (v2NG+)
-    PSF_CLOCK_PAL     = 0x01,
-    PSF_CLOCK_NTSC    = 0x02,
-    PSF_CLOCK_ANY     = 0x03,
-    PSF_CLOCK_MASK    = 0x03,
-
-    PSF_MODEL_UNKNOWN = 0x00, // SID model (v2NG+)
-    PSF_MODEL_MOS6581 = 0x01,
-    PSF_MODEL_MOS8580 = 0x02,
-    PSF_MODEL_ANY     = 0x03,
-    PSF_MODEL_MASK    = 0x03,
-};
-
-
 //
 // Functions
 //
-BOOL            si_read_sid_file(th_ioctx *ctx, PSIDHeader **ppsid, const BOOL newSLDB);
-void            si_free_sid_file(PSIDHeader *psid);
+BOOL             si_read_sid_file(th_ioctx *ctx, PSIDHeader **ppsid, const BOOL newSLDB);
+void             si_free_sid_file(PSIDHeader *psid);
 
-const char *    si_get_sid_clock_str(const int flags);
-const char *    si_get_sid_model_str(const int flags);
+const char *     si_get_sid_clock_str(const int flags);
+const char *     si_get_sid_model_str(const int flags);
 
-SIDLibSLDB *    si_sldb_new(void);
-int             si_sldb_read(th_ioctx *ctx, SIDLibSLDB *dbh);
-int             si_sldb_build_index(SIDLibSLDB *dbh);
-void            si_sldb_free(SIDLibSLDB *dbh);
-SIDLibSLDBNode *si_sldb_get_by_hash(SIDLibSLDB *dbh, th_md5hash_t hash);
+SIDLibSLDB *     si_sldb_new(void);
+int              si_sldb_read(th_ioctx *ctx, SIDLibSLDB *dbh);
+int              si_sldb_build_index(SIDLibSLDB *dbh);
+void             si_sldb_free(SIDLibSLDB *dbh);
+SIDLibSLDBNode * si_sldb_get_by_hash(SIDLibSLDB *dbh, th_md5hash_t hash);
 
-int si_sldb_read_bin(th_ioctx *ctx, SIDLibSLDB *dbh);
-int si_sldb_write_bin(th_ioctx *ctx, SIDLibSLDB *dbh);
+int              si_sldb_read_bin(th_ioctx *ctx, SIDLibSLDB *dbh);
+int              si_sldb_write_bin(th_ioctx *ctx, SIDLibSLDB *dbh);
 
 
 #ifdef __cplusplus