diff --git a/mod.SDL.ts b/mod.SDL.ts index 1954d5d..37eaa03 100644 --- a/mod.SDL.ts +++ b/mod.SDL.ts @@ -6,4 +6,5 @@ export * from "./src/SDL/events.ts"; export * from "./src/SDL/functionMacros.ts"; export * from "./src/SDL/functions.ts"; export * from "./src/SDL/pixels.ts"; +export * from "./src/SDL/rw.ts"; export * from "./src/SDL/structs.ts"; diff --git a/src/SDL/functions.ts b/src/SDL/functions.ts index ebcc83f..831b10c 100644 --- a/src/SDL/functions.ts +++ b/src/SDL/functions.ts @@ -58,7 +58,7 @@ import { import { AudioDeviceID } from "./audio.ts"; import { Event } from "./events.ts"; -import { RWMode /*, TimerID */ } from "./types.ts"; +import { RWMode } from "./rw.ts"; let _library: DynamicLibrary = null!; diff --git a/src/SDL/types.ts b/src/SDL/rw.ts similarity index 60% rename from src/SDL/types.ts rename to src/SDL/rw.ts index 558a558..8153b46 100644 --- a/src/SDL/types.ts +++ b/src/SDL/rw.ts @@ -1,5 +1,3 @@ -import { u16 } from "../types.ts"; - export type RWMode = | "a" | "a+" @@ -12,6 +10,4 @@ export type RWMode = | "rb" | "rb+" | "wb" - | "wb+"; - -// export type TimerID = int; + | "wb+"; \ No newline at end of file diff --git a/tools/codegen/SDL.ts b/tools/codegen/SDL.ts index a40ac71..cce3f93 100644 --- a/tools/codegen/SDL.ts +++ b/tools/codegen/SDL.ts @@ -19,11 +19,45 @@ const SDL_SRC_PATH = path.join(SRC_PATH, "SDL"); export async function codegenSDL(): Promise { await writeEnums(`${SDL_SRC_PATH}/enums.ts`, enums, []); - await writeEvents(`${SDL_SRC_PATH}/events.ts`, events, callbacks, enums, structs, opaqueStructs); - await writeStructs(`${SDL_SRC_PATH}/structs.ts`, callbacks, enums, structs, opaqueStructs); - await writeSymbols(`${SDL_SRC_PATH}/_symbols.ts`, functions, callbacks, enums, structs, opaqueStructs); - await writeCallbacksSymbols(`${SDL_SRC_PATH}/_callbacks.ts`, callbacks, enums, structs, opaqueStructs, []); - await writeCallbacks(`${SDL_SRC_PATH}/callbacks.ts`, callbacks, enums, structs, opaqueStructs, []); + await writeEvents( + `${SDL_SRC_PATH}/events.ts`, + events, + callbacks, + enums, + structs, + opaqueStructs + ); + await writeStructs( + `${SDL_SRC_PATH}/structs.ts`, + callbacks, + enums, + structs, + opaqueStructs + ); + await writeSymbols( + `${SDL_SRC_PATH}/_symbols.ts`, + functions, + callbacks, + enums, + structs, + opaqueStructs + ); + await writeCallbacksSymbols( + `${SDL_SRC_PATH}/_callbacks.ts`, + callbacks, + enums, + structs, + opaqueStructs, + [] + ); + await writeCallbacks( + `${SDL_SRC_PATH}/callbacks.ts`, + callbacks, + enums, + structs, + opaqueStructs, + [] + ); await writeFunctions( `${SDL_SRC_PATH}/functions.ts`, "SDL2", @@ -35,7 +69,7 @@ export async function codegenSDL(): Promise { [ `import { AudioDeviceID } from "./audio.ts"`, `import { Event } from "./events.ts";`, - `import { RWMode /*, TimerID */ } from "./types.ts";`, - ], + `import { RWMode } from "./rw.ts";`, + ] ); }