Couple of SDL things

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it,
    so

it’s stored in memory… I want to make an sdl surface from this, and
not

from a file on disk. Is there already a way to do this? If not, I can
write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I
haven’t

done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and
PNG

so far…

What do you mean with “load a BMP from memory”?
When you have the pixel data (and maybe palette data) in memory
(having read it from a gif file or whatever), you can simply blit it
to the screen with several memcpy()s, one for each line ('cause
pitch might not be width). The only advantage of loading it into a
SDL_Surface might be that it’s stored in video memory 'cause
hardware accelerated blits only work from video ram to video ram (right?)
However, that’s something special and should be tread specially
as well.
Tell me if I’m wrong!

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

That’s not the Right Way, though. Ideally, under X, SDL should be able to
use X fonts.
Allright, fonts are a little difficult but we don’t have to go mad here.
As we all know, X is not avaiable on most Windows platforms
so that is a teeny-weeny bit unportable :slight_smile: And though I don’t know
the X font format, it’s surely much too difficult to handle. Most of us
won’t need resizable fonts but a simple, readable and quite small
font.
What I did for jump is: I wrote a “font getter” that captures the letters
from a bitmap file and writes them in monochrome into its own
format. The message font is in fact Courier New. I don’t know if there’s
any (microsoft maybe) copyright on this…
If you like, I can hack a little font loader and putter for use with SDL
in so you can use it for whatever you want. BTW, a test chat
program is something I’m really looking forward to.

Hey, another (easier?) way would be to have a function in SDL that will
let you blit from an X drawable like a Pixmap. Then i can use
XDrawString() to write to the drawable and then blit the drawable to the
SDL surface…?
But XDrawString() is only avaiable on X and any SDL function
should be completely transparent to the underlying system.~~
Paulus Esterhazy (@Paulus_Esterhazy)

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it, so
    it’s stored in memory… I want to make an sdl surface from this, and not
    from a file on disk. Is there already a way to do this? If not, I can
    write one up and submit it, maybe tonight.

  2. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

  3. MIDI. has anyone looked at ‘timidity’? Software wavetable synth (or
    hardware on a GUS), for *nix or Win32 (already cross-platform). It does
    take over /dev/dsp, though, so it’d have to be integrated with SDL
    directly. Fortunately it’s LGPL.--------------------------------------------------
    Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
    Head of TurboLinux Development/Systems Administrator
    Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it, so
    it’s stored in memory… I want to make an sdl surface from this, and not
    from a file on disk. Is there already a way to do this? If not, I can
    write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I haven’t
done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and PNG
so far…

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

  1. MIDI. has anyone looked at ‘timidity’? Software wavetable synth (or
    hardware on a GUS), for *nix or Win32 (already cross-platform). It does
    take over /dev/dsp, though, so it’d have to be integrated with SDL
    directly. Fortunately it’s LGPL.

I looked at timidity a while back and dropped it as it was really complicated
and I wanted to get networking done. You are more than welcome to check it
out and submit it.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

I looked at timidity a while back and dropped it as it was really complicated
and I wanted to get networking done. You are more than welcome to check it
out and submit it.

Don’t waste your time on timidy. The OSS midi interface is simple, and I can’t
imagine the Win32 midi API, or any other OS-level MIDI API being difficult.

I don’t have time at the moment to do anything on MIDI, but when I free up some
time, I’ll see what I can come up with.On Tue, Nov 03, 1998 at 04:46:18PM -0800, Sam Lantinga wrote:


– Michael Samuel

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it, so
    it’s stored in memory… I want to make an sdl surface from this, and not
    from a file on disk. Is there already a way to do this? If not, I can
    write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I haven’t
done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and PNG
so far…

I’ll try to get the load from memory stuff done tonight, at least for
BMPs. Under Linux, you can use ImageMagick’s ‘convert’ program to convert
anything to a BMP, so other image formats (can be) irrelevant if you use
that.

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

That’s not the Right Way, though. Ideally, under X, SDL should be able to
use X fonts.

