Skip to content

Remove unused code from library_sdl.js. NFC #18986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 3 additions & 31 deletions src/library_sdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1845,18 +1845,6 @@ var LibrarySDL = {

SDL_SetError: function() {},

SDL_malloc__sig: 'ii',
SDL_malloc__deps: ['malloc'],
SDL_malloc: function(size) {
return _malloc(size);
},

SDL_free__sig: 'vi',
SDL_free__deps: ['free'],
SDL_free: function(ptr) {
_free(ptr);
},

SDL_CreateRGBSurface__deps: ['malloc', 'free'],
SDL_CreateRGBSurface__proxy: 'sync',
SDL_CreateRGBSurface__sig: 'iiiiiiiii',
Expand Down Expand Up @@ -1990,18 +1978,6 @@ var LibrarySDL = {
return 0;
},

SDL_BlitSurface__proxy: 'sync',
SDL_BlitSurface__sig: 'iiiii',
SDL_BlitSurface: function(src, srcrect, dst, dstrect) {
return SDL.blitSurface(src, srcrect, dst, dstrect, false);
},

SDL_BlitScaled__proxy: 'sync',
SDL_BlitScaled__sig: 'iiiii',
SDL_BlitScaled: function(src, srcrect, dst, dstrect) {
return SDL.blitSurface(src, srcrect, dst, dstrect, true);
},

zoomSurface: function(src, x, y, smooth) {
var srcData = SDL.surfaces[src];
var w = srcData.width * x;
Expand Down Expand Up @@ -2400,7 +2376,6 @@ var LibrarySDL = {
cleanup();
}
},
SDL_LoadBMP: 'IMG_Load',
SDL_LoadBMP_RW: 'IMG_Load_RW',

IMG_Load__deps: ['IMG_Load_RW', 'SDL_RWFromFile'],
Expand Down Expand Up @@ -2682,8 +2657,6 @@ var LibrarySDL = {
SDL_UnlockAudio: function() {},

SDL_CreateMutex: function() { return 0 },
SDL_LockMutex: function() {},
SDL_UnlockMutex: function() {},
SDL_mutexP: function() { return 0 },
SDL_mutexV: function() { return 0 },
SDL_DestroyMutex: function() {},
Expand Down Expand Up @@ -2931,9 +2904,9 @@ var LibrarySDL = {
Mix_ReserveChannels: function(num) {
SDL.channelMinimumNumber = num;
},
Mix_PlayChannel__proxy: 'sync',
Mix_PlayChannel__sig: 'iiii',
Mix_PlayChannel: function(channel, id, loops) {
Mix_PlayChannelTimed__proxy: 'sync',
Mix_PlayChannelTimed__sig: 'iiii',
Mix_PlayChannelTimed: function(channel, id, loops) {
// TODO: handle fixed amount of N loops. Currently loops either 0 or infinite times.

// Get the audio element associated with the ID
Expand Down Expand Up @@ -2984,7 +2957,6 @@ var LibrarySDL = {
audio.play();
return channel;
},
Mix_PlayChannelTimed: 'Mix_PlayChannel', // XXX ignore Timing

Mix_FadingChannel: function(channel) {
return 0; // MIX_NO_FADING, TODO
Expand Down