This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum InputVerbs { | |
| A, B, X, Y, | |
| LEFT, RIGHT, UP, DOWN, | |
| LOOK_LEFT, LOOK_RIGHT, LOOK_UP, LOOK_DOWN, | |
| PAD_LEFT, PAD_RIGHT, PAD_UP, PAD_DOWN, | |
| PAUSE, UNPAUSE, RUN, | |
| FRIEND_ATTACK, | |
| FRIEND_DEFEND, | |
| SHOULDERR2, // unused | |
| SPELL_FIRE, SPELL_WATER, SPELL_THUNDER, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function draw_ngon(x, y, n, length, rot) { | |
| draw_primitive_begin(pr_trianglefan); | |
| draw_vertex_colour(x, y, c_white, 1); | |
| for (var i = 0; i <= n; i++) { | |
| var angle = 2 * pi / n * i + rot; | |
| draw_vertex_colour(x + length * cos(angle), y - length * sin(angle), make_colour_hsv(255 / (n + 1) * i, 255, 255), 1); | |
| } | |
| draw_primitive_end(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tilemap_to_vertex_buffer(tilemap, format) { | |
| // vertex format: position, normal, texture | |
| var vbuff = vertex_create_buffer(); | |
| vertex_begin(vbuff, format); | |
| var ts_tileset = tilemap_get_tileset(tilemap); | |
| var ts_tex = tileset_get_texture(ts_tileset); | |
| var ts_uvs = tileset_get_uvs(ts_tileset); | |
| var ts_tex_width = texture_get_texel_width(ts_tex); | |
| var ts_tex_height = texture_get_texel_height(ts_tex); | |
| var ts_tile_width = tilemap_get_tile_width(tilemap); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Feather disable all | |
| // @ignore | |
| /* | |
| function Drago3D_Internals() { | |
| static Vertex = function(vbuff, x, y, z, nx, ny, nz, u, v, c, a) { | |
| vertex_position_3d(vbuff, x, y, z); | |
| vertex_normal(vbuff, nx, ny, nz); | |
| vertex_colour(vbuff, c, a); | |
| vertex_texcoord(vbuff, u, v); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| Basic FXAA implementation based on the code on geeks3d.com with the | |
| modification that the texture2DLod stuff was removed since it's | |
| unsupported by WebGL. | |
| GameMaker-ized by dragonitespam. | |
| -- | |
| From: |
OlderNewer