Thread: [Super-tux-devel] Surface class
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-04-13 12:06:48
|
Hey, I don't know who redesigned the texture.cpp code, but I don't agree with having two separate classes for both SDL and OpenGL. The code would stay clean and simple, if they just shared the same class and there was a function pointing out for the right functions to use. I don't even think this code will allow for a videomode change. I vote for returning to the old code and do a simple structure->class change, as I was going to do. Ricardo Cruz -- The IBM purchase of ROLM gives new meaning to the term "twisted pair". -- Howard Anderson, "Yankee Group" |
From: Ingo R. <gr...@gm...> - 2004-04-13 12:28:46
|
Ricardo Cruz <ri...@ae...> writes: > I don't know who redesigned the texture.cpp code, but I don't agree > with having two separate classes for both SDL and OpenGL. Thats pretty much the same as it was before. Move gl_texture to SurfaceSDL and you have exactly the same as before. It makes not really a difference if you dispatch something manually via a function pointer or via C++ vtable. > The code would stay clean and simple, if they just shared the same > class and there was a function pointing out for the right functions > to use. It is far more cleaner to have the function seperated in to class then have one class and twigle manually with function pointers. > I don't even think this code will allow for a videomode change. Sure, it does. The user code just sees 'Surface', while Surface dispatches everything to SurfaceSDL or SurfaceOpenGL, which is pretty much the same as the pointer-stuff that was there before. So all you need to do is to let Surface switch from SurfaceSDL to SurfaceOpenGL on video mode changes, which shouldn't be much of a big problem if you add some code to Surface that caches the data needed to create the surface (ie. filename and size, or another surface). -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |
From: Ingo R. <gr...@gm...> - 2004-04-13 13:19:11
|
Ingo Ruhnke <gr...@gm...> writes: >> I don't even think this code will allow for a videomode change. Just implemented mode switching from SDL to OpenGL and back, so far it seems to be working very well. Only shadow-fonts are currently broken, since I am not so sure on how long a SDL_Surface will live (ie. does it get invalid on a modeswitch, do all get invalid or only some, etc). -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |
From: Marek <wa...@gm...> - 2004-04-13 14:47:59
|
Hi! Why did you remove all those levels from the cvs? I thought they were pretty cool, just needed some final polishing... Marek -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS dpu@ s:+ a-- C++(++++)$ UL++>++++ P+ L+++>+++++ E- W++ N o? K- w--- O M+@ V- !PS !PE Y+ PGP++@ t--- 5-- X- R+(++) tv-- b++@ DI+ D+>++++ G++ e>++++ h--- r++(+++) y+++ ------END GEEK CODE BLOCK------ |
From: Ricardo C. <ri...@ae...> - 2004-04-13 15:10:39
|
The levels were not removed, I've just organised them a bit and made them= =20 accessible from the Contrib Levels menu. The 4th level was moved from the default package, since it doesn't fit the= re.=20 It was done by me and I am thinking about making a 'In the Clouds' worldmap= =20 or something ;) The --worldmap parameter should be working fine now and supports the defau= lt=20 levels. Ricardo Cruz Em Ter=E7a, 13 de Abril de 2004 15:47, o Marek escreveu: > Hi! > Why did you remove all those levels from the cvs? I thought they were > pretty cool, just needed some final polishing... > > Marek =2D-=20 Or you or I must yield up his life to Ahrimanes. I would rather it were yo= u. I should have no hesitation in sacrificing my own life to spare yours, but we take stock next week, and it would not be fair on the company. -- J. Wellington Wells |
From: Marek <wa...@gm...> - 2004-04-13 16:48:27
|
Ricardo Cruz wrote: > The levels were not removed, I've just organised them a bit and made them >accessible from the Contrib Levels menu. > > That's strange... when I checked out the cvs tree, the levels were deleted, but they didn't appear anywere else. Also, you [Ricardo] told me you committed my levels, but they don't seem to be there. Is something wrong with my cvs? Or did you just forget to "cvs add" them? :-) Marek |
From: Ricardo C. <ri...@ae...> - 2004-04-13 17:44:52
|
Everything is fine, just try to do a fresh cvs download... Ricardo Cruz Em Ter=E7a, 13 de Abril de 2004 17:48, o Marek escreveu: > Ricardo Cruz wrote: > > The levels were not removed, I've just organised them a bit and made th= em > >accessible from the Contrib Levels menu. > > That's strange... when I checked out the cvs tree, the levels were > deleted, but they didn't appear anywere else. Also, you [Ricardo] told > me you committed my levels, but they don't seem to be there. Is > something wrong with my cvs? Or did you just forget to "cvs add" them? :-) > > Marek > > =2D-=20 There is a 20% chance of tomorrow. |