[NiL-devel] Re: NIL - no luck with compilation
Status: Alpha
Brought to you by:
e-user
|
From: egore <eg...@gm...> - 2005-01-17 13:14:16
|
Hi,
I need some more information which version of NiL you are compiling (I
hope you are using the latest CVS version (and please tell me when you
did the checkout)). I will look into that in a few hours since I'm at
work right now.
Regards,
Christoph aka egore
Michal Kozak schrieb:
>Yo man,
>
>I'm trying to compile NIL from a while, but no luck.
>
>Is there an error in sorce of raw_surface.cpp around line 379 and 428.
>xsize not defined??
>
>This is my version of this lines with coments:
>
> int t_xsize = target->_get_xsize();
> int s_xsize = source->get_xsize(); // in oryginal this line is like that int s_xsize = source->_get_xsize();
>
> target_pixel+=source_xpos+ source_ypos*t_xsize;
> source_pixel+=target_xpos+target_ypos*s_xsize; // chanenged from xsize to s_xsize
>
> if (enlargement == 1) {
> int bytes_pr_line = source_xsize*sizeof(int32);
> for(int y=0;y<source_ysize;y++) {
> for (int x=0;x<source_xsize;x++) {
> *target_pixel++=bf.blend(*source_pixel++,*target_pixel);
> }
> target_pixel+=t_xsize-source_xsize;
> source_pixel+=s_xsize-source_xsize; //same story as below
> }
>
> } else if (enlargement == 2) {
> for(int y=0;y<source_ysize;y++) {
> for(int x=0;x<source_xsize;x++) {
> int32 pixel=*source_pixel;
> *target_pixel++ = bf.blend(pixel,*target_pixel);
> *target_pixel++ = bf.blend(pixel,*target_pixel);
> source_pixel++;
> target_pixel[t_xsize-2] = bf.blend(pixel,target_pixel[t_xsize-2]);
> target_pixel[t_xsize-1] = bf.blend(pixel,target_pixel[t_xsize-1]);
> }
> target_pixel+=(t_xsize<<1)-(source_xsize<<1);
> source_pixel+=s_xsize-source_xsize; // it was xsize not s_xsize
> }
> } else {
> for(int y=0;y<source_ysize;y++) {
> for (int e=0;e<enlargement;e++) {
> const int32 *sp = source_pixel;
> int32 *tp = target_pixel;
>
> for(int x=0;x<source_xsize;x++) {
> switch (enlargement) {
> case 7: *tp++=bf.blend(*sp,*tp);
> case 6: *tp++=bf.blend(*sp,*tp);
> case 5: *tp++=bf.blend(*sp,*tp);
> case 4: *tp++=bf.blend(*sp,*tp);
> case 3: *tp++=bf.blend(*sp,*tp);
> case 2: *tp++=bf.blend(*sp,*tp);
> default:
> case 1: *tp++=bf.blend(*sp,*tp);
> }
> sp++;
> }
> target_pixel+=t_xsize;
> }
> source_pixel+=s_xsize; // it was xsize not s_xsize
> }
> }
>}
>
>Am I right or am I wrong??
>
>My OS is Fedora core 3.
>
>Best regards
>Michal
>
>
>
>
|