CompuServe Messages

#irony of new location

    06-Nov-94 22:02:48
Fm: Fred Trafton 73132,2456
To: Nils Pipenbrinck 100121,2450
Nils, I agree with the reply you already got – don't use horizontal lines with Mode X, use vertical. I know, it's tempting to enjoy writing 4 pixels at once, but as Jim said, this is only better for "big" polygons. If you're trying to do good 3-D, you'll probably want lots of small polys instead of a few big ones. As far as helping you with some ASM, I wouldn't mind giving it a try, but I don't guarantee the results! Download my X-Lib and check out my vertical line drawer in there. The Pascal procedure is "XVert". You call it as: XVert(X,Y,Length,PageBase,Color); It draws a vertical line top-to-bottom beginning at pixel (X,Y) and makes the line Length pixels long. The inner loop is pretty fast, given the limitations of Pascal's 286 code and 8-bit writes. The Inner loop is just: @LoopPoint: mov es:[bx],al add bx,80 loop @LoopPoint As you probably know, you can probably speed this up for 486 machines by replacing the "loop" with explicitly decrementing cx and jumping if zero. If you've got some code you'd like me to comment on, send it by E-Mail, or just post it in a message, and I'll be happy to do what I can. I don't claim to be an assembly guru by any stretch of the imagination, though, I'm just hacking around myself. Regards, Fred Trafton