Skip to content

Instantly share code, notes, and snippets.

######################################################################
#Copy this into your ares-data/derived/ directory as meatgrinder.sed #
######################################################################
:a
N
$!ba
s/\n/,/g
s|^<\?.*\?>||g
s|^,||g
uniform sampler2D tex;
uniform float r; //range 0 to 1.0
uniform float mag; //range 0.1 to 10.0
uniform vec2 target;//range -0.5 to 0.5
uniform vec4 color;
vec3 getZ(vec2 c,float r)
{
return vec3(c.x,c.y,sqrt(pow(r,2.0)-pow(c.x,2.0)-pow(c.y,2.0)));
function vec(x,y)
local v = {x = x, y = y}
setmetatable(v, _vector)
return v
end
_vector = {
__add = function(a,b)
if type(b) == "table" then
return vec(a.x + b.x, a.y + b.y)
From fd2a0e252c4676b093bbd2ea9e40ffa944e1f0a6 Mon Sep 17 00:00:00 2001
From: Scott McClaugherty <gamefreak4321@gmail.com>
Date: Sat, 6 Feb 2010 19:35:36 -0500
Subject: [PATCH] Created lua format exporter.
Signed-off-by: Scott McClaugherty <gamefreak4321@gmail.com>
---
bin/extract-ares-data.py | 8 +++-
lib/ares/lua.py | 91 ++++++++++++++++++++++++++++++++++++++++++++++
lib/ares/sncd.py | 4 +-
uniform vec2 offset;
void main()
{
gl_Position = gl_PositionIn[0];
EmitVertex();
gl_Position = gl_PositionIn[0] + vec4(offset,0,0);
EmitVertex();
EndPrimitive();
}
import("../Tests/LoaderTestModule")
import("../Tests/LoaderTestModule")
import("../Tests/LoaderTestModule")
import("../Tests/LoaderTestModule")
import("../Tests/LoaderTestModule")
if menuNum == 0 then
graphics.draw_image("Scenario/Misc/Starmap", { x = 0, y = 4 }, { x = 533, y = 364 })
-- add pointer to planet here when implemented
local top = 185
local bottom = -179
local left = -267
local right = 267
local loc = gameData.Scenarios[scenNum]["star-map-location"]
-- top line
graphics.draw_line( { x = left + loc.x, y = top }, { x = left + loc.x, y = top - loc.y + 15 }, 1, ClutColour(1, 1))
typedef enum
{
kNoPointKind = 0,
kBriefObjectKind = 1,
kBriefAbsoluteKind = 2,
kBriefFreestandingKind = 3
} briefingPointKindType;
typedef struct
{
IF(NOT SDL_FOUND)
ExternalProject_Add(SDL
DOWNLOAD_DIR ""
#URL http://www.libsdl.org/release/SDL-1.2.14.tar.gz
URL ${CMAKE_CURRENT_SOURCE_DIR}/external/SDL.tar.gz
SOURCE_DIR external/SDL/
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure
BUILD_COMMAND make -j2
INSTALL_COMMAND ""
__idmt = {
__lt = function(a, b)
if a[1] == b[1] then
if a[2] == nil then print(debug.traceback("A")) end
if b[2] == nil then print(debug.traceback("B")) end
return a[2] < b[2]
else
return a[1] < b[1]
end
end;