diff --git a/Makefile b/Makefile index cf92cd8..0c02f1d 100644 --- a/Makefile +++ b/Makefile @@ -191,13 +191,13 @@ COMMON_PHASE2 = common/tasks.fs common/utils.fs common/locals.fs \ common/streams.fs common/blocks.fs COMMON_DESKTOP = common/ansi.fs common/desktop.fs \ - common/grf.fs common/grf_utils.fs common/heart.fs + common/graphics.fs common/graphics_utils.fs common/heart.fs POSIX_BOOT = $(COMMON_PHASE1) \ posix/posix.fs posix/allocation.fs posix/termios.fs \ $(COMMON_PHASE2) $(COMMON_DESKTOP) \ posix/x11.fs \ - posix/grf.fs \ + posix/graphics.fs \ posix/sockets.fs posix/telnetd.fs posix/httpd.fs posix/web_interface.fs \ posix/autoboot.fs \ common/fini.fs @@ -213,7 +213,7 @@ WINDOWS_BOOT = $(COMMON_PHASE1) \ windows/windows_messages.fs \ windows/allocation.fs \ $(COMMON_PHASE2) $(COMMON_DESKTOP) \ - windows/grf.fs \ + windows/graphics.fs \ posix/autoboot.fs \ common/fini.fs $(GEN)/windows_boot.h: common/source_to_string.js $(WINDOWS_BOOT) | $(GEN) diff --git a/common/forth_namespace_tests.fs b/common/forth_namespace_tests.fs index 5f36027..6f1ae7e 100644 --- a/common/forth_namespace_tests.fs +++ b/common/forth_namespace_tests.fs @@ -453,7 +453,7 @@ e: check-opcodes ;e e: check-desktop - out: grf + out: graphics check-args check-ansi ;e @@ -474,7 +474,7 @@ DEFINED? windows [IF] e: test-windows-forth-namespace internals voclist out: internals - out: grf + out: graphics out: ansi out: editor out: streams @@ -513,7 +513,7 @@ e: test-posix-forth-namespace internals voclist out: sockets out: internals - out: grf + out: graphics out: ansi out: editor out: streams diff --git a/common/grf.fs b/common/graphics.fs similarity index 95% rename from common/grf.fs rename to common/graphics.fs index 3725699..1dea11d 100644 --- a/common/grf.fs +++ b/common/graphics.fs @@ -36,7 +36,7 @@ \ Key/Button constants: \ LEFT-BUTTON MIDDLE-BUTTON RIGHT-BUTTON -vocabulary grf grf definitions +vocabulary graphics graphics definitions vocabulary internals 0 constant IDLE @@ -70,7 +70,7 @@ key-state key-count erase : key-state! ( f k ) key-count mod key-state + c! ; -grf definitions also internals +graphics definitions also internals : pixel ( w h -- a ) width * + 4* backbuffer + ; diff --git a/common/grf_utils.fs b/common/graphics_utils.fs similarity index 97% rename from common/grf_utils.fs rename to common/graphics_utils.fs index 7bfc85b..38781d3 100644 --- a/common/grf_utils.fs +++ b/common/graphics_utils.fs @@ -28,7 +28,7 @@ \ screen>g ( x y -- x' y' ) Transform screen to viewport also internals -grf definitions +graphics definitions 0 value color @@ -62,7 +62,7 @@ gstack value gp top h 1- for left over w hline 1+ next drop ; -grf definitions also internals +graphics definitions also internals : box { left top w h } left sx * tx + 16 rshift diff --git a/common/grf_test.fs b/common/grf_test.fs index 60daa2b..b6bba72 100755 --- a/common/grf_test.fs +++ b/common/grf_test.fs @@ -13,7 +13,7 @@ \ See the License for the specific language governing permissions and \ limitations under the License. -grf +graphics -1 -1 window diff --git a/common/heart.fs b/common/heart.fs index 09fc3c5..0a56123 100644 --- a/common/heart.fs +++ b/common/heart.fs @@ -16,7 +16,7 @@ \ Drawing: \ heart ( x y h -- ) -grf internals definitions +graphics internals definitions \ For t = 0 to 2pi \ x = -16 to 16 @@ -79,7 +79,7 @@ heart-end heart-size 0 fill loop ; -grf definitions also internals +graphics definitions also internals : heart 0 { x y s r } x sx * tx + 16 rshift diff --git a/examples/bezier_test.fs b/examples/bezier_test.fs index 747d6e7..e357f45 100644 --- a/examples/bezier_test.fs +++ b/examples/bezier_test.fs @@ -14,7 +14,7 @@ \ See the License for the specific language governing permissions and \ limitations under the License. -also grf +also graphics also structures struct ScanSpan diff --git a/examples/boxes.fs b/examples/boxes.fs index 1c9c795..c71dd36 100644 --- a/examples/boxes.fs +++ b/examples/boxes.fs @@ -13,7 +13,7 @@ \ See the License for the specific language governing permissions and \ limitations under the License. -grf +graphics -1 -1 window diff --git a/examples/heart_game.fs b/examples/heart_game.fs index 08e0e01..2178939 100755 --- a/examples/heart_game.fs +++ b/examples/heart_game.fs @@ -14,7 +14,7 @@ \ See the License for the specific language governing permissions and \ limitations under the License. -grf also structures +graphics also structures 640 480 window 1 31 lshift 1- constant max-random diff --git a/examples/heart_graph.fs b/examples/heart_graph.fs index 63b19cf..ecd9802 100644 --- a/examples/heart_graph.fs +++ b/examples/heart_graph.fs @@ -14,7 +14,7 @@ \ See the License for the specific language governing permissions and \ limitations under the License. -grf +graphics 640 480 window : run diff --git a/examples/min_grf.fs b/examples/min_grf.fs index 204ded3..03526f9 100644 --- a/examples/min_grf.fs +++ b/examples/min_grf.fs @@ -13,7 +13,7 @@ \ See the License for the specific language governing permissions and \ limitations under the License. -grf +graphics -1 -1 window diff --git a/posix/grf.fs b/posix/graphics.fs similarity index 97% rename from posix/grf.fs rename to posix/graphics.fs index 505adec..cc2acf9 100644 --- a/posix/grf.fs +++ b/posix/graphics.fs @@ -14,12 +14,12 @@ ( Lazy load expand Graphics for Xlib ) -grf definitions +graphics definitions : window r| also x11 -forth grf internals definitions +forth graphics internals definitions also posix also x11 0 value display @@ -129,7 +129,7 @@ StructureNotifyMask or constant EVENT-MASK then ; -also grf definitions +also graphics definitions : window { w h } w 0< if 640 to w 480 to h then diff --git a/windows/grf.fs b/windows/graphics.fs similarity index 98% rename from windows/grf.fs rename to windows/graphics.fs index b0d178b..79b3261 100644 --- a/windows/grf.fs +++ b/windows/graphics.fs @@ -14,7 +14,7 @@ ( Expand Graphics for Windows ) -grf internals definitions +graphics internals definitions also windows z" GrfClass" constant GrfClassName @@ -116,7 +116,7 @@ cell allocate throw to backbuffer hwnd msg w l DefWindowProcA ; -grf definitions +graphics definitions also internals also windows