Comments on: HermIRES v1.28 C64 hires-bitmap editor https://www.nightfallcrew.com/25/03/2013/hermires-v1-28-c64-hires-bitmap-editor/ Lightning in the Dark Sat, 11 Jan 2025 21:44:34 +0000 hourly 1 http://wordpress.org/?v=3.4.2 By: Timothy Legg https://www.nightfallcrew.com/25/03/2013/hermires-v1-28-c64-hires-bitmap-editor/comment-page-1/#comment-245102 Timothy Legg Wed, 25 Dec 2024 17:55:39 +0000 http://www.nightfallcrew.com/?p=9132#comment-245102 And yes, the editor read the code as weird markups and mangled it into something that won't compile. Basically, for pa, pb and pc, I simulated the abs function with three comparisons of equal, greater or less than and perform assignment to zero or the polarity of subtraction accordingly. That did the absolute value without having to deal with whatever C++ typecasting issues there are with their math.h library. And yes, the editor read the code as weird markups and mangled it into something that won’t compile. Basically, for pa, pb and pc, I simulated the abs function with three comparisons of equal, greater or less than and perform assignment to zero or the polarity of subtraction accordingly. That did the absolute value without having to deal with whatever C++ typecasting issues there are with their math.h library.

]]>
By: Timothy Legg https://www.nightfallcrew.com/25/03/2013/hermires-v1-28-c64-hires-bitmap-editor/comment-page-1/#comment-245100 Timothy Legg Wed, 25 Dec 2024 17:50:13 +0000 http://www.nightfallcrew.com/?p=9132#comment-245100 There's a LOT of bugs in this code (Ambiguous overload call to abs(double) in source/AllegroPNG/alpng_filters.c). Rather than risking using a different math.h, I just manually replaced the three lines: uint32_t pa = abs(p - a); uint32_t pb = abs(p - b); uint32_t pc = abs(p - c); with uint32_t pa, pb, pc; if(p==a){pa=0;} if(p>a){pa=p-a;} if(p<a>b){pb=p-b;} if(p<b>c){pc=p-c;} if(p<c){pc=c-p;} But despite fixing this, it still was broken due to an unknown logical error. $ ./HermIRES Shutting down Allegro due to signal #4 Illegal instruction (core dumped) So there is something deeply flawed with this release, on the order of either logical or memory management errors. I'm not learning a library just to fix someone else's code. It's easier to finish writing my own C program to achieve my goal. There’s a LOT of bugs in this code (Ambiguous overload call to abs(double) in source/AllegroPNG/alpng_filters.c). Rather than risking using a different math.h, I just manually replaced the three lines:

uint32_t pa = abs(p – a);
uint32_t pb = abs(p – b);
uint32_t pc = abs(p – c);

with

uint32_t pa, pb, pc;
if(p==a){pa=0;} if(p>a){pa=p-a;} if(pb){pb=p-b;} if(pc){pc=p-c;} if(p<c){pc=c-p;}

But despite fixing this, it still was broken due to an unknown logical error.

$ ./HermIRES
Shutting down Allegro due to signal #4
Illegal instruction (core dumped)

So there is something deeply flawed with this release, on the order of either logical or memory management errors. I'm not learning a library just to fix someone else's code. It's easier to finish writing my own C program to achieve my goal.

]]>
By: google plus app for ipad https://www.nightfallcrew.com/25/03/2013/hermires-v1-28-c64-hires-bitmap-editor/comment-page-1/#comment-48348 google plus app for ipad Thu, 02 Oct 2014 12:32:46 +0000 http://www.nightfallcrew.com/?p=9132#comment-48348 Woah! I'm really digging the template/theme of this website. It's simple, yet effective. A lot of times it's very difficult to get that "perfect balance" between superb usability and appearance. I must say that you've done a excellent job with this. Also, the blog loads very fast for me on Opera. Exceptional Blog! Woah! I’m really digging the template/theme of this website.
It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between superb usability and
appearance. I must say that you’ve done a excellent job with this.

Also, the blog loads very fast for me on Opera. Exceptional Blog!

]]>