Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
pedrosgali

Updated GPU functions

Recommended Posts

Hey all.

 

First off, I am thoroughly loving this mod.

 

I would very much like access to better tier graphics cards, I know however that this has been (repeatedly) requested so I'll ask for this instead.

 

I noticed while writing my paint program that I can use gpu.get(x, y) to call the specific character set at position x, y so I'm assuming that there is a table somewhere with all the current screen data written to it.

 

Would it be at all possible to store the current back/foreground colours in with this data?

 

I can use gpu.getBackground()/gpu.setForeground() but that only returns the current colour not the colour of a specific pixel.

 

I honestly think that with that small change I could halve my image refresh rate and make more complex animations by only drawing pixels that need drawing, all without the need for shiny new hardware.

 

I hope you find this suggestion useful. =)

Link to post
Share on other sites

component.gpu.get(x, y) already returns the color as well.

local char, fgAsRGB, bgAsRGB, fgPaletteIndex, bgPaletteIndex = component.gpu.get(x, y)
The palette index values will be nil if the colors are not from the palette.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.