Jump to content

General Lee Inept

New Members
  • Posts

    2
  • Joined

  • Last visited

About General Lee Inept

  • Birthday 02/15/1972

Profile Information

  • Gender
    Male
  • Location
    G 174 BZ101303-16 9/19 L40 P

General Lee Inept's Achievements

Combat Commando

Combat Commando (1/9)

12

Reputation

  1. Nice. thanks for the welcome, and thanks so much for your great work with wudsn. As a kid I cut my programming teeth on a 400 and later an 800XL, I'd played around with emulators over the years but it wasn't until a friend pointed me to wudsn that I found the appetite to revisit programming for these wonderful old computers. Rediscovering them with modern development tools (and an adult brain) is such a pleasure!
  2. I'm using (and loving) wudsn IDE v1.6.6 to develop a frogger-a-like for the Atari 800XL and I encountered a bug in the wudsn IDE's "Char Set 1x1 - Multi Color" converter. I couldn't find anyone else talking about the bug here so I thought I'd share my fix. There are a couple of bugs in how convertToFileData function for the converter processes data for multi-color fonts, using the wrong calculation for the number of columns and a bit of a mess in the inner loop for packing the bits for four pixels into a single byte of output. This is my fixed version: function convertToFileData(data) { var columns = data.getImageDataWidth() / 4; var rows = data.getImageDataHeight() / 8; var chars = 256; var char = 0; var bytes = []; var offset = 0; for (var r = 0; r < rows; r++) { for (var c = 0; c < columns; c++) { if (char < chars) { for (var l=0;l<8;l++) { var b = 0; var x,y,c1,c2,c3,c4; x = c*4; y = r*8 + l; c1 = data.getPixel(x, y) & 0x3; c2 = data.getPixel(x+1, y) & 0x3; c3 = data.getPixel(x+2, y) & 0x3; c4 = data.getPixel(x+3, y) & 0x3; b = c1 << 6 | c2 << 4 | c3 << 2 | c4; bytes[offset++] = b; } char++; } } } data.setTargetFileObject(0, bytes); } (I'm new here and not certain of the etiquette, so I apologize if this isn't the right place for this post - just let me know )
×
×
  • Create New...