shithub: orca

Download patch

ref: 56ea948871184712b0bc43fb2d0816eaf24524d6
parent: 59d2bcc057454b7c97dd2c62a72b839bcb2abc22
author: cancel <cancel@cancel.fm>
date: Mon Nov 26 07:31:53 EST 2018

Rename Field_buffer to Gbuffer

--- a/base.h
+++ b/base.h
@@ -32,10 +32,10 @@
 
 typedef char Glyph;
 
-typedef Glyph* Field_buffer;
+typedef Glyph* Gbuffer;
 
 typedef struct {
-  Field_buffer buffer;
+  Gbuffer buffer;
   U16 height;
   U16 width;
 } Field;
--- a/field.h
+++ b/field.h
@@ -28,7 +28,7 @@
 
 Field_load_error field_load_file(char const* filepath, Field* field);
 
-inline Glyph gbuffer_peek_relative(Field_buffer gbuffer, Usz height, Usz width,
+inline Glyph gbuffer_peek_relative(Gbuffer gbuffer, Usz height, Usz width,
                                    Usz y, Usz x, Isz delta_y, Isz delta_x) {
   Isz y0 = (Isz)y + delta_y;
   Isz x0 = (Isz)x + delta_x;
--- a/sim.c
+++ b/sim.c
@@ -48,8 +48,8 @@
   return indexed_glyphs[ib == 0 ? 0 : (ia % ib)];
 }
 
-static inline bool oper_has_neighboring_bang(Field_buffer gbuf, Usz h, Usz w,
-                                             Usz y, Usz x) {
+static inline bool oper_has_neighboring_bang(Gbuffer gbuf, Usz h, Usz w, Usz y,
+                                             Usz x) {
   return gbuffer_peek_relative(gbuf, h, w, y, x, 0, 1) == '*' ||
          gbuffer_peek_relative(gbuf, h, w, y, x, 0, -1) == '*' ||
          gbuffer_peek_relative(gbuf, h, w, y, x, 1, 0) == '*' ||
@@ -57,7 +57,7 @@
 }
 
 static inline void
-oper_move_relative_or_explode(Field_buffer field_buffer, Markmap_buffer markmap,
+oper_move_relative_or_explode(Gbuffer field_buffer, Markmap_buffer markmap,
                               Usz field_height, Usz field_width, Glyph moved,
                               Usz y, Usz x, Isz delta_y, Isz delta_x) {
   Isz y0 = (Isz)y + delta_y;