MODULE: RawGetRGB v1.00

Started by SSH, Fri 05/05/2006 10:44:11

Previous topic - Next topic

SSH

Well, the module name probably explains it all. This is a pretty hacky module that lets you get the RGB value of an AGS pixel: either the background or screenshot. It requires AGS 2.71. Download RawGetRGB module

// Script header for module 'RawGetRGB'

// by SSH, requires AGS 2.71

// v1.0Ã,  5 May 2006Ã,  Ã, Initial Version

// Only works in 320x200 or 320x240 mode
// other modes will probably return value of the top-right
// pixel within the 4 at the x, y given

// RawGetRGB works on room background
// Objects, Characters, GUIs, Overlays ignored
// x and y are room co-ordinates
// return value is (R*65536)+(G*256)+B
import function RawGetRGB(int x, int y);

// RawGetRGBVisible works on screenshot
// everything visible included, including cursor
// x and y are screen co-ordinates
// return value is (R*65536)+(G*256)+B
import function RawGetRGBVisible(int x, int y);
12

SMF spam blocked by CleanTalk