Need little help with HPGCC and Graph - Hewlett Packard
This is a discussion on Need little help with HPGCC and Graph - Hewlett Packard ; Hi i try to show a picture in the screen but i have some freak stuff..
i don't see anything correctly
there is my code :
#include
#include
#include "question.xpm"
int main(void)
{
hpg_clear(); //clear the screen
hpg_set_mode_gray16 (1); //enter ...
-
Need little help with HPGCC and Graph
Hi i try to show a picture in the screen but i have some freak stuff..
i don't see anything correctly
there is my code :
#include
#include
#include "question.xpm"
int main(void)
{
hpg_clear(); //clear the screen
hpg_set_mode_gray16 (1); //enter mode 16 gray, double buffered
mode
hpg_set_color(hpg_stdscreen, HPG_COLOR_WHITE ); //set color to
white
hpg_draw_rect(0,0,131,80);
hpg_fill_rect(0,0,131,80);
hpg_t *img = hpg_load_xpm_gray16(question_xpm);
hpg_blit(img, 0, 0, 42, 42, hpg_stdscreen, 0, 0);
while(!keyb_isON());
hpg_free_image(img);
return 0;
}
I search some example or help file about HP-GCC.. i just find a old
ebook on the web but they said are obsolete..
i don't find anything
How i can create C file like the program hump in HP-GCC example ?
thx alot 
-
Re: Need little help with HPGCC and Graph
i would expect your picture to be on the "other" buffer until you
flip.
try adding flip(); after the blit ... ?
On Fri, 30 Mar 2007 02:38:15 +0100, wrote:
> Hi i try to show a picture in the screen but i have some freak stuff..
> i don't see anything correctly
>
> there is my code :
>
> #include
> #include
> #include "question.xpm"
>
> int main(void)
> {
> hpg_clear(); //clear the screen
> hpg_set_mode_gray16 (1); //enter mode 16 gray, double buffered
> mode
> hpg_set_color(hpg_stdscreen, HPG_COLOR_WHITE ); //set color to
> white
> hpg_draw_rect(0,0,131,80);
> hpg_fill_rect(0,0,131,80);
> hpg_t *img = hpg_load_xpm_gray16(question_xpm);
> hpg_blit(img, 0, 0, 42, 42, hpg_stdscreen, 0, 0);
>
> while(!keyb_isON());
> hpg_free_image(img);
>
> return 0;
> }
>
> I search some example or help file about HP-GCC.. i just find a old
> ebook on the web but they said are obsolete..
> i don't find anything
>
> How i can create C file like the program hump in HP-GCC example ?
>
> thx alot 
>
-
Re: Need little help with HPGCC and Graph
Hello,
On Mar 29, 9:38 pm, WildcatQue...@gmail.com wrote:
> hpg_set_mode_gray16 (1); //enter mode 16 gray, double buffered
Don't activate double buffer unless you really need to. See Hugh's
reply.
> I search some example or help file about HP-GCC.. i just find a old
> ebook on the web but they said are obsolete..
> i don't find anything
I know, we'll improve the docs for the next version.
>
> How i can create C file like the program hump in HP-GCC example ?
That's using a small program I wrote for the PC (Windows only), which
converts BMP images into C code.
If you want it, I can send you the sources. It's a very specific code
to convert BMP to the images needed by the GGL library, but if you
modify it properly you can use it for other formats.
Claudio
-
Re: Need little help with HPGCC and Graph
On 30 mar, 20:50, "Claudio Lapilli" wrote:
> Hello,
>
> On Mar 29, 9:38 pm, WildcatQue...@gmail.com wrote:
>
> > hpg_set_mode_gray16 (1); //enter mode 16 gray, double buffered
>
> Don't activate double buffer unless you really need to. See Hugh's
> reply.
>
> > I search some example or help file about HP-GCC.. i just find a old
> > ebook on the web but they said are obsolete..
> > i don't find anything
>
> I know, we'll improve the docs for the next version.
>
>
>
> > How i can create C file like the program hump in HP-GCC example ?
>
> That's using a small program I wrote for the PC (Windows only), which
> converts BMP images into C code.
> If you want it, I can send you the sources. It's a very specific code
> to convert BMP to the images needed by the GGL library, but if you
> modify it properly you can use it for other formats.
>
> Claudio
Sorry for the last message i don't see you answer me for the program
-
Re: Need little help with HPGCC and Graph
On 30 mar, 20:50, "Claudio Lapilli" wrote:
> Hello,
>
> On Mar 29, 9:38 pm, WildcatQue...@gmail.com wrote:
>
> > hpg_set_mode_gray16 (1); //enter mode 16 gray, double buffered
>
> Don't activate double buffer unless you really need to. See Hugh's
> reply.
>
> > I search some example or help file about HP-GCC.. i just find a old
> > ebook on the web but they said are obsolete..
> > i don't find anything
>
> I know, we'll improve the docs for the next version.
>
>
>
> > How i can create C file like the program hump in HP-GCC example ?
>
> That's using a small program I wrote for the PC (Windows only), which
> converts BMP images into C code.
> If you want it, I can send you the sources. It's a very specific code
> to convert BMP to the images needed by the GGL library, but if you
> modify it properly you can use it for other formats.
>
> Claudio
im interrested for the little program. if you have the exe too this
will be nicer i currently don't have C compiler on my pc (exept for
the HP-GCC)
you can send me this on my gmail account
thx
-
Re: Need little help with HPGCC and Graph
> will be nicer i currently don't have C compiler on my pc
http://www.smorgasbordet.com/pellesc/
Thats the one I learned on. Free to use.
TW
-
Re: Need little help with HPGCC and Graph
On 30 mar, 20:50, "Claudio Lapilli" wrote:
> That's using a small program I wrote for the PC (Windows only), which
> converts BMP images into C code.
> If you want it, I can send you the sources. It's a very specific code
> to convert BMP to the images needed by the GGL library, but if you
> modify it properly you can use it for other formats.
>
> Claudio
Hi, my name is Kenny Walrond, i'm from venezuela
i'm interested on the program to convert the bmp image to c code.
I'm new with c, maybe because of that i have this questions,
i want to make a program where I enter data to be use, i want see the
data with some other that i get from the program on a table, the data
table will be bigger than what i can see on the screen, for that i can
just put in the code that after an amount of line i will have to press
some bottom to continue, in hump, the game, the world is bigger than
what we can see i the calculator screen but by moving the caracter you
can see any part of the world, i want to make something like that with
my table, that i can look up down left or right of the table by using
the direction arrows. is there a way to do that?
the other question is that in the program i want to have some bottons,
or icons that i can use to go to another part of the program, that's
is why i'm interested on the bmp to c code program, althougth i might
only use icons with words something like the menu of the calculator
just to go to another part of program. I want to have that menu there
while i use the other part of the screen to continue the program. Can
I do that too?, maybe all that is really easy but i'm learning
if you can help me thanks very much.
-
Re: Need little help with HPGCC and Graph
On 1 avr, 20:20, walr...@gmail.com wrote:
> On 30 mar, 20:50, "Claudio Lapilli" wrote:
>
> > That's using a small program I wrote for the PC (Windows only), which
> > converts BMP images into C code.
> > If you want it, I can send you the sources. It's a very specific code
> > to convert BMP to the images needed by the GGL library, but if you
> > modify it properly you can use it for other formats.
>
> > Claudio
>
> Hi, my name is Kenny Walrond, i'm from venezuela
> i'm interested on the program to convert the bmp image to c code.
>
> I'm new with c, maybe because of that i have this questions,
> i want to make a program where I enter data to be use, i want see the
> data with some other that i get from the program on a table, the data
> table will be bigger than what i can see on the screen, for that i can
> just put in the code that after an amount of line i will have to press
> some bottom to continue, in hump, the game, the world is bigger than
> what we can see i the calculator screen but by moving the caracter you
> can see any part of the world, i want to make something like that with
> my table, that i can look up down left or right of the table by using
> the direction arrows. is there a way to do that?
>
> the other question is that in the program i want to have some bottons,
> or icons that i can use to go to another part of the program, that's
> is why i'm interested on the bmp to c code program, althougth i might
> only use icons with words something like the menu of the calculator
> just to go to another part of program. I want to have that menu there
> while i use the other part of the screen to continue the program. Can
> I do that too?, maybe all that is really easy but i'm learning
>
> if you can help me thanks very much.
For the little application i put there for all :
http://rapidshare.com/files/23979844/bmp2c.rar.html