Skip to content

Instantly share code, notes, and snippets.

View eddietree's full-sized avatar

Eddie Lee eddietree

View GitHub Profile
void DrawCircle(int texture_size_x, int texture_size_y, int center_x, int center_y, int r, Color color)
{
// basically, find out the box around the circle
// iterate inside the box only for optimziation
int box_x_min = max(0, center_x - r);
int box_y_min = max(0, center_y - r);
int box_x_max = min(texture_size_x, center_x + r);
int box_y_max = min(texture_size_y, center_y + r);
// go thru each position within the box that surrounds the circle
<script>
<actors>
<actor name="Alex" description="A programmer and ninja" id="alex" />
<actor name="Eddie" description="A wannabe indie, also a ninja" id="eddie" />
</actors>
<scene id='early'>
<dialogue id="enterStore" speaker="alex">
<prompt>Hello there young man, what can I do for you?</prompt>
<option goto="browseGoods">Enter the store</option>
<script>
<actors>
<actor name="Alex" description="A programmer and ninja" id="alex1" />
<actor name="Eddie" description="A wannabe indie, also a ninja" id="eddie1" />
</actors>
</script>