Hey, another (easier?) way would be to have a function in SDL that will
let you blit from an X drawable like a Pixmap. Then i can use
XDrawString() to write to the drawable and then blit the drawable to the
SDL surface…?On Tue, 3 Nov 1998, Sam Lantinga wrote:

  1. MIDI. has anyone looked at ‘timidity’? Software wavetable synth (or
    hardware on a GUS), for *nix or Win32 (already cross-platform). It does
    take over /dev/dsp, though, so it’d have to be integrated with SDL
    directly. Fortunately it’s LGPL.

I looked at timidity a while back and dropped it as it was really complicated
and I wanted to get networking done. You are more than welcome to check it
out and submit it.

See ya!
-Sam Lantinga (slouken at devolution.com)


Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

Can’t you use that little freetype thingie? I hacked a bit at the source to make it compile for the .9.6 version.On Tue, Nov 03, 1998 at 04:46:18PM -0800, Sam Lantinga wrote:


| ={) James (}= | Division of Continuing Education
| reddirt at dce.ksu.edu | Kansas State University

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

Can’t you use that little freetype thingie? I hacked a bit at the source to make it compile for the .9.6 version.

Of course you can. It looks much better than most bitmap or X11 fonts. :slight_smile:
The point though, is I don’t want to require any external libraries for
SDL demos except when the demo is showing off SDL with the external library.

See ya!
-Sam Lantinga (slouken at devolution.com)> On Tue, Nov 03, 1998 at 04:46:18PM -0800, Sam Lantinga wrote:


Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Sam Lantinga wrote:

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it, so
    it’s stored in memory… I want to make an sdl surface from this, and not
    from a file on disk. Is there already a way to do this? If not, I can
    write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I haven’t
done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and PNG
so far…

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

See the code from the Jump game. it has one. Will be implemented in the widget I
hope.>

  1. MIDI. has anyone looked at ‘timidity’? Software wavetable synth (or
    hardware on a GUS), for *nix or Win32 (already cross-platform). It does
    take over /dev/dsp, though, so it’d have to be integrated with SDL
    directly. Fortunately it’s LGPL.

I looked at timidity a while back and dropped it as it was really complicated
and I wanted to get networking done. You are more than welcome to check it
out and submit it.

See ya!
-Sam Lantinga (slouken at devolution.com)


Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/


Stephane Magnenat
stephane.magnenat at urbanet.ch

Dierk Ohlerich
@Dierk_Ohlerich----------

From: Sam Lantinga
To: sdl at surfnetcity.com.au
Subject: Re: [SDL] couple of SDL things…
Date: Mittwoch, 4. November 1998 01:46

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

Are ripped Amiga fonts ok? I guess not… Otherwise I got ton’s of them,
converted into a simple, handy format.
I also got a converter that creates a proportional font from a bitmap with
the letters on fixed position (8-Bit ANSI).

I should have a demonstration program ready after the weekend, containing
png to font converter, a selfmade, ugly sample font and an SDL program that
prints some text. Should be simple to convert the terminal fonts, too.

My format is:

bits
32 ‘F’ ‘O’ ‘N’ ‘T’ (magic longword)
32 Version, must be 0
32 Width of a bitmap in pixel containing all characters, aligned to 32
pixel boundary
32 Height of a bitmap in pixel containing all characters
32 first character present in font (usually 32 or 31)
32 last character present in font (usually 255)
32 charachter for all code outside the range (usually ‘?’ or 31)
32 Flags, set to 0
** (Width/32 * Height)*4 bytes of bitmap data, line by line
** (last-first)*8 bytes of letter structures
32 ‘f’ ‘o’ ‘n’ ‘t’ (magic longword)

letter structure:
32 X-Position in the bitmap (y is allways 0)
32 white space before letter
32 width of the bitmap data to copy
32 number of pixels to advance when printing the letter

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

Can’t you use that little freetype thingie? I hacked a bit at the source to make it compile for the .9.6 version.

Of course you can. It looks much better than most bitmap or X11 fonts. :slight_smile:
The point though, is I don’t want to require any external libraries for
SDL demos except when the demo is showing off SDL with the external library.

Awww, have you no sense of humor? ;>

