This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# MISERY LANGUAGE | |
# =============== | |
# | |
# Github | |
# ------ | |
# | |
# github.com/ozkriff/misery | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to gitlab! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Большой" варгейм | |
================= | |
Ключевая особенность этого прототипа: война происходит между странами, но | |
сами сражения относительно мелкого формата. | |
Логика | |
------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// usage: let f = 1.0f32; println(type_of(&f)); | |
pub fn type_of<T>(_: &T) -> &'static str { | |
unsafe { | |
(*std::unstable::intrinsics::get_tydesc::<T>()).name | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lib/lib.rs b/src/lib/lib.rs | |
index e5420c6..0393cbc 100644 | |
--- a/src/lib/lib.rs | |
+++ b/src/lib/lib.rs | |
@@ -836,14 +836,14 @@ impl Window { | |
unsafe { ffi::glfwWindowShouldClose(self.ptr) == ffi::TRUE } | |
} | |
/// Wrapper for `glfwSetWindowShouldClose`. | |
- pub fn set_should_close(&self, value: bool) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! verify( | |
($e: expr) => ({ | |
let result = $e; | |
let error_code = gl::GetError(); | |
if error_code != 0 { | |
let description = match error_code { | |
gl::INVALID_ENUM => "GL_INVALID_ENUM", | |
gl::INVALID_FRAMEBUFFER_OPERATION => "GL_INVALID_FRAMEBUFFER_OPERATION", | |
gl::INVALID_OPERATION => "GL_INVALID_OPERATION", | |
gl::INVALID_VALUE => "GL_INVALID_VALUE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/visualizer/visualizer.rs b/src/visualizer/visualizer.rs | |
index 17f1d22..c31ea16 100644 | |
--- a/src/visualizer/visualizer.rs | |
+++ b/src/visualizer/visualizer.rs | |
@@ -188,6 +188,11 @@ impl<'a> Visualizer<'a> { | |
"Marauder", | |
glfw::Windowed | |
).unwrap(); | |
+ { | |
+ glfw.window_hint(glfw::ContextVersion(3, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::ops::{Deref, DerefMut}; | |
#[macro_export] | |
macro_rules! new_type( | |
($new_type_name: ident, $wrapped_type: ty) => ( | |
#[derive(Ord, PartialOrd, PartialEq, Eq, Hash)] | |
pub struct $new_type_name { | |
wrapped: $wrapped_type, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/.zshrc | |
.... | |
# android stuff | |
export PATH=$PATH:~/Downloads/adt-bundle-linux-x86_64-20140702/sdk/tools | |
export PATH=$PATH:~/Downloads/adt-bundle-linux-x86_64-20140702/sdk/platform-tools | |
export ANDROID_NDK_ROOT=~/Downloads/android-ndk-r10/ | |
export PATH=$PATH:$ANDROID_NDK_ROOT | |
$ ./make-standalone-toolchain.sh --platform=android-14 --system=linux-x86_64 --install-dir=/home/ozkriff/ndk-standalone --ndk-dir=/home/ozkriff/Downloads/android-ndk-r10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make -B | |
echo "[1] build Rust source as a library .." | |
[1] build Rust source as a library .. | |
rustc --target=arm-linux-androideabi ../main.rs --crate-type=staticlib -o jni/librust_android.a | |
../r3d/gl_constants.rs:655:38: 655:56 warning: literal out of range for its type, #[warn(type_overflow)] on by default | |
../r3d/gl_constants.rs:655 pub static GL_TIMEOUT_IGNORED:uint=0xFFFFFFFFFFFFFFFF; | |
^~~~~~~~~~~~~~~~~~ | |
../r3d/ut.rs:30:3: 30:14 warning: use of deprecated item: prefer using indexing, e.g., vec[0], #[warn(deprecated)] on by default | |
../r3d/ut.rs:30 self.get(0) as *const _ as *const c_void | |
^~~~~~~~~~~ |
OlderNewer