Recent

Author Topic: [SOLVED] Graphics Contest 2015 project not working  (Read 3981 times)

lainz

  • Hero Member
  • *****
  • Posts: 3303
    • Lainz
[SOLVED] Graphics Contest 2015 project not working
« on: July 14, 2016, 07:31:04 pm »
This project was working with old (2015) BGRABitmap but now it crashes.

Source:
https://github.com/bgrabitmap/bgracontest/tree/master/2015/by007_koala/source

I get the assembler window with this:
BGRAFILTERS$_$TBOXBLURTASK_$_DOEXECUTENORMAL_$$_MAINLOOP
« Last Edit: July 16, 2016, 04:57:35 pm by lainz »

circular

  • Hero Member
  • *****
  • Posts: 3047
    • Personal webpage
Re: Graphics Contest 2015 project not working
« Reply #1 on: July 14, 2016, 10:56:41 pm »
Ok, I'm looking at it...
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3047
    • Personal webpage
Re: Graphics Contest 2015 project not working
« Reply #2 on: July 14, 2016, 11:04:41 pm »
I found the bug, it is a division by zero. That's fixed on Git.
 :)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3303
    • Lainz
Re: Graphics Contest 2015 project not working
« Reply #3 on: July 14, 2016, 11:36:29 pm »
Thanks, now it can run util the end.

BTW I found other problem, the TextShadow is not displayed correctly in the end credits... See attached image.

Code: Pascal  [Select]
  1. procedure TKoala.DrawCredits(Bitmap: TBGRABitmap; ID: integer);
  2. var
  3.   tmp: TBGRABitmap;
  4. begin
  5.   tmp := BGRATextFX.TextShadow(FWidth, FHeight, RandText, FHeight shr
  6.     2, BGRAWhite, BGRABlack, 30, 30, 10) as TBGRABitmap;
  7.   Bitmap.PutImage(0, 0, tmp, dmLinearBlend, FFrameData[ID].CreditsAlpha);
  8.   tmp.Free;
  9. end;  

I tried changing the PutImage with BlendImage / BlendImageOver and the problem persists. The shadow looks like garbage. Seems that is inverted or something like that.

circular

  • Hero Member
  • *****
  • Posts: 3047
    • Personal webpage
Re: Graphics Contest 2015 project not working
« Reply #4 on: July 15, 2016, 08:21:15 pm »
Indeed.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3303
    • Lainz
Re: Graphics Contest 2015 project not working
« Reply #5 on: July 15, 2016, 09:05:35 pm »
Yes I don't know how to fix it  ;D

circular

  • Hero Member
  • *****
  • Posts: 3047
    • Personal webpage
Re: Graphics Contest 2015 project not working
« Reply #6 on: July 15, 2016, 09:31:41 pm »
Yep. Am looking at it...
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3047
    • Personal webpage
Re: Graphics Contest 2015 project not working
« Reply #7 on: July 15, 2016, 10:49:48 pm »
I found more or less where it is, there is an overflow of the sums but that's not supposed to happen of course.

EDIT: Ahhh I found the explanation. It was related to the bounds of the rectangular area of the blur. That's fixed on Git.

Thanks for testing  :)
« Last Edit: July 15, 2016, 11:02:12 pm by circular »
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3303
    • Lainz
Re: Graphics Contest 2015 project not working
« Reply #8 on: July 15, 2016, 11:30:51 pm »
It's like 2015 again, it's working thanks!

circular

  • Hero Member
  • *****
  • Posts: 3047
    • Personal webpage
Re: Graphics Contest 2015 project not working
« Reply #9 on: July 16, 2016, 09:09:24 am »
Cool  :)

Can you mark the topic as solved?
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3303
    • Lainz
Re: [SOLVED] Graphics Contest 2015 project not working
« Reply #10 on: July 16, 2016, 04:57:44 pm »
Done.