AmigaBASIC to QB64pe question out of left field - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: AmigaBASIC to QB64pe question out of left field (/showthread.php?tid=1893) Pages:
1
2
|
AmigaBASIC to QB64pe question out of left field - CharlieJV - 08-12-2023 I somehow manage to lose my evening by getting transfixed on AmigaBASIC's "AREA" statement. Anybody have enough AmigaBASIC experience to let me know if I have it straight in my head what AREA does and how it would be translated to QB64pe? Here's my guess on a couple samples: Code: (Select All) <<AREA "(25,10) - (50,20) - (0,20)">> I did some shorthand there. In AmigaBASIC, the first example would look like Code: (Select All) AREA (25,10) The AreaStartX and AreaStartY stuff, that's in case the first set of coordinates are prefixed by STEP. RE: AmigaBASIC to QB64pe question out of left field - mnrvovrfc - 08-12-2023 http://www.pjhutchison.org/basic/graphics.html Heads up! It's not a secure site. This "AREA" seems to be like "LINE" giving one coordinate at a time, but one doesn't have to offer the first point again for the polygon, before using "AREAFILL". RE: AmigaBASIC to QB64pe question out of left field - RhoSigma - 08-12-2023 As old Amiga user still until today I can tell your workaround is good for drawing the shape of a polygon. However, the AREA statements were not to draw a shape but a filled polygon using the "Blitter" (abrev. for "Block image transferer") which was at that time (late 80s) blazingly fast processing upto 80 million pixels per second. So to emulate that you would also need a PSET anywere into the drawn shape and then do a PAINT. I tried that once too, but often had problems that PAINT was leaking over the shape and flooding the whole screen, so I was looking for an alternative. The alternative I found was this http://alienryderflex.com/polygon_fill/ From the theory and sample described there I created my polygon.bm library which is part of my "Libraries Collection" here https://qb64phoenix.com/forum/showthread.php?tid=1033 RE: AmigaBASIC to QB64pe question out of left field - CharlieJV - 08-12-2023 (08-12-2023, 08:33 AM)RhoSigma Wrote: As old Amiga user still until today I can tell your workaround is good for drawing the shape of a polygon. Thank-you much! Yeah, I decided to componentize AREA into the two parts: the shape, the filling. I just wanted to make sure I fully understood the shape part first before diving into the filling. (Divide and conquer, 'cause trying to process all of it is way too much for this kid.) Now I feel okay looking into the filling part. Thank-you much for the resource ! I look forward to diving into it. RE: AmigaBASIC to QB64pe question out of left field - bplus - 08-12-2023 So the "Areas" are border lines to an enclosed polygon? Is that basically it? So Areas must close itself by drawing a line from last to first? Polygon filling without Paint is interesting subject, I think you can do it with filled triangles. RE: AmigaBASIC to QB64pe question out of left field - CharlieJV - 08-12-2023 (08-12-2023, 07:27 AM)mnrvovrfc Wrote: http://www.pjhutchison.org/basic/graphics.html Too funny! That's the web page I stumbled upon (I have no idea how I got there) and got me so interested in AREA that looking into the statement largely consumed my Friday evening. RE: AmigaBASIC to QB64pe question out of left field - RhoSigma - 08-12-2023 @bplus Each AREA statement defines exactly one corner point of the polygon and you don't return to the startpoint, that's implied to close the polygon. Then optional a PATTERN statement can define a fill pattern and finally AREAFILL triggers filling of the polygon and by that resets the entire AREA point sequence. AREA/AREAFILL https://archive.org/details/Amiga_BASIC_1985_Commodore/page/n133/mode/2up?q=AREA&view=theater PATTERN https://archive.org/details/Amiga_BASIC_1985_Commodore/page/n217/mode/2up?q=AREA&view=theater RE: AmigaBASIC to QB64pe question out of left field - CharlieJV - 08-12-2023 (08-12-2023, 04:44 PM)RhoSigma Wrote: @SMcNeill Ooooo, that is good info. Such good stuff. Thank-you for taking the time! RE: AmigaBASIC to QB64pe question out of left field - CharlieJV - 08-12-2023 All of this got me thinking about metaprogramming macros to help convert statements/functions from one BASIC implementation to code that is GW-BASIC/QBasic/QB64PE (and BAM) compatible . That's really out of QB64PE-focused topic, so I dropped that in a place that is more appropriate. If you are interested in that kind of stuff: Metaprogramming in BAM: a code generation example RE: AmigaBASIC to QB64pe question out of left field - Kernelpanic - 08-12-2023 (08-12-2023, 07:09 PM)CharlieJV Wrote: All of this got me thinking about metaprogramming macros to help convert statements/functions from one BASIC implementation to code that is GW-BASIC/QBasic/QB64PE (and BAM) compatible .It nothing really has to be compatible with GW-Basic and QBasic (beyond the compatibility of QB64pe). Maintaining compatibility with QuickBasic and QBasic is OK, but it really doesn't need to be more. It reminds me of Netscape. Websites should also be compatible with Netscape, although its market share lay been around 1%. Pointless work for people who were unable to break away from outdated ideas but still demanded an "extra soup". |