Seriously though, I’d imagine that requiring the freetype lib isn’t that much of a big deal. It provides superior functionality to most anything else I’ve found. But that’s just my opinion.On Tue, Nov 03, 1998 at 11:56:57PM -0800, Sam Lantinga wrote:


| ={) James (}= | Division of Continuing Education
| reddirt at dce.ksu.edu | Kansas State University

What do you mean with “load a BMP from memory”?
When you have the pixel data (and maybe palette data) in memory
(having read it from a gif file or whatever), you can simply blit it
to the screen with several memcpy()s, one for each line ('cause
pitch might not be width). The only advantage of loading it into a
SDL_Surface might be that it’s stored in video memory 'cause
hardware accelerated blits only work from video ram to video ram (right?)
However, that’s something special and should be tread specially
as well.
Tell me if I’m wrong!

nah, I have a data structure with a member ‘void *gdata’. I just did:

fd=open(“filename.bmp”,O_RDONLY);
fstat(fd,&mystat);
gdata=malloc(mystat.st_size);
read(fd,gdata,mystat.st_size);

so now I have the file contents in memory. I’m pretty sure I can modify
the existing SDL function to handle this case pretty easily.
Handle what???
I don’t know
how useful it will be to people other than myself, but…

Sorry, I don’t understand what you want to tell me.
I can load a file into memory myself (although using fopen() / fread()
is better IMHO).
You sure you understood what I wanted to say or is my English
even worse that I thought…

  1. Handling text. There seems to be absolutely no way to do this.
    an

SDL surface isn’t recognized as a Drawable by X, so I can’t use
XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

That’s not the Right Way, though. Ideally, under X, SDL should be able
to

use X fonts.
Allright, fonts are a little difficult but we don’t have to go mad here.
As we all know, X is not avaiable on most Windows platforms
so that is a teeny-weeny bit unportable :slight_smile: And though I don’t know
the X font format, it’s surely much too difficult to handle. Most of us
won’t need resizable fonts but a simple, readable and quite small
font.

well, SDL would have to be able to use Windows fonts on windows, and X
fonts under X… but it’s making concessions like that anyway for using
X/MIT-SHM on X and DirectX on Windows…
Ha-ha. That was necessary to make SDL work under linux/windows.
Using system-dependent functions for putting fonts is not elegant,
not what we want and simply not possible - sorry.

What I did for jump is: I wrote a “font getter” that captures the letters
from a bitmap file and writes them in monochrome into its own
format. The message font is in fact Courier New. I don’t know if there’s
any (microsoft maybe) copyright on this…
If you like, I can hack a little font loader and putter for use with SDL
in so you can use it for whatever you want. BTW, a test chat
program is something I’m really looking forward to.

Hey, another (easier?) way would be to have a function in SDL that will
let you blit from an X drawable like a Pixmap. Then i can use
XDrawString() to write to the drawable and then blit the drawable to the
SDL surface…?
But XDrawString() is only avaiable on X and any SDL function
should be completely transparent to the underlying system.

Sure, it was just an example. SDL would only use XDrawString when used
under X - #ifdef WIN32, it uses something else.

Same thing here, system-dependent functions should not be used where it’s
not necessary and - even worse - where it’s impossible, as in this case.
Come on, Sam, tell him the truth!

~ Paulus Esterhazy (@Paulus_Esterhazy)

Sam Lantinga wrote:

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it, so
    it’s stored in memory… I want to make an sdl surface from this, and not
    from a file on disk. Is there already a way to do this? If not, I can
    write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I haven’t
done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and PNG
so far…

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

See the code from the Jump game. it has one. Will be implemented in the widget I
hope.

Where is this ‘Jump game’ located for download?On Wed, 4 Nov 1998, St?hane Magnenat wrote:


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

Dierk Ohlerich
d_ohlerich at vcc.de

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

Are ripped Amiga fonts ok? I guess not… Otherwise I got ton’s of them,
converted into a simple, handy format.
I also got a converter that creates a proportional font from a bitmap with
the letters on fixed position (8-Bit ANSI).

