YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

Gamemaker reads the color code backwards. #7070

Open gm-bug-reporter[bot] opened 4 months ago

gm-bug-reporter[bot] commented 4 months ago

Description

When Game Maker reads a specific color, for example, the color red, it returns the result in Decimal for the color blue. I noticed that it read the code backwards, if the color had RGB (255, 145, 87), it read as RGB (87, 145, 255) and the same goes for HEX, for example, for a HEX (FF 91 57) it was read as (57 91 FF).

Steps To Reproduce

var surface = surface_create(sprite_get_width(spr_map),sprite_get_height(spr_map))

surface_set_target(surface) draw_sprite(spr_map, result, 0, 0) surface_reset_target()

for (var i = 0; i < sprite_get_width(spr_map); i++) { for (var j = 0; j < sprite_get_height(spr_map); j++) { var pixel_color = surface_getpixel(surface, i, j) show_debug_message(pixel_color) } }

Which version of GameMaker are you reporting this issue for?

IDE v2024.6.2.162 Runtime v2024.4.1.201

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

4f663b8e-8171-4e63-b897-22971730c5f1

stuckie commented 3 months ago

Should verify there aren't an odd number of flips, and ensure the documentation is updated to state that this will be platform dependent on what order is stored.