diff --git a/basis/game-input/dinput/summary.txt b/basis/game-input/dinput/summary.txt deleted file mode 100755 index f758a5f83a..0000000000 --- a/basis/game-input/dinput/summary.txt +++ /dev/null @@ -1 +0,0 @@ -DirectInput backend for game-input diff --git a/basis/game-input/iokit/summary.txt b/basis/game-input/iokit/summary.txt deleted file mode 100644 index 8fc5d827d0..0000000000 --- a/basis/game-input/iokit/summary.txt +++ /dev/null @@ -1 +0,0 @@ -IOKit HID Manager backend for game-input diff --git a/basis/game-input/authors.txt b/basis/game/input/authors.txt similarity index 100% rename from basis/game-input/authors.txt rename to basis/game/input/authors.txt diff --git a/basis/game-input/dinput/authors.txt b/basis/game/input/dinput/authors.txt similarity index 100% rename from basis/game-input/dinput/authors.txt rename to basis/game/input/dinput/authors.txt diff --git a/basis/game-input/dinput/dinput.factor b/basis/game/input/dinput/dinput.factor similarity index 99% rename from basis/game-input/dinput/dinput.factor rename to basis/game/input/dinput/dinput.factor index e6a8cca477..f03147205f 100755 --- a/basis/game-input/dinput/dinput.factor +++ b/basis/game/input/dinput/dinput.factor @@ -1,6 +1,6 @@ USING: accessors alien alien.c-types alien.strings arrays assocs byte-arrays combinators combinators.short-circuit -continuations game-input game-input.dinput.keys-array +continuations game.input game.input.dinput.keys-array io.encodings.utf16 io.encodings.utf16n kernel locals math math.bitwise math.rectangles namespaces parser sequences shuffle specialized-arrays ui.backend.windows vectors @@ -8,7 +8,7 @@ windows.com windows.dinput windows.dinput.constants windows.errors windows.kernel32 windows.messages windows.ole32 windows.user32 classes.struct alien.data ; SPECIALIZED-ARRAY: DIDEVICEOBJECTDATA -IN: game-input.dinput +IN: game.input.dinput CONSTANT: MOUSE-BUFFER-SIZE 16 diff --git a/basis/game-input/dinput/keys-array/keys-array.factor b/basis/game/input/dinput/keys-array/keys-array.factor similarity index 91% rename from basis/game-input/dinput/keys-array/keys-array.factor rename to basis/game/input/dinput/keys-array/keys-array.factor index a8813b0397..3426b89141 100755 --- a/basis/game-input/dinput/keys-array/keys-array.factor +++ b/basis/game/input/dinput/keys-array/keys-array.factor @@ -1,6 +1,6 @@ USING: sequences sequences.private math accessors alien.data ; -IN: game-input.dinput.keys-array +IN: game.input.dinput.keys-array TUPLE: keys-array { underlying sequence read-only } diff --git a/basis/game/input/dinput/summary.txt b/basis/game/input/dinput/summary.txt new file mode 100755 index 0000000000..69a3737072 --- /dev/null +++ b/basis/game/input/dinput/summary.txt @@ -0,0 +1 @@ +DirectInput backend for game.input diff --git a/basis/game-input/dinput/tags.txt b/basis/game/input/dinput/tags.txt similarity index 100% rename from basis/game-input/dinput/tags.txt rename to basis/game/input/dinput/tags.txt diff --git a/basis/game-input/game-input-docs.factor b/basis/game/input/input-docs.factor similarity index 99% rename from basis/game-input/game-input-docs.factor rename to basis/game/input/input-docs.factor index 42e4163696..bef08c4d2f 100755 --- a/basis/game-input/game-input-docs.factor +++ b/basis/game/input/input-docs.factor @@ -1,6 +1,6 @@ USING: help.markup help.syntax kernel ui.gestures quotations sequences strings math ; -IN: game-input +IN: game.input ARTICLE: "game-input" "Game controller input" "The " { $vocab-link "game-input" } " vocabulary provides cross-platform access to game controller devices such as joysticks and gamepads. It also provides an interface for polling raw keyboard and mouse input." $nl @@ -136,8 +136,8 @@ HELP: controller-state { "A value of " { $link f } " in any slot (besides the elements of " { $snippet "buttons" } ") indicates that the corresponding element is not present on the device." } } } ; HELP: keyboard-state -{ $class-description "The " { $link read-keyboard } " word returns objects of this class. The " { $snippet "keys" } " slot of a " { $snippet "keyboard-state" } " object contains a " { $link sequence } " of 256 members representing the state of the keys on the keyboard. Each element is a boolean value indicating whether the corresponding key is pressed. The sequence is indexed by scancode as defined under usage page 7 of the USB HID standard. Named scancode constants are provided in the " { $vocab-link "game-input.scancodes" } " vocabulary." } -{ $warning "The scancodes used to index " { $snippet "keyboard-state" } " objects correspond to physical key positions on the keyboard--they are unaffected by keymaps, modifier keys, or other operating environment postprocessing. The face value of the constants in " { $vocab-link "game-input.scancodes" } " do not necessarily correspond to what the user expects the key to type. Because of this, " { $link read-keyboard } " should not be used for text entry purposes. The Factor UI's standard gesture mechanism should be used in cases where the logical meaning of keypresses is needed; see " { $link "keyboard-gestures" } "." } ; +{ $class-description "The " { $link read-keyboard } " word returns objects of this class. The " { $snippet "keys" } " slot of a " { $snippet "keyboard-state" } " object contains a " { $link sequence } " of 256 members representing the state of the keys on the keyboard. Each element is a boolean value indicating whether the corresponding key is pressed. The sequence is indexed by scancode as defined under usage page 7 of the USB HID standard. Named scancode constants are provided in the " { $vocab-link "game.input.scancodes" } " vocabulary." } +{ $warning "The scancodes used to index " { $snippet "keyboard-state" } " objects correspond to physical key positions on the keyboard--they are unaffected by keymaps, modifier keys, or other operating environment postprocessing. The face value of the constants in " { $vocab-link "game.input.scancodes" } " do not necessarily correspond to what the user expects the key to type. Because of this, " { $link read-keyboard } " should not be used for text entry purposes. The Factor UI's standard gesture mechanism should be used in cases where the logical meaning of keypresses is needed; see " { $link "keyboard-gestures" } "." } ; HELP: mouse-state { $class-description "The " { $link read-mouse } " word returns objects of this class. " { $snippet "mouse-state" } " objects have the following slots:" diff --git a/basis/game-input/game-input-tests.factor b/basis/game/input/input-tests.factor similarity index 69% rename from basis/game-input/game-input-tests.factor rename to basis/game/input/input-tests.factor index 10f3b5d7f5..bd993bf811 100644 --- a/basis/game-input/game-input-tests.factor +++ b/basis/game/input/input-tests.factor @@ -1,6 +1,6 @@ -USING: ui game-input tools.test kernel system threads calendar +USING: ui game.input tools.test kernel system threads calendar combinators.short-circuit ; -IN: game-input.tests +IN: game.input.tests os { [ windows? ] [ macosx? ] } 1|| [ [ ] [ open-game-input ] unit-test diff --git a/basis/game-input/game-input.factor b/basis/game/input/input.factor similarity index 95% rename from basis/game-input/game-input.factor rename to basis/game/input/input.factor index c21b900d8c..377a89a884 100755 --- a/basis/game-input/game-input.factor +++ b/basis/game/input/input.factor @@ -1,6 +1,6 @@ USING: arrays accessors continuations kernel math system sequences namespaces init vocabs vocabs.loader combinators ; -IN: game-input +IN: game.input SYMBOLS: game-input-backend game-input-opened ; @@ -91,7 +91,7 @@ M: mouse-state clone call-next-method dup buttons>> clone >>buttons ; { - { [ os windows? ] [ "game-input.dinput" require ] } - { [ os macosx? ] [ "game-input.iokit" require ] } + { [ os windows? ] [ "game.input.dinput" require ] } + { [ os macosx? ] [ "game.input.iokit" require ] } { [ t ] [ ] } } cond diff --git a/basis/game-input/iokit/authors.txt b/basis/game/input/iokit/authors.txt similarity index 100% rename from basis/game-input/iokit/authors.txt rename to basis/game/input/iokit/authors.txt diff --git a/basis/game-input/iokit/iokit.factor b/basis/game/input/iokit/iokit.factor similarity index 99% rename from basis/game-input/iokit/iokit.factor rename to basis/game/input/iokit/iokit.factor index 85f058f283..258f19ed5e 100755 --- a/basis/game-input/iokit/iokit.factor +++ b/basis/game/input/iokit/iokit.factor @@ -3,9 +3,9 @@ kernel cocoa.enumeration destructors math.parser cocoa.application sequences locals combinators.short-circuit threads namespaces assocs arrays combinators hints alien core-foundation.run-loop accessors sequences.private -alien.c-types alien.data math parser game-input vectors +alien.c-types alien.data math parser game.input vectors bit-arrays ; -IN: game-input.iokit +IN: game.input.iokit SINGLETON: iokit-game-input-backend diff --git a/basis/game/input/iokit/summary.txt b/basis/game/input/iokit/summary.txt new file mode 100644 index 0000000000..5db3d08440 --- /dev/null +++ b/basis/game/input/iokit/summary.txt @@ -0,0 +1 @@ +IOKit HID Manager backend for game.input diff --git a/basis/game-input/iokit/tags.txt b/basis/game/input/iokit/tags.txt similarity index 100% rename from basis/game-input/iokit/tags.txt rename to basis/game/input/iokit/tags.txt diff --git a/basis/game-input/scancodes/authors.txt b/basis/game/input/scancodes/authors.txt similarity index 100% rename from basis/game-input/scancodes/authors.txt rename to basis/game/input/scancodes/authors.txt diff --git a/basis/game-input/scancodes/scancodes.factor b/basis/game/input/scancodes/scancodes.factor similarity index 99% rename from basis/game-input/scancodes/scancodes.factor rename to basis/game/input/scancodes/scancodes.factor index 3303a51c6f..cfa659e57a 100644 --- a/basis/game-input/scancodes/scancodes.factor +++ b/basis/game/input/scancodes/scancodes.factor @@ -1,4 +1,4 @@ -IN: game-input.scancodes +IN: game.input.scancodes CONSTANT: key-undefined HEX: 0000 CONSTANT: key-error-roll-over HEX: 0001 diff --git a/basis/game-input/scancodes/summary.txt b/basis/game/input/scancodes/summary.txt similarity index 100% rename from basis/game-input/scancodes/summary.txt rename to basis/game/input/scancodes/summary.txt diff --git a/basis/game-input/scancodes/tags.txt b/basis/game/input/scancodes/tags.txt similarity index 100% rename from basis/game-input/scancodes/tags.txt rename to basis/game/input/scancodes/tags.txt diff --git a/basis/game-input/summary.txt b/basis/game/input/summary.txt similarity index 100% rename from basis/game-input/summary.txt rename to basis/game/input/summary.txt diff --git a/basis/game-input/tags.txt b/basis/game/input/tags.txt similarity index 100% rename from basis/game-input/tags.txt rename to basis/game/input/tags.txt diff --git a/extra/game-loop/game-loop.factor b/extra/game/loop/loop.factor similarity index 97% rename from extra/game-loop/game-loop.factor rename to extra/game/loop/loop.factor index 5f78c6770c..1346988fd1 100644 --- a/extra/game-loop/game-loop.factor +++ b/extra/game/loop/loop.factor @@ -1,7 +1,7 @@ USING: accessors calendar continuations destructors kernel math math.order namespaces system threads ui ui.gadgets.worlds sequences ; -IN: game-loop +IN: game.loop TUPLE: game-loop { tick-length integer read-only } @@ -106,4 +106,4 @@ M: game-loop dispose USING: vocabs vocabs.loader ; -"prettyprint" vocab [ "game-loop.prettyprint" require ] when +"prettyprint" vocab [ "game.loop.prettyprint" require ] when diff --git a/extra/game-loop/prettyprint/prettyprint.factor b/extra/game/loop/prettyprint/prettyprint.factor similarity index 77% rename from extra/game-loop/prettyprint/prettyprint.factor rename to extra/game/loop/prettyprint/prettyprint.factor index 8b20dd4c9d..44649263de 100644 --- a/extra/game-loop/prettyprint/prettyprint.factor +++ b/extra/game/loop/prettyprint/prettyprint.factor @@ -1,6 +1,6 @@ ! (c)2009 Joe Groff bsd license -USING: accessors debugger game-loop io ; -IN: game-loop.prettyprint +USING: accessors debugger game.loop io ; +IN: game.loop.prettyprint M: game-loop-error error. "An error occurred inside a game loop." print diff --git a/extra/game-worlds/game-worlds.factor b/extra/game/worlds/worlds.factor similarity index 85% rename from extra/game-worlds/game-worlds.factor rename to extra/game/worlds/worlds.factor index 542c48fbae..399c5d1902 100644 --- a/extra/game-worlds/game-worlds.factor +++ b/extra/game/worlds/worlds.factor @@ -1,6 +1,6 @@ -USING: accessors game-input game-loop kernel math ui.gadgets +USING: accessors game.input game.loop kernel math ui.gadgets ui.gadgets.worlds ui.gestures threads ; -IN: game-worlds +IN: game.worlds TUPLE: game-world < world game-loop diff --git a/extra/gpu/demos/bunny/bunny.factor b/extra/gpu/demos/bunny/bunny.factor index d6c7456d63..2e292f0141 100755 --- a/extra/gpu/demos/bunny/bunny.factor +++ b/extra/gpu/demos/bunny/bunny.factor @@ -1,6 +1,6 @@ ! (c)2009 Joe Groff bsd license USING: accessors alien.c-types arrays classes.struct combinators -combinators.short-circuit game-worlds gpu gpu.buffers +combinators.short-circuit game.worlds gpu gpu.buffers gpu.util.wasd gpu.framebuffers gpu.render gpu.shaders gpu.state gpu.textures gpu.util grouping http.client images images.loader io io.encodings.ascii io.files io.files.temp kernel math diff --git a/extra/gpu/demos/raytrace/raytrace.factor b/extra/gpu/demos/raytrace/raytrace.factor index 339f192416..5a3d5864fb 100644 --- a/extra/gpu/demos/raytrace/raytrace.factor +++ b/extra/gpu/demos/raytrace/raytrace.factor @@ -1,5 +1,5 @@ ! (c)2009 Joe Groff bsd license -USING: accessors arrays combinators.tuple game-loop game-worlds +USING: accessors arrays combinators.tuple game.loop game.worlds generalizations gpu gpu.render gpu.shaders gpu.util gpu.util.wasd kernel literals math math.matrices math.order math.vectors method-chains sequences ui ui.gadgets ui.gadgets.worlds diff --git a/extra/gpu/util/wasd/wasd.factor b/extra/gpu/util/wasd/wasd.factor index 496735f0db..1f1187fd21 100644 --- a/extra/gpu/util/wasd/wasd.factor +++ b/extra/gpu/util/wasd/wasd.factor @@ -1,6 +1,6 @@ ! (c)2009 Joe Groff bsd license USING: accessors arrays combinators.smart game-input -game-input.scancodes game-loop game-worlds +game.input.scancodes game.loop game.worlds gpu.render gpu.state kernel literals locals math math.constants math.functions math.matrices math.order math.vectors opengl.gl sequences diff --git a/extra/joystick-demo/joystick-demo.factor b/extra/joystick-demo/joystick-demo.factor index 3f24a5bb39..90e28594e7 100755 --- a/extra/joystick-demo/joystick-demo.factor +++ b/extra/joystick-demo/joystick-demo.factor @@ -1,6 +1,6 @@ USING: ui ui.gadgets sequences kernel arrays math colors colors.constants ui.render ui.pens.polygon ui.pens.solid math.vectors -accessors fry ui.gadgets.packs game-input ui.gadgets.labels +accessors fry ui.gadgets.packs game.input ui.gadgets.labels ui.gadgets.borders alarms calendar locals strings ui.gadgets.buttons combinators math.parser assocs threads ; IN: joystick-demo diff --git a/extra/key-caps/key-caps.factor b/extra/key-caps/key-caps.factor index b58870fadc..da901ed61e 100755 --- a/extra/key-caps/key-caps.factor +++ b/extra/key-caps/key-caps.factor @@ -1,4 +1,4 @@ -USING: game-input game-input.scancodes +USING: game.input game.input.scancodes kernel ui.gadgets ui.gadgets.buttons sequences accessors words arrays assocs math calendar fry alarms ui ui.gadgets.borders ui.gestures ; diff --git a/extra/terrain/terrain.factor b/extra/terrain/terrain.factor index 050a835422..18e49f3e2f 100644 --- a/extra/terrain/terrain.factor +++ b/extra/terrain/terrain.factor @@ -1,12 +1,12 @@ ! (c)2009 Joe Groff, Doug Coleman. bsd license -USING: accessors arrays combinators game-input game-loop -game-input.scancodes grouping kernel literals locals +USING: accessors arrays combinators game.input game.loop +game.input.scancodes grouping kernel literals locals math math.constants math.functions math.matrices math.order math.vectors opengl opengl.capabilities opengl.gl opengl.shaders opengl.textures opengl.textures.private sequences sequences.product specialized-arrays terrain.generation terrain.shaders ui ui.gadgets -ui.gadgets.worlds ui.pixel-formats game-worlds method-chains +ui.gadgets.worlds ui.pixel-formats game.worlds method-chains math.affine-transforms noise ui.gestures combinators.short-circuit destructors grid-meshes ; FROM: alien.c-types => float ;