I should have a demonstration program ready after the weekend, containing
png to font converter, a selfmade, ugly sample font and an SDL program that
prints some text. Should be simple to convert the terminal fonts, too.

This all looks good to me… now, what about text INPUT, ie, if I want to
let someone type something in to the program and have it echo? I
implemented this once in DOS using Turbo Pascal, using a font that I drew
by hand, and by God it did work, but I no longer have the code… and it’s
in Pascal… :)On Wed, 4 Nov 1998, Dierk Ohlerich wrote:

From: Sam Lantinga
To: sdl at surfnetcity.com.au
Subject: Re: [SDL] couple of SDL things…
Date: Mittwoch, 4. November 1998 01:46

My format is:

bits
32 ‘F’ ‘O’ ‘N’ ‘T’ (magic longword)
32 Version, must be 0
32 Width of a bitmap in pixel containing all characters, aligned to 32
pixel boundary
32 Height of a bitmap in pixel containing all characters
32 first character present in font (usually 32 or 31)
32 last character present in font (usually 255)
32 charachter for all code outside the range (usually ‘?’ or 31)
32 Flags, set to 0
** (Width/32 * Height)*4 bytes of bitmap data, line by line
** (last-first)*8 bytes of letter structures
32 ‘f’ ‘o’ ‘n’ ‘t’ (magic longword)

letter structure:
32 X-Position in the bitmap (y is allways 0)
32 white space before letter
32 width of the bitmap data to copy
32 number of pixels to advance when printing the letter


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it,
    so

it’s stored in memory… I want to make an sdl surface from this, and
not

from a file on disk. Is there already a way to do this? If not, I can
write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I
haven’t

done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and
PNG

so far…

What do you mean with “load a BMP from memory”?
When you have the pixel data (and maybe palette data) in memory
(having read it from a gif file or whatever), you can simply blit it
to the screen with several memcpy()s, one for each line ('cause
pitch might not be width). The only advantage of loading it into a
SDL_Surface might be that it’s stored in video memory 'cause
hardware accelerated blits only work from video ram to video ram (right?)
However, that’s something special and should be tread specially
as well.
Tell me if I’m wrong!

nah, I have a data structure with a member ‘void *gdata’. I just did:

fd=open(“filename.bmp”,O_RDONLY);
fstat(fd,&mystat);
gdata=malloc(mystat.st_size);
read(fd,gdata,mystat.st_size);

so now I have the file contents in memory. I’m pretty sure I can modify
the existing SDL function to handle this case pretty easily. I don’t know
how useful it will be to people other than myself, but…

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

That’s not the Right Way, though. Ideally, under X, SDL should be able to
use X fonts.
Allright, fonts are a little difficult but we don’t have to go mad here.
As we all know, X is not avaiable on most Windows platforms
so that is a teeny-weeny bit unportable :slight_smile: And though I don’t know
the X font format, it’s surely much too difficult to handle. Most of us
won’t need resizable fonts but a simple, readable and quite small
font.

well, SDL would have to be able to use Windows fonts on windows, and X
fonts under X… but it’s making concessions like that anyway for using
X/MIT-SHM on X and DirectX on Windows…

What I did for jump is: I wrote a “font getter” that captures the letters
from a bitmap file and writes them in monochrome into its own
format. The message font is in fact Courier New. I don’t know if there’s
any (microsoft maybe) copyright on this…
If you like, I can hack a little font loader and putter for use with SDL
in so you can use it for whatever you want. BTW, a test chat
program is something I’m really looking forward to.

Hey, another (easier?) way would be to have a function in SDL that will
let you blit from an X drawable like a Pixmap. Then i can use
XDrawString() to write to the drawable and then blit the drawable to the
SDL surface…?
But XDrawString() is only avaiable on X and any SDL function
should be completely transparent to the underlying system.

Sure, it was just an example. SDL would only use XDrawString when used
under X - #ifdef WIN32, it uses something else.On Tue, 3 Nov 1998, Paulus Esterhazy wrote:

~~
Paulus Esterhazy (pesterhazy at gmx.net)


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

