Ich möchte folgende Strukturen nach XProfan umsetzen:
Code
typedef struct SDL_CDtrack {
Uint8 id; /**< Track number */
Uint8 type; /**< Data or audio track */
Uint16 unused;
Uint32 length; /**< Length, in frames, of this track */
Uint32 offset; /**< Offset, in frames, from start of disk */
} SDL_CDtrack;
/** This structure is only current as of the last call to SDL_CDStatus() */
typedef struct SDL_CD {
int id; /**< Private drive identifier */
CDstatus status; /**< Current drive status */
/** The rest of this structure is only valid if there's a CD in drive */
/*@{*/
int numtracks; /**< Number of tracks on disk */
int cur_track; /**< Current track position */
int cur_frame; /**< Current frame offset within current track */
SDL_CDtrack track[SDL_MAX_TRACKS+1];
/*@}*/
} SDL_CD;
Alles anzeigen
Die vererbte Strukture mit Array ist mir nicht ganz klar. Meine bisherige Umsetzung sieht wie folgt aus:
Code
Def SDL_MAX_TRACKS& = 99
Struct SDL_CDTRACK = id#(1), type#(1), unused%, length&, offset&
Struct SDL_CD = id&, status&, numtracks&, cur_track&, cur_frame&, SDL_CDTRACK(SDL_MAX_TRACKS& + 1)' <-- ??
Bei Erfolg sollte die Strukture SDL_CD eine größe von 1220 Bytes haben.
Wie setzt man das um?
Gruß
Thomas