Skip to content

Commit

Permalink
Update sdl2.c3i
Browse files Browse the repository at this point in the history
Finalise RWOps
Android not yet supported by C3

SDL2 is now complete
  • Loading branch information
Its-Kenta authored and lerno committed Jul 21, 2023
1 parent c558e88 commit 6607cc6
Showing 1 changed file with 37 additions and 46 deletions.
83 changes: 37 additions & 46 deletions libraries/sdl2.c3l/sdl2.c3i
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// sdl2.c3i
// Created 14/07/2023
// Updated 19/07/2023
// Updated 21/07/2023
// Originally created Kenta @ https://github.com/Its-Kenta

module sdl;
Expand Down Expand Up @@ -88,53 +88,44 @@ def WriteFn = fn long(RWops context, void* ptr, long size);
def CloseFn = fn int(RWops context);

struct RWops {
SizeFn* size;
SeekFn* seek;
ReadFn* read;
WriteFn* write;
CloseFn* close;
SizeFn size;
SeekFn seek;
ReadFn read;
WriteFn write;
CloseFn close;
uint type;
// union {
// #ifdef __ANDROID__
// struct
// {
// void *asset;
// } androidio;

// #elif defined(__WIN32__) || defined(__GDK__)
// struct
// {
// SDL_bool append;
// void *h;
// struct
// {
// void *data;
// size_t size;
// size_t left;
// } buffer;
// } windowsio;
// #endif

// struct
// {
// SDL_bool autoclose;
// void *fp;
// } stdio;

// struct
// {
// Uint8 *base;
// Uint8 *here;
// Uint8 *stop;
// } mem;

// struct
// {
// void *data1;
// void *data2;
// } unknown;
// } hidden;
union hidden {
// struct androidio @if(env::ANDROID) {
// void *asset;
// } Android not yet supported in C3

struct windowsio @if(env::WIN32) {
bool append;
void *h;
struct buffer {
void *data;
usz size;
usz left;
}
}

struct stdio {
bool autoclose;
void *fp;
}

struct mem {
char *base;
char *here;
char *stop;
}

struct unknown
{
void *data1;
void *data2;
}
}
}

def AudioFormat = int;
Expand Down

0 comments on commit 6607cc6

Please sign in to comment.