Can’t you use that little freetype thingie? I hacked a bit at the
source to make it compile for the .9.6 version.

Of course you can. It looks much better than most bitmap or X11 fonts. :slight_smile:
The point though, is I don’t want to require any external libraries for
SDL demos except when the demo is showing off SDL with the external library.

Awww, have you no sense of humor? ;>

Seriously though, I’d imagine that requiring the freetype lib isn’t that
much of a big deal. It provides superior functionality to most anything
else I’ve found. But that’s just my opinion.

How about just creating a “font loader” API that is aware of various formats
and can convert them all into common format? You could have something like:

SDL_Font* SDL_LoadPCFFont( [path to file] );
SDL_Font* SDL_LoadPFAFont( [path to file] );
SDL_Font* SDL_LoadPFbFont( [path to file] );
SDL_Font* SDL_LoadFont( [path to file] );
SDL_Font* SDL_LoadFont( [path to file] );
…ad nausem

SDL_Font would then be common font format that wouldn’t care about what
windowing system it was running under. Dierk’s suggested format would be
ideal for this. After that’s down, a few extra functions to use the common
format would be needed…stuff like SDL_DrawString() and such.

Or am I living in the Utopian world of a lamer who doesn’t know what he’s
talking about? :)On Wed, 4 Nov 1998 reddirt at texas.dce.ksu.edu wrote:

On Tue, Nov 03, 1998 at 11:56:57PM -0800, Sam Lantinga wrote:


K. Spoon <@K_Spoon>
Trying hard to grow a clue here…

Scott Stone wrote:

Sam Lantinga wrote:

  1. is there any way to load a bitmap from a buffer instead of a file?
    ie, I’ve got this data structure that has the bitmap file read into it, so
    it’s stored in memory… I want to make an sdl surface from this, and not
    from a file on disk. Is there already a way to do this? If not, I can
    write one up and submit it, maybe tonight.

There isn’t a way to load a BMP from memory, just a file.
Ideally you’d be able to do both, but since the loaders are just sort of
bootstrappers, and I’ve been trying to keep the code size small, I haven’t
done anything with it.

Maybe we should implement a simple image loader library that would handle
that? It would be an add-on library, and we could stick in BMP, GIF, and PNG
so far…

  1. Handling text. There seems to be absolutely no way to do this. an
    SDL surface isn’t recognized as a Drawable by X, so I can’t use
    XDrawString… is there a solution to this yet?

This is frustrating me right now as I try to implement a chat client.
Does anyone have a simple bitmap font and code to display it?

See the code from the Jump game. it has one. Will be implemented in the widget I
hope.

Where is this ‘Jump game’ located for download?

Go to download section on SDL website, and follow the links> On Wed, 4 Nov 1998, Ste$BqQe(Bhane Magnenat wrote:


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)


Stephane Magnenat
stephane.magnenat at urbanet.ch

How about just creating a “font loader” API that is aware of various formats
and can convert them all into common format? You could have something like:

There will be no core font library in SDL.
It’s a great idea for an add-on library though. :slight_smile:

As long as you’re working with fonts, definitely check out FreeType.
The ‘ttflib’ demo library uses it, and its license is very free.
(I know of at least one commercial game that uses it)

Or am I living in the Utopian world of a lamer who doesn’t know what he’s
talking about? :slight_smile:

Not at all, it’s a great idea, and should definitely go in a demo library. :slight_smile:

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -

See ya!
-Sam Lantinga (slouken at devolution.com)


Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Please follow up all comments to this thread to the new sdlplus list

I appreciate your patience as we move these topics over.
If you’re interested in any sort of add-on library to SDL, please discuss
it on the new sdlplus list. Discussions of any new features should also
probably go there.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -

How about just creating a “font loader” API that is aware of various formats
and can convert them all into common format? You could have something like:

There will be no core font library in SDL.
It’s a great idea for an add-on library though. :slight_smile:

no, it does belong in the core SDL. Otherwise, SDL games cease to be
cross-platform, since there is no font library that works on both Win32
and X.On Thu, 5 Nov 1998, Sam Lantinga wrote:


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)