Skip to content

Instantly share code, notes, and snippets.

@katsaii
Last active September 13, 2019 22:47
Show Gist options
  • Save katsaii/d77a21b94cb967e411db6d37ebfab57d to your computer and use it in GitHub Desktop.
Save katsaii/d77a21b94cb967e411db6d37ebfab57d to your computer and use it in GitHub Desktop.
Obfuscated code to draw the contents of a 2D array to the screen on a single line + JSDoc information.
///@param id,size,x,y
var G=argument0,W,H,S=argument1,i=0,j,k,a,b;if ds_exists(G,5){W=ds_grid_width(G)H=ds_grid_height(G)while(i<W*H){j=i%W;k=i++div W;a=argument2+j*S;b=argument3+k*S;draw_rectangle(a,b,a+S,b+S,1)draw_text(a,b,G[#j,k])}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment