[fpc-devel] sdlgraph, pre-alpha
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Aug 21 22:07:30 CEST 2007
On 19 Aug 2007, at 23:28, Evgeniy Ivanov wrote:
> Hi! I did it. And working with its implementation.
Congratulations! Just one note: please do not make it GPL, because
that would mean anyone using that unit would have to make their
program also GPL. Instead, please change the text at the top to
something like this:
***
Copyright (c) 2007 Evgeniy Ivanov
This file implements the sdl support for the graph unit
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
***
You're of course free to also include your email address and a link
to your website, like you have done in the version you put on the web.
> I need to do some hooks to speed up the module (Bar3d). But I have
> network
> problems and my dial up doesn't me allow to google much (I don't
> know how to
> hook functions/procedures).
Bar3D is indeed one of the few routines which cannot be hooked
currently. As long as you hook the line drawing it should be plenty
fast though.
> Also readln function need to be hooked too (It works when alt+tab
> to console
> from which app was executed).
This will indeed be difficult. It's probably best to create a generic
"wincrt"-like unit (sdlcrt?) which can be used together with the sdl
graph unit. Full input/output support can also be added to it over
time, similarly to how the regular crt unit also takes over all input/
output.
> If you remember we were talking about it in April (or May). I've
> created
> sf.net project, but it is in Processing Queue. So, here are the
> temp links:
>
> Unit: http://itmo.vingrad.ru/files/sdlgraph.pas.txt
>
> Example: http://itmo.vingrad.ru/files/test.pas.txt
>
> Build script (you need to fix paths):
> http://itmo.vingrad.ru/files/build.sh.txt
Very nice!
> P.S. Thanks you for your answers about the graph modules and to
> authers of
> graph*.inc and *Go32* module - the code is very nice.
Carl will be happy to hear this :)
> Also I find some
> things I want you to have a look. They're in TODO of the sdlgraph.pas:
> {Graph inc and pp notes
> TODO: in modes.inc 421-430. Maybe delete lowNewMode..highNewMode
> case? else
> section does the same! But with this section code it is easier to
> read the
> code
No, it doesn't do the same: the lowNewMode..highNewMode case uses
IntcurrentNewDriver, while the else case uses IntcurrentDriver. It's
to transparently support both the old and new mode selection logic.
> TODO: in modes.inc 181: Overloaded procedure initmode(var mode:
> TModeInfo);
> isn't used. I've looked only in modes.inc, so it may be my mistake
It is used by all platform-specific graph units (also by your
sdlgraph unit) to initialise a new mode.
> TODO: Go32 mistake 2740: modenumber is m1024x768x32k, but initmode =
> Init640x480x32k
> }
Fixed, thanks.
Jonas
More information about the fpc-devel
mailing list