You are not logged in.
Pages: 1
*a number of crashes later...*
Well, it seems I've jumped the gun here. I can't seem to replicate it in a new, identical project file, but the original project file still does it.
http://host-a.net/tarkimos/bad_primitive.gm6
Password is 'xot' (I don't want anyone downloading without knowing what it is, just in case it hurts their computer ).
(Username is 'tarkimos'.)
Okay, well it's pretty obvious that you shouldn't try to draw 'triangle-based' primitives (eg. pr_trianglelist, pr_trianglestrip, etc.) with less than three points because nothing will be drawn (trying to draw a triangle with two points draws nothing). When trying to draw a triangle with one point one would expect nothing to be drawn (just as with two points). But instead, it causes a BSOD (I'm guessing that draw_line_width_color uses triangle primitives also).
I've only tested with pr_trianglestrip and pr_trianglefan, but I'd expect pr_trianglelist to act similarly.
The draw_surface() function and its many draw_surface_*() brethren are unaffected by the use of draw_set_alpha().
As are draw_sprite, draw_background, etc.
draw_set_alpha(alpha) Sets the alpha transparency value to be used from now on for drawing primitives.
In the script bin_to_bytes the variable out just 'appears' on the 4th last line and isn't initialized anywhere else.
Error?
Thanks xot, that works. I think I better read up on bitwise operations now.
PS. Sorry for the inconvenience of uploading the .gm6 and making you supply your own .bmp. I meant to upload a .zip.
NEW QUESTION
Now, with my previous code, I'm trying to encode some text into the 'unused' alpha 'channel' of the bmp.
I can't get it to save/load (I can't tell)!
This is what I've got so far.
For one, that's not how little-endian 32-bit integers work. You can't just add the byte values together. Just like how 1111 doesn't have the value "4". You're completely ignoring place value.
Wow, it was some extreme co-incidence that it worked on that image.
Now I'm confused...
So I would do it like this?
repeat(4)
width+=string(file_bin_read_byte(file));
width=bin_to_dec(bytes_to_bin(width));
I'm trying to develop a script for loading the contents of a .BMP file into an array, and a script to save them back into a .bmp.
I can load alright, but the file always becomes unusable when I save.
A .zip of the source file and an image is located here.
Does anyone know what I'm doing wrong? Or does anybody have a working script?
NOTE: I know I'm not utilizing a lot of the header data, but I'm just trying to get the basic working before I go further.
Hi, I'm Josh. I commonly go under the display name of $pecter (or tarkimos on sites that do not allow '$').
I've matured quite a bit since I started using GameMaker 5.x in late 2003 (as my earlier posts on the GMC will demonstrate). My 'game making' skills have also increased greatly although there are some aspects (multiplayer) I still haven't tried. Steadily, I've been getting more generous towards the GMC. Answering questions and making examples is somehow more interesting than actually making a game now. And for the record I don't like playing games (I got Half-life 2 ages ago and still haven't finished it).
Off computers;
I like a lot of sports particularly football (soccer), [field] hockey, and most of all, competitive swimming (as my trophy shelves demonstrate ).
I live in Australia and like all Australians; I ride kangaroos to work.
Maybe he only just learned that at school? I've seen worse.
I'm sure there are still people running around on the GMC thinking that their
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
is 'God's gift to game making!'
or that combining a few functions counts as a script.
eg.
//draw_set_everything(color,alpha,font,halign,valign)
draw_set_color(argument0);
draw_set_alpha(argument1);
draw_set_font(argument2);
draw_set_halign(argument3);
draw_set_valign(argument4);
Pages: 1