Skip to content

Instantly share code, notes, and snippets.

static str: &'static [u8] = b"Hello\0";
#[repr(C)]
pub struct Foo {
ptr: *const i8
}
#[no_mangle]
pub extern "C" fn new_foo() -> Foo {
Foo {
rustc --crate-type=dylib foo.rs
rustc caller.rs
---
# BasedOnStyle: LLVM
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: false
@crumblingstatue
crumblingstatue / portaudio.patch
Last active December 31, 2015 20:18
[patch] NoLifeStory: Use PortAudio instead of rtaudio
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index b8105ea..5937c13 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -17,9 +17,8 @@ FILE(GLOB NOLIFE_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
list(REMOVE_ITEM NOLIFE_SOURCES
ClassicUI.cpp
physics.cpp
- player.cpp
- sound.cpp)
stick = {
image = love.graphics.newImage("stick.png"),
x = 0,
y = 0
}
guy = {
image = love.graphics.newImage("guy.png"),
x = 0,
y = 0,
[ 5%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/node.cpp.o
In file included from /home/snake/projects/extern/NoLifeStory/nx/node.cpp:20:0:
/home/snake/projects/extern/NoLifeStory/nx/file_impl.hpp:48:20: error: declaration of 'int nl::_file_data::file' [-fpermissive]
int file = 0;
^
In file included from /home/snake/projects/extern/NoLifeStory/nx/file_impl.hpp:20:0,
from /home/snake/projects/extern/NoLifeStory/nx/node.cpp:20:
/home/snake/projects/extern/NoLifeStory/nx/file.hpp:26:11: error: changes meaning of 'file' from 'class nl::file' [-fpermissive]
class file {
^
16:45:39: Running steps for project NoLifeStory...
16:45:39: Starting: "/usr/bin/make" all
-- Configuring done
-- Generating done
-- Build files have been written to: /home/snake/projects/extern/NoLifeStory-build
Scanning dependencies of target NoLifeNx
[ 5%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/bitmap.cpp.o
[ 11%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/audio.cpp.o
[ 16%] Building CXX object nx/CMakeFiles/NoLifeNx.dir/file.cpp.o
/home/snake/projects/extern/NoLifeStory/nx/file.cpp: In member function 'void nl::file::open(std::string)':
########################################
## fbpanel configuration file ##
########################################
Global {
edge = bottom
allign = center
margin = 0
widthtype = percent
width = 100
#include <QApplication>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
}
URxvt.scrollBar: false
URxvt.font: xft:terminus
URxvt.background: black
URxvt.foreground: white
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/chromium
URxvt.matcher.button: 1
URxvt.colorUL: #4682B4