Browse Source

rm fenced codeblocks;

bjorn 2 years ago
parent
commit
df6c3874e3
4 changed files with 41 additions and 43 deletions
  1. 1 1
      api/init.lua
  2. 8 0
      api/lovr/filesystem/init.lua
  3. 22 42
      guides/Compiling.md
  4. 10 0
      guides/Getting_Started.md

+ 1 - 1
api/init.lua

@@ -1879,7 +1879,7 @@ return {
       description = "The `lovr.filesystem` module provides access to the filesystem.",
       key = "lovr.filesystem",
       enums = {},
-      notes = "LÖVR programs can only write to a single directory, called the save directory.  The location of the save directory is platform-specific:\n\n<table>\n  <tr>\n    <td>Windows</td>\n    <td><code>C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\LOVR\\&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>macOS</td>\n    <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>\n  </tr> </table>\n\n`<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or by using `lovr.filesystem.setIdentity`.\n\nAll filenames are relative to either the save directory or the directory containing the project source.  Files in the save directory take precedence over files in the project.",
+      notes = "LÖVR programs can only write to a single directory, called the save directory.  The location of the save directory is platform-specific:\n\n<table>\n  <tr>\n    <td>Windows</td>\n    <td><code>C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\LOVR\\&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>macOS</td>\n    <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>Linux</td>\n    <td><code>/home/&lt;user&gt;/.local/share/LOVR/&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>Android</td>\n    <td><code>/sdcard/Android/data/&lt;identity&gt;/files</code></td>\n  </tr> </table>\n\n`<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or by using `lovr.filesystem.setIdentity`.\n\nAll filenames are relative to either the save directory or the directory containing the project source.  Files in the save directory take precedence over files in the project.",
       functions = {
         {
           name = "append",

+ 8 - 0
api/lovr/filesystem/init.lua

@@ -15,6 +15,14 @@ return {
         <td>macOS</td>
         <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>
       </tr>
+      <tr>
+        <td>Linux</td>
+        <td><code>/home/&lt;user&gt;/.local/share/LOVR/&lt;identity&gt;</code></td>
+      </tr>
+      <tr>
+        <td>Android</td>
+        <td><code>/sdcard/Android/data/&lt;identity&gt;/files</code></td>
+      </tr>
     </table>
 
     `<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or

+ 22 - 42
guides/Compiling.md

@@ -26,25 +26,19 @@ Windows (CMake)
 
 First, install [lovr-deps](https://github.com/bjornbytes/lovr-deps):
 
-```
-cd lovr
-git clone --recursive https://github.com/bjornbytes/lovr-deps deps
-```
+    cd lovr
+    git clone --recursive https://github.com/bjornbytes/lovr-deps deps
 
 Next, use CMake to generate the build files:
 
-```
-mkdir build
-cd build
-cmake ..
-```
+    mkdir build
+    cd build
+    cmake ..
 
 This should output a Visual Studio solution, which can be built using Visual Studio.  Or you can
 just build it with CMake:
 
-```
-cmake --build .
-```
+    cmake --build .
 
 The executable will then exist at `/path/to/lovr/build/Debug/lovr.exe`.  The recommended way to
 create and run a game from this point is:
@@ -60,33 +54,25 @@ Unix (CMake)
 First, clone [OpenVR](https://github.com/ValveSoftware/openvr).  For this example, we'll clone
 `openvr` into the same directory that lovr was cloned into.
 
-```
-git clone --branch v1.0.5 https://github.com/ValveSoftware/openvr.git
-```
+    git clone --branch v1.0.5 https://github.com/ValveSoftware/openvr.git
 
 Next, install the other dependencies above using your package manager of choice:
 
-```
-brew install assimp glfw3 luajit physfs freetype openal-soft
-```
+    brew install assimp glfw3 luajit physfs freetype openal-soft
 
 On OSX, you'll need to set the `DYLD_LIBRARY_PATH` environment variable to be
 `/path/to/openvr/lib/osx32`.
 
 Next, build using CMake:
 
-```
-mkdir build
-cd build
-cmake .. -DOPENVR_DIR=../../openvr
-cmake --build .
-```
+    mkdir build
+    cd build
+    cmake .. -DOPENVR_DIR=../../openvr
+    cmake --build .
 
 The lovr executable should exist in `lovr/build` now.  You can run a game like this:
 
-```
-./lovr /path/to/myGame
-```
+    ./lovr /path/to/myGame
 
 You can also copy or symlink LÖVR into a directory on your `PATH` environment variable (e.g.
 `/usr/local/bin`) and run games from anywhere by just typing 'lovr'.
@@ -99,27 +85,21 @@ branch](https://github.com/bjornbytes/emscripten/tree/lovr) of Emscripten.
 
 Unix:
 
-```
-mkdir build
-cd build
-emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
-emmake make -j2
-```
+    mkdir build
+    cd build
+    emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
+    emmake make -j2
 
 Windows (from a Visual Studio Command Prompt, make sure the Emscripten SDK is on PATH):
 
-```
-mkdir build
-cd build
-emcmake cmake -G "NMake Makefiles" ..
-emmake nmake
-```
+    mkdir build
+    cd build
+    emcmake cmake -G "NMake Makefiles" ..
+    emmake nmake
 
 The above commands will output `lovr.html`, `lovr.js`, and `lovr.js.mem`.  To package a game, run:
 
-```
-python /path/to/emscripten/tools/file_packager.py game.data --preload /path/to/game@/ --js-output=game.js
-```
+    python /path/to/emscripten/tools/file_packager.py game.data --preload /path/to/game@/ --js-output=game.js
 
 Which will output `game.js` and `game.data`.  The `lovr.html` file will need to be modified to
 include `game.js` in a script tag.

+ 10 - 0
guides/Getting_Started.md

@@ -40,6 +40,7 @@ details of the code right now.  *However*, I recommend that you avoid just copyi
 Typing out each line does this magical thing to your brain that helps you read, write, and
 understand the code better.  I promise.
 
+<<<<<<< HEAD
 ```
 function lovr.draw()
   lovr.graphics.cube('line', 0, 1, 0)
@@ -51,6 +52,15 @@ name it `main.lua`.  Now we're ready to run our project!
 
 > Note: If you're trying this out without a VR headset, use the coordinates `0, 0, -2` instead of
 > `0, 1, 0` so the cube shows up correctly!
+=======
+    function lovr.draw()
+      lovr.graphics.print('hello world', 0, 1.7, -3, .5)
+    end
+
+Don't worry if you're confused about the code, it's not important to understand it all right now.
+In short, we declared the `lovr.draw` callback and used `Pass:text` in there to render some text in
+the world.  We'll learn more about how this works in the next guide.
+>>>>>>> afca132 (rm fenced codeblocks;)
 
 Running a Project
 ---