split everything in roc_samples out of the main roc project
refactored as needed to make roc work as a shared library, without any stupid import hacks
BIN
data/font/coure10.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
102
data/font/coure10.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
9,14
|
||||
13,8
|
||||
128,128
|
||||
charsizes
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
||||
8,13
|
BIN
data/font/micross20.png
Normal file
After Width: | Height: | Size: 14 KiB |
102
data/font/micross20.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
21,25
|
||||
11,9
|
||||
256,256
|
||||
charsizes
|
||||
5,24
|
||||
6,24
|
||||
7,24
|
||||
13,24
|
||||
11,24
|
||||
17,24
|
||||
13,24
|
||||
4,24
|
||||
7,24
|
||||
7,24
|
||||
8,24
|
||||
11,24
|
||||
6,24
|
||||
7,24
|
||||
6,24
|
||||
6,24
|
||||
11,24
|
||||
12,24
|
||||
12,24
|
||||
11,24
|
||||
12,24
|
||||
11,24
|
||||
11,24
|
||||
11,24
|
||||
11,24
|
||||
11,24
|
||||
6,24
|
||||
6,24
|
||||
12,24
|
||||
11,24
|
||||
12,24
|
||||
12,24
|
||||
20,24
|
||||
15,24
|
||||
14,24
|
||||
14,24
|
||||
15,24
|
||||
14,24
|
||||
12,24
|
||||
15,24
|
||||
15,24
|
||||
6,24
|
||||
10,24
|
||||
14,24
|
||||
12,24
|
||||
17,24
|
||||
15,24
|
||||
16,24
|
||||
14,24
|
||||
16,24
|
||||
14,24
|
||||
13,24
|
||||
13,24
|
||||
15,24
|
||||
14,24
|
||||
19,24
|
||||
14,24
|
||||
14,24
|
||||
13,24
|
||||
6,24
|
||||
6,24
|
||||
6,24
|
||||
9,24
|
||||
11,24
|
||||
7,24
|
||||
11,24
|
||||
11,24
|
||||
10,24
|
||||
11,24
|
||||
11,24
|
||||
7,24
|
||||
11,24
|
||||
11,24
|
||||
4,24
|
||||
5,24
|
||||
10,24
|
||||
4,24
|
||||
16,24
|
||||
11,24
|
||||
12,24
|
||||
11,24
|
||||
11,24
|
||||
7,24
|
||||
11,24
|
||||
7,24
|
||||
11,24
|
||||
10,24
|
||||
15,24
|
||||
10,24
|
||||
10,24
|
||||
11,24
|
||||
7,24
|
||||
6,24
|
||||
8,24
|
||||
12,24
|
||||
6,24
|
BIN
data/font/micross42.png
Normal file
After Width: | Height: | Size: 34 KiB |
102
data/font/micross42.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
43,49
|
||||
11,10
|
||||
512,512
|
||||
charsizes
|
||||
11,48
|
||||
12,48
|
||||
15,48
|
||||
25,48
|
||||
23,48
|
||||
38,48
|
||||
28,48
|
||||
8,48
|
||||
15,48
|
||||
15,48
|
||||
16,48
|
||||
24,48
|
||||
12,48
|
||||
13,48
|
||||
12,48
|
||||
12,48
|
||||
24,48
|
||||
24,48
|
||||
23,48
|
||||
24,48
|
||||
24,48
|
||||
24,48
|
||||
24,48
|
||||
23,48
|
||||
24,48
|
||||
24,48
|
||||
12,48
|
||||
12,48
|
||||
24,48
|
||||
24,48
|
||||
24,48
|
||||
24,48
|
||||
42,48
|
||||
30,48
|
||||
27,48
|
||||
30,48
|
||||
30,48
|
||||
28,48
|
||||
26,48
|
||||
33,48
|
||||
30,48
|
||||
12,48
|
||||
21,48
|
||||
28,48
|
||||
23,48
|
||||
34,48
|
||||
30,48
|
||||
33,48
|
||||
28,48
|
||||
33,48
|
||||
30,48
|
||||
28,48
|
||||
26,48
|
||||
30,48
|
||||
28,48
|
||||
40,48
|
||||
28,48
|
||||
28,48
|
||||
26,48
|
||||
12,48
|
||||
12,48
|
||||
12,48
|
||||
20,48
|
||||
24,48
|
||||
14,48
|
||||
24,48
|
||||
23,48
|
||||
21,48
|
||||
23,48
|
||||
23,48
|
||||
13,48
|
||||
23,48
|
||||
24,48
|
||||
10,48
|
||||
12,48
|
||||
22,48
|
||||
10,48
|
||||
36,48
|
||||
24,48
|
||||
22,48
|
||||
23,48
|
||||
23,48
|
||||
15,48
|
||||
21,48
|
||||
12,48
|
||||
24,48
|
||||
21,48
|
||||
31,48
|
||||
21,48
|
||||
21,48
|
||||
21,48
|
||||
14,48
|
||||
11,48
|
||||
13,48
|
||||
25,48
|
||||
12,48
|
BIN
data/font/monopro6.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
102
data/font/monopro6.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
7,11
|
||||
13,8
|
||||
128,128
|
||||
charsizes
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
BIN
data/font/proggysquaresz12.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
102
data/font/proggysquaresz12.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
8,12
|
||||
12,8
|
||||
128,128
|
||||
charsizes
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
||||
7,11
|
BIN
data/font/proggytinysz12.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
102
data/font/proggytinysz12.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
7,11
|
||||
13,8
|
||||
128,128
|
||||
charsizes
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
||||
6,10
|
BIN
data/font/vgafix12.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
102
data/font/vgafix12.tfd
Normal file
|
@ -0,0 +1,102 @@
|
|||
fontheader
|
||||
32,128
|
||||
9,16
|
||||
14,8
|
||||
128,128
|
||||
charsizes
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
||||
8,15
|
13
data/shaders/shadow_pass1.frag
Normal file
|
@ -0,0 +1,13 @@
|
|||
uniform sampler2D TextureMap;
|
||||
|
||||
varying float CameraDepth;
|
||||
varying vec2 TexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
// draw the typical textured output to visual framebuffer
|
||||
gl_FragData[0] = texture2D(TextureMap, TexCoord);
|
||||
|
||||
// write "normaliized vertex depth" to the depthmap's alpha.
|
||||
gl_FragData[1] = vec4(vec3(0.0), CameraDepth);
|
||||
}
|
24
data/shaders/shadow_pass1.vert
Normal file
|
@ -0,0 +1,24 @@
|
|||
uniform vec3 CameraPos;
|
||||
uniform vec3 CameraDir;
|
||||
uniform float DepthNear;
|
||||
uniform float DepthFar;
|
||||
|
||||
varying float CameraDepth; // normalized camera depth
|
||||
varying vec2 TexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
// offset = vector to vertex from camera's position
|
||||
vec3 offset = (gl_Vertex.xyz / gl_Vertex.w) - CameraPos;
|
||||
|
||||
// z = distance from vertex to camera plane
|
||||
float z = -dot(offset, CameraDir);
|
||||
|
||||
// Depth from vertex to camera, mapped to [0,1]
|
||||
CameraDepth = (z - DepthNear) / (DepthFar - DepthNear);
|
||||
|
||||
// typical interpolated coordinate for texture lookup
|
||||
TexCoord = gl_MultiTexCoord0.xy;
|
||||
|
||||
gl_Position = ftransform();
|
||||
}
|
25
data/shaders/shadow_pass2.frag
Normal file
|
@ -0,0 +1,25 @@
|
|||
uniform sampler2D DepthTexture;
|
||||
uniform sampler2D ShadowTexture;
|
||||
|
||||
varying vec2 DepthTexCoord;
|
||||
varying vec3 ShadowNear;
|
||||
varying vec3 ShadowDir;
|
||||
|
||||
const vec3 shadowColor = vec3(0.0);
|
||||
|
||||
void main()
|
||||
{
|
||||
// read from DepthTexture
|
||||
// (depth is stored in texture's alpha component)
|
||||
float cameraDepth = texture2D(DepthTexture, DepthTexCoord).a;
|
||||
|
||||
vec3 shadowPos = (cameraDepth * ShadowDir) + ShadowNear;
|
||||
float l = dot(shadowPos.yz, shadowPos.yz);
|
||||
float d = shadowPos.x;
|
||||
|
||||
// k = shadow density: 0=opaque, 1=transparent
|
||||
// (use texture's red component as the density)
|
||||
float k = texture2D(ShadowTexture, vec2(l, d)).r;
|
||||
|
||||
gl_FragColor = vec4(shadowColor, k);
|
||||
}
|
49
data/shaders/shadow_pass2.vert
Normal file
|
@ -0,0 +1,49 @@
|
|||
uniform mat3 WorldToShadow;
|
||||
uniform vec3 SphereOrigin;
|
||||
|
||||
uniform vec3 CameraPos;
|
||||
uniform vec3 CameraDir;
|
||||
uniform float DepthNear;
|
||||
uniform float DepthFar;
|
||||
|
||||
varying vec2 DepthTexCoord;
|
||||
varying vec3 ShadowNear;
|
||||
varying vec3 ShadowDir;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 tmp1 = ftransform();
|
||||
gl_Position = tmp1;
|
||||
|
||||
// Predivide out w to avoid perspective-correct interpolation.
|
||||
// The quantities being interpolated are screen-space texture
|
||||
// coordinates and vectors to the near and far shadow plane,
|
||||
// all of which have to be bilinearly interpolated.
|
||||
// This could potentially be done by setting glHint,
|
||||
// but it wouldn't be guaranteed to work on all hardware.
|
||||
|
||||
gl_Position.xyz /= gl_Position.w;
|
||||
gl_Position.w = 1.0;
|
||||
|
||||
// Grab the transformed vertex's XY components as a texcoord
|
||||
// for sampling from the depth texture from pass 1.
|
||||
// Normalize them from [0,0] to [1,1]
|
||||
|
||||
DepthTexCoord = gl_Position.xy * 0.5 + 0.5;
|
||||
|
||||
// offset = vector to vertex from camera's position
|
||||
vec3 offset = (gl_Vertex.xyz / gl_Vertex.w) - CameraPos;
|
||||
|
||||
// z = distance from vertex to camera plane
|
||||
float z = -dot(offset, CameraDir);
|
||||
|
||||
vec3 shadowOffsetNear = offset * DepthNear / z;
|
||||
vec3 shadowOffsetFar = offset * DepthFar / z;
|
||||
|
||||
vec3 worldPositionNear = CameraPos + shadowOffsetNear;
|
||||
vec3 worldPositionFar = CameraPos + shadowOffsetFar;
|
||||
|
||||
vec3 shadowFar = WorldToShadow * (worldPositionFar - SphereOrigin);
|
||||
ShadowNear = WorldToShadow * (worldPositionNear - SphereOrigin);
|
||||
ShadowDir = shadowFar - ShadowNear;
|
||||
}
|
17
data/shaders/sprite.frag
Executable file
|
@ -0,0 +1,17 @@
|
|||
varying vec4 ambientGlobal/*,ambientA[8],diffuseA[8]*/;
|
||||
varying vec4 pixelpos;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = ambientGlobal;
|
||||
vec4 white = vec4(1.0, 1.0, 1.5, 1.0);
|
||||
//color = white;
|
||||
|
||||
vec4 texcolor = texture2D(tex, gl_TexCoord[0].st);
|
||||
color = clamp(texcolor * color, 0.0, 1.0);
|
||||
//color = color * vec4(1.0, 1.0, 1.0, 0.5);
|
||||
gl_FragColor = color;
|
||||
// gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
|
||||
}
|
15
data/shaders/sprite.vert
Executable file
|
@ -0,0 +1,15 @@
|
|||
varying vec4 ambientGlobal/*,ambientA[8],diffuseA[8]*/;
|
||||
varying vec3 normal/*,lightDirA[8],halfVectorA[8]*/;
|
||||
/*varying float distA[8];*/
|
||||
varying vec4 pixelpos;
|
||||
|
||||
void main()
|
||||
{
|
||||
normal = normalize(gl_NormalMatrix * gl_Normal);
|
||||
|
||||
pixelpos = gl_ModelViewMatrix * gl_Vertex;
|
||||
ambientGlobal = gl_LightModel.ambient * gl_FrontMaterial.ambient;
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_Position = ftransform();
|
||||
}
|
141
data/shaders/standard.frag
Executable file
|
@ -0,0 +1,141 @@
|
|||
varying vec4 ambientGlobal/*,ambientA[8],diffuseA[8]*/;
|
||||
varying vec4 pixelpos;
|
||||
uniform sampler2D tex;
|
||||
varying vec3 normal/*,lightDirA[8],halfVectorA[8]*/;
|
||||
/*varying float distA[8];*/
|
||||
|
||||
|
||||
vec4 overlay_blend(vec4 base, vec4 blend)
|
||||
{
|
||||
vec4 lumCoeff = vec4(0.2125, 0.7154, 0.0721, 1.0);
|
||||
vec4 white = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
vec4 result;
|
||||
float luminance = dot(base, lumCoeff);
|
||||
|
||||
if (luminance < 0.45)
|
||||
result = 2.0 * blend * base;
|
||||
else if (luminance > 0.55)
|
||||
result = white - 2.0 * (white - blend) * (white - base);
|
||||
else
|
||||
{
|
||||
vec4 result1 = 2.0 * blend * base;
|
||||
vec4 result2 = white - 2.0 * (white - blend) * (white - base);
|
||||
result = mix(result1, result2, (luminance - 0.45) * 10.0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
vec4 process_lightsource(gl_LightSourceParameters light, vec4 incolor)
|
||||
{
|
||||
vec3 n,halfV,viewV,lightDir,halfVector;
|
||||
float NdotL,NdotHV,dist;
|
||||
vec4 color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
vec4 spec = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
vec4 white = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
float att;
|
||||
|
||||
/* a fragment shader can't write a varying variable, hence we need
|
||||
a new variable to store the normalized interpolated normal */
|
||||
n = normalize(normal);
|
||||
|
||||
vec3 aux, ldir;
|
||||
vec4 d,a;
|
||||
if (light.position[3] == 1.0)
|
||||
{
|
||||
aux = vec3(light.position-pixelpos);
|
||||
ldir = normalize(aux);
|
||||
dist = length(aux);
|
||||
}
|
||||
else
|
||||
{
|
||||
ldir = normalize(vec3(light.position));
|
||||
dist = 0.0;
|
||||
}
|
||||
|
||||
halfVector = normalize(light.halfVector.xyz);
|
||||
|
||||
/* Compute the diffuse, ambient and globalAmbient terms */
|
||||
d = gl_FrontMaterial.diffuse * light.diffuse;
|
||||
|
||||
/* The ambient terms have been separated since one of them */
|
||||
/* suffers attenuation */
|
||||
a = gl_FrontMaterial.ambient * light.ambient;
|
||||
|
||||
/* compute the dot product between normal and normalized lightdir */
|
||||
NdotL = dot(n,ldir);
|
||||
|
||||
#define SHADOW_FUZZ 0.1
|
||||
|
||||
if (NdotL > 0.0) {
|
||||
NdotL = ((1.0 - SHADOW_FUZZ) * NdotL) + SHADOW_FUZZ;
|
||||
|
||||
att = 1.0 / (light.constantAttenuation +
|
||||
light.linearAttenuation * dist +
|
||||
light.quadraticAttenuation * dist * dist);
|
||||
color = att * (d * NdotL + a);
|
||||
|
||||
|
||||
halfV = normalize(halfVector);
|
||||
NdotHV = max(dot(n,halfV),0.0);
|
||||
|
||||
//spec = att * gl_FrontMaterial.specular * light.specular * pow(NdotHV,gl_FrontMaterial.shininess);
|
||||
spec = att * white * light.specular * pow(NdotHV,10.0);
|
||||
|
||||
}
|
||||
else if (NdotL > (-1.0 * SHADOW_FUZZ)) {
|
||||
float fraction;
|
||||
NdotL = (NdotL+SHADOW_FUZZ);
|
||||
fraction = NdotL / SHADOW_FUZZ;
|
||||
|
||||
att = 1.0 / (light.constantAttenuation +
|
||||
light.linearAttenuation * dist +
|
||||
light.quadraticAttenuation * dist * dist);
|
||||
color = att * fraction * (d * NdotL + a);
|
||||
|
||||
halfV = normalize(halfVector);
|
||||
NdotHV = max(dot(n,halfV),0.0);
|
||||
|
||||
//spec = att * fraction * gl_FrontMaterial.specular * light.specular * pow(NdotHV,gl_FrontMaterial.shininess);
|
||||
spec = att * white * light.specular * pow(NdotHV,10.0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// blend mode SCREEN
|
||||
color = white - ((white - color) * (white - incolor));
|
||||
// blend mode AVG
|
||||
//color = (color + incolor) * 0.5;
|
||||
// blend mode LIGHTEN
|
||||
//color = max(color, incolor);
|
||||
// blend mode OVERLAY
|
||||
//color = overlay_blend(incolor, color);
|
||||
// blend mode DODGE
|
||||
//color = incolor / (white - color);
|
||||
// blend mode MULTIPLY
|
||||
//color = color * incolor;
|
||||
|
||||
color += clamp(spec, 0.0, 1.0);
|
||||
return clamp(color, 0.0, 1.0);
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = ambientGlobal;
|
||||
vec4 white = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
//color = white;
|
||||
|
||||
color = process_lightsource(gl_LightSource[0], color);
|
||||
color = process_lightsource(gl_LightSource[1], color);
|
||||
color = process_lightsource(gl_LightSource[2], color);
|
||||
color = process_lightsource(gl_LightSource[3], color);
|
||||
color = process_lightsource(gl_LightSource[4], color);
|
||||
color = process_lightsource(gl_LightSource[5], color);
|
||||
color = process_lightsource(gl_LightSource[6], color);
|
||||
color = process_lightsource(gl_LightSource[7], color);
|
||||
|
||||
vec4 texcolor = texture2D(tex, gl_TexCoord[0].st);
|
||||
gl_FragColor = clamp(texcolor * color, 0.0, 1.0);
|
||||
// gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
|
||||
}
|
15
data/shaders/standard.vert
Normal file
|
@ -0,0 +1,15 @@
|
|||
varying vec4 ambientGlobal/*,ambientA[8],diffuseA[8]*/;
|
||||
varying vec3 normal/*,lightDirA[8],halfVectorA[8]*/;
|
||||
/*varying float distA[8];*/
|
||||
varying vec4 pixelpos;
|
||||
|
||||
void main()
|
||||
{
|
||||
normal = normalize(gl_NormalMatrix * gl_Normal);
|
||||
|
||||
pixelpos = gl_ModelViewMatrix * gl_Vertex;
|
||||
ambientGlobal = gl_LightModel.ambient * gl_FrontMaterial.ambient;
|
||||
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_Position = ftransform();
|
||||
}
|
12
data/shaders/test.frag
Normal file
|
@ -0,0 +1,12 @@
|
|||
varying vec3 normal;
|
||||
varying vec3 lightdir;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
float intensity;
|
||||
intensity = dot(lightdir, normalize(normal));
|
||||
|
||||
var;
|
||||
gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * vec4(intensity, intensity, intensity, 1.0);
|
||||
}
|
13
data/shaders/test.vert
Normal file
|
@ -0,0 +1,13 @@
|
|||
varying vec3 normal;
|
||||
varying vec3 lightdir;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
|
||||
normal = gl_NormalMatrix * gl_Normal;
|
||||
vec4 newpos = ftransform();
|
||||
gl_Position = newpos;
|
||||
|
||||
lightdir = normalize(vec3(gl_LightSource[0].position) - vec3(gl_ModelViewMatrix * gl_Vertex));
|
||||
}
|
BIN
data/sprite/bluelight_static.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
data/sprite/fuzzy_particle.png
Normal file
BIN
data/sprite/hard_particle.png
Executable file
After Width: | Height: | Size: 890 B |
BIN
data/sprite/medium_particle.png
Executable file
After Width: | Height: | Size: 968 B |
BIN
data/sprite/redlight_static.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
data/sprite/soft_particle.png
Executable file
After Width: | Height: | Size: 865 B |
BIN
data/sprite/star_sprite_inner.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
data/sprite/star_sprite_main.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
data/sprite/star_sprite_washout.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
data/sprite/whitelight_static.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
data/sprite/yellowlight_static.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
data/tex/black.png
Normal file
After Width: | Height: | Size: 281 B |
BIN
data/tex/dralthi.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
data/tex/nm_flat.png
Normal file
After Width: | Height: | Size: 298 B |
BIN
data/tex/plasma1.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
data/tex/plasma2.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
data/tex/star_sprite_main.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
data/tex/test1.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
data/tex/white.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
data/tex/whitelight_static.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
data/ui/button_bg_corner.png
Executable file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/ui/button_bg_edge.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
data/ui/button_corner.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
data/ui/button_edge.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
data/ui/frame_bg_corner.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
data/ui/frame_bg_edge.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
data/ui/frame_corner.png
Executable file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/ui/frame_edge.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
6
data/xml/constants.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<xml_binary_packing name="constants">
|
||||
<datatag name="planet_scale" data="float"/>
|
||||
<datatag name="system_scale" data="float"/>
|
||||
<datatag name="ship_scale" data="float"/>
|
||||
<datatag name="xx" data="float"/>
|
||||
</xml_binary_packing>
|
34
data/xml/def/bases.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<xml_binary_packing name="ships">
|
||||
<datatag name="hull" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="model" data="string"/>
|
||||
<datatag name="pitch" data="float"/>
|
||||
<datatag name="yaw" data="float"/>
|
||||
<datatag name="roll" data="float"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
<datatag name="cargo" data="float"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
</datatag>
|
||||
<datatag name="package" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="hull">
|
||||
<attribute name="id" data="int"/>
|
||||
</datatag>
|
||||
<datatag name="engine" multiple="yes">
|
||||
<attribute name="hardpoint" data="int"/>
|
||||
<attribute name="id" data="int"/>
|
||||
</datatag>
|
||||
<datatag name="weapon" multiple="yes">
|
||||
<attribute name="hardpoint" data="int"/>
|
||||
<attribute name="id" data="int"/>
|
||||
</datatag>
|
||||
<datatag name="component" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<attribute name="count" data="int"/>
|
||||
</datatag>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
10
data/xml/def/commodities.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<xml_binary_packing name="commodities">
|
||||
<datatag name="tradegood" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="size" data="float" default="1"/>
|
||||
<datatag name="mass" data="float" default="1"/>
|
||||
<datatag name="desc" data="string"/>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
27
data/xml/def/components.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<xml_binary_packing name="components">
|
||||
|
||||
<datatag name="skin" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
<datatag name="size" data="float"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
</datatag>
|
||||
<datatag name="external" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
<datatag name="size" data="float"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
</datatag>
|
||||
<datatag name="component" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
<datatag name="size" data="float"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
16
data/xml/def/engines.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<xml_binary_packing name="engines">
|
||||
<datatag name="engine" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
<datatag name="thrust" data="int"/>
|
||||
<datatag name="size" data="float"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
<datatag name="spinup_delay" data="float" optional="yes" default="0"/>
|
||||
<datatag name="spinup_profile" data="string" optional="yes" default="instant"/>
|
||||
<datatag name="shutdown_delay" data="float" optional="yes" default="0"/>
|
||||
<datatag name="shutdown_profile" data="string" optional="yes" default="instant"/>
|
||||
<datatag name="particlefx" data="string" default=""/>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
16
data/xml/def/factions.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<xml_binary_packing name="factions">
|
||||
<datatag name="relationship" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<attribute name="other" data="int"/>
|
||||
<attribute name="feelings" data="string"/>
|
||||
<attribute name="strength" data="float"/>
|
||||
</datatag>
|
||||
<datatag name="faction" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="group" data="int"/>
|
||||
<datatag name="laws">
|
||||
<datatag name="fine" data="int" default="0"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
63
data/xml/def/models.xml
Executable file
|
@ -0,0 +1,63 @@
|
|||
<xml_binary_packing name="models">
|
||||
<datatag name="mesh" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="file" data="string" default=""/>
|
||||
<datatag name="sprite" data="bool" default=""/>
|
||||
<datatag name="centered_sprite" data="bool" default=""/>
|
||||
</datatag>
|
||||
<datatag name="model" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="render" multiple="yes">
|
||||
<attribute name="layer" data="int"/>
|
||||
<datatag name="mesh">
|
||||
<datatag name="ref" data="string" default=""/>
|
||||
<datatag name="xaxis" data="int" default="0"/>
|
||||
<datatag name="yaxis" data="int" default="1"/>
|
||||
<datatag name="zaxis" data="int" default="2"/>
|
||||
<datatag name="scale" data="float" default="1.0">
|
||||
<attribute name="x" data="float" default="1.0"/>
|
||||
<attribute name="y" data="float" default="1.0"/>
|
||||
<attribute name="z" data="float" default="1.0"/>
|
||||
</datatag>
|
||||
<datatag name="scale_to_tex" data="bool" default=""/>
|
||||
<datatag name="rot" optional="yes">
|
||||
<attribute name="x" data="float" default="0.0"/>
|
||||
<attribute name="y" data="float" default="0.0"/>
|
||||
<attribute name="z" data="float" default="0.0"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
<datatag name="material">
|
||||
<datatag name="ref" data="string"/>
|
||||
<datatag name="color" optional="yes">
|
||||
<attribute name="r" data="float" default="1.0"/>
|
||||
<attribute name="g" data="float" default="1.0"/>
|
||||
<attribute name="b" data="float" default="1.0"/>
|
||||
<attribute name="a" data="float" default="1.0"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
<datatag name="billboard" data="bool" default=""/>
|
||||
<datatag name="beam_align" data="bool" default=""/>
|
||||
<datatag name="particle" data="bool" default=""/>
|
||||
</datatag>
|
||||
<datatag name="light" multiple="yes">
|
||||
<datatag name="color" optional="yes">
|
||||
<attribute name="r" data="float" default="1.0"/>
|
||||
<attribute name="g" data="float" default="1.0"/>
|
||||
<attribute name="b" data="float" default="1.0"/>
|
||||
</datatag>
|
||||
<datatag name="directional" data="bool" default=""/>
|
||||
<datatag name="vector" optional="yes">
|
||||
<attribute name="x" data="float" default="0.0"/>
|
||||
<attribute name="y" data="float" default="0.0"/>
|
||||
<attribute name="z" data="float" default="0.0"/>
|
||||
</datatag>
|
||||
<datatag name="attenuation" optional="yes">
|
||||
<attribute name="quadratic" data="float" default="0.0"/>
|
||||
<attribute name="linear" data="float" default="0.0"/>
|
||||
</datatag>
|
||||
<datatag name="basepower" data="float"/>
|
||||
<datatag name="earthshine" data="bool" default=""/>
|
||||
<datatag name="sun" data="bool" default=""/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
8
data/xml/def/shaders.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<xml_binary_packing name="shaders">
|
||||
<datatag name="shader" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="vertex" data="string"/>
|
||||
<datatag name="fragment" data="string"/>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
||||
|
37
data/xml/def/ships.xml
Executable file
|
@ -0,0 +1,37 @@
|
|||
<xml_binary_packing name="ships">
|
||||
<datatag name="hull" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="modelref" data="string" default=""/>
|
||||
<datatag name="pitch" data="float" default="0"/>
|
||||
<datatag name="yaw" data="float" default="0"/>
|
||||
<datatag name="roll" data="float" default="0"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
<datatag name="internal_space" data="float" default="0"/>
|
||||
<datatag name="skin_space" data="float" default="0"/>
|
||||
<datatag name="weapon_slots" data="int" default="0"/>
|
||||
<datatag name="engine_slots" data="int" default="0"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
</datatag>
|
||||
<datatag name="package" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="hull">
|
||||
<attribute name="id" data="string"/>
|
||||
</datatag>
|
||||
<datatag name="engine" multiple="yes">
|
||||
<attribute name="hardpoint" data="int"/>
|
||||
<attribute name="id" data="string"/>
|
||||
</datatag>
|
||||
<datatag name="weapon" multiple="yes">
|
||||
<attribute name="hardpoint" data="int"/>
|
||||
<attribute name="id" data="string"/>
|
||||
</datatag>
|
||||
<datatag name="component" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<attribute name="count" data="int"/>
|
||||
</datatag>
|
||||
<datatag name="price" data="int" default="0"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
21
data/xml/def/sprites.xml
Executable file
|
@ -0,0 +1,21 @@
|
|||
<xml_binary_packing name="sprites">
|
||||
<datatag name="sprite" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="image" multiple="yes">
|
||||
<datatag name="type" data="string" optional="yes" default="diffuse"/>
|
||||
<datatag name="file" data="string"/>
|
||||
<datatag name="coords" optional="yes">
|
||||
<attribute name="x" data="int" optional="yes" default="-1"/>
|
||||
<attribute name="y" data="int" optional="yes" default="-1"/>
|
||||
<attribute name="h" data="int" optional="yes" default="-1"/>
|
||||
<attribute name="w" data="int" optional="yes" default="-1"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
<datatag name="size" optional="yes">
|
||||
<attribute name="h" data="int" optional="yes" default="-1"/>
|
||||
<attribute name="w" data="int" optional="yes" default="-1"/>
|
||||
</datatag>
|
||||
<datatag name="facing" data="string" optional="yes" default="+z"/>
|
||||
<datatag>
|
||||
</xml_binary_packing>
|
||||
|
35
data/xml/def/stellars.xml
Normal file
|
@ -0,0 +1,35 @@
|
|||
<xml_binary_packing name="stellars">
|
||||
<datatag name="static" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="model" data="string"/>
|
||||
</datatag>
|
||||
<datatag name="planet" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="model" data="string" default="sphere"/>
|
||||
<datatag name="desc" data="string"/>
|
||||
<datatag name="texture" data="string"/>
|
||||
<datatag name="texture_dark" data="string" default="black"/>
|
||||
<datatag name="shader" data="string" default="planet"/>
|
||||
<datatag name="bumpmap" data="string" default=""/>
|
||||
<datatag name="mass" data="float"/>
|
||||
<datatag name="radius" data="float"/>
|
||||
</datatag>
|
||||
<datatag name="region" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="scalex" data="float"/>
|
||||
<datatag name="scaley" data="float"/>
|
||||
<datatag name="scalez" data="float"/>
|
||||
<datatag name="fogdistance" data="float"/>
|
||||
<datatag name="fogcolor" data="string"/>
|
||||
<datatag name="object" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<attribute name="density" data="float"/>
|
||||
</datatag>
|
||||
<datatag name="static" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<attribute name="density" data="float"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
9
data/xml/def/systems.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<xml_binary_packing name="systems">
|
||||
<datatag name="system" multiple="yes">
|
||||
<attribute name="id" data="int"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="region" multiple="yes">
|
||||
<datatag name="id" data="int"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
</xml_binary_packing>
|
25
data/xml/def/textures.xml
Executable file
|
@ -0,0 +1,25 @@
|
|||
<xml_binary_packing name="textures">
|
||||
<datatag name="texture" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="file" data="string"/>
|
||||
<datatag name="coords" optional="yes">
|
||||
<attribute name="x1" data="int" default="-1"/>
|
||||
<attribute name="y1" data="int" default="-1"/>
|
||||
<attribute name="x2" data="int" default="-1"/>
|
||||
<attribute name="y2" data="int" default="-1"/>
|
||||
<attribute name="x" data="int" default="-1"/>
|
||||
<attribute name="y" data="int" default="-1"/>
|
||||
<attribute name="h" data="int" default="-1"/>
|
||||
<attribute name="w" data="int" default="-1"/>
|
||||
</datatag>
|
||||
<datatag name="uniform" data="bool" default=""/>
|
||||
</datatag>
|
||||
<datatag name="material" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="texture" multiple="yes">
|
||||
<attribute name="ref" data="string"/>
|
||||
<attribute name="type" data="string" optional="yes" default="diffuse"/>
|
||||
</datatag>
|
||||
</datatag>
|
||||
|
||||
</xml_binary_packing>
|
38
data/xml/def/weapons.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<xml_binary_packing name="weapons">
|
||||
<datatag name="component" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="name" data="string"/>
|
||||
<datatag name="price" data="int"/>
|
||||
<datatag name="desc" data="string" optional="yes" default=""/>
|
||||
<datatag name="size" data="float"/>
|
||||
<datatag name="mass" data="float"/>
|
||||
<datatag name="launcher" data="string"/>
|
||||
</datatag>
|
||||
<datatag name="launcher" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="refire" data="int"/>
|
||||
<datatag name="projectile" data="string"/>
|
||||
<datatag name="velocity" data="float"/>
|
||||
</datatag>
|
||||
<datatag name="projectile" multiple="yes">
|
||||
<attribute name="id" data="string"/>
|
||||
<datatag name="particlefx" data="string" default=""/>
|
||||
<datatag name="model" data="string" default=""/>
|
||||
<datatag name="sprite" data="string" default=""/>
|
||||
<datatag name="particlefx_scale" data="float" default="1.0"/>
|
||||
<datatag name="model_scale" data="float" default="1.0"/>
|
||||
<datatag name="sprite_scale" data="float" default="1.0"/>
|
||||
<datatag name="sprite_color" optional="yes">
|
||||
<attribute name="red" data="float" default="1.0"/>
|
||||
<attribute name="green" data="float" default="1.0"/>
|
||||
<attribute name="blue" data="float" default="1.0"/>
|
||||
<attribute name="alpha" data="float" default="1.0"/>
|
||||
</datatag>
|
||||
<datatag name="accel" data="float" default="0.0"/>
|
||||
<datatag name="range" data="float"/>
|
||||
<datatag name="damagemin" data="float"/>
|
||||
<datatag name="damagemax" data="float"/>
|
||||
<datatag name="damagefunc" data="string" default="normal"/>
|
||||
</datatag>
|
||||
|
||||
</xml_binary_packing>
|
20
data/xml/engines.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<engines>
|
||||
<engine id="0">
|
||||
<name>LX-20 Light Freighter Engine</name>
|
||||
<desc>The LX-20 is one of the cheapest, simplest, and least effective engine designs available. It is commonly found equipped on the cheapest freighters, where its general reliability and the ease of finding replacement parts for it serves well. No reputable dealer would ever stock an engine this decrepit, but you can probably find a servicable one littering any spaceport since most people consider them useless.</desc>
|
||||
<thrust>18000</thrust>
|
||||
<price>0</price>
|
||||
<size>150</size>
|
||||
<mass>3800</mass>
|
||||
<particlefx>eng_large</particlefx>
|
||||
</engine>
|
||||
<engine id="1">
|
||||
<name>Plasma Vector Drive</name>
|
||||
<desc>This is the engine equipped as standard on the Kestrel fighter. Top-of-the-line by any account, there is no downside except the price. It's small and lightweight, and it provides tremendous speed and agility with a minimal fuel cost.</desc>
|
||||
<size>0.05</size>
|
||||
<mass>25</mass>
|
||||
<thrust>22000</thrust>
|
||||
<price>550000</price>
|
||||
<particlefx>eng_advanced</particlefx>
|
||||
</engine>
|
||||
</engines>
|
54
data/xml/factions.xml
Normal file
|
@ -0,0 +1,54 @@
|
|||
<factions>
|
||||
<faction id="10000">
|
||||
<name>Government FactionGroup</name>
|
||||
<group>-1</group>
|
||||
</faction>
|
||||
<faction id="10001">
|
||||
<name>Neutral FactionGroup</name>
|
||||
<group>-1</group>
|
||||
</faction>
|
||||
<faction id="10002">
|
||||
<name>Criminal FactionGroup</name>
|
||||
<group>-1</group>
|
||||
</faction>
|
||||
<faction id="0">
|
||||
<name>Colonial Alliance Navy</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="1">
|
||||
<name>Colonial Alliance Police</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="2">
|
||||
<name>Associated Worlds Navy</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="3">
|
||||
<name>Associated Worlds Police</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="4">
|
||||
<name>Evon Naval Forces</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="5">
|
||||
<name>Evon Police Forces</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="6">
|
||||
<name>Royal Victorian Navy</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="7">
|
||||
<name>Victorian Police Forces</name>
|
||||
<group>10000</group>
|
||||
</faction>
|
||||
<faction id="8">
|
||||
<name>Independent Defense Fleet</name>
|
||||
<group>10001</group>
|
||||
</faction>
|
||||
<faction id="9">
|
||||
<name>Corsair Navy</name>
|
||||
<group>10002</group>
|
||||
</faction>
|
||||
</factions>
|
221
data/xml/models.xml
Executable file
|
@ -0,0 +1,221 @@
|
|||
<models>
|
||||
<mesh id="mesh_sprite">
|
||||
<centered_sprite/>
|
||||
</mesh>
|
||||
<mesh id="mesh_centered_sprite">
|
||||
<centered_sprite/>
|
||||
</mesh>
|
||||
<mesh id="mesh_offset_sprite">
|
||||
<sprite/>
|
||||
</mesh>
|
||||
|
||||
<model id="m_test">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale x="200" y="200"/></mesh>
|
||||
<material><ref>mat_test</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="m_star">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale x="200" y="200"/></mesh>
|
||||
<material><ref>mat_star</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="m_star_tiny">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_centered_sprite</ref><scale x="40" y="40"/></mesh>
|
||||
<material><ref>mat_star</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="m_particle">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_centered_sprite</ref><scale x="16" y="16"/></mesh>
|
||||
<material><ref>mat_particle</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="m_dralthi">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_centered_sprite</ref><scale x="40" y="40"/></mesh>
|
||||
<material><ref>mat_dralthi</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
|
||||
<model id="ui_frame_tl">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_frame_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_tc">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_frame_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_tr">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_cl">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_cc">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref></mesh>
|
||||
<material><ref>mat_blank</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_cr">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_bl">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_bc">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_frame_br">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_frame_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
|
||||
|
||||
|
||||
<model id="ui_button_tl">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_button_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_button_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_tc">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_button_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/></mesh>
|
||||
<material><ref>mat_ui_button_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_tr">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_button_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_button_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_cl">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_button_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_button_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_cc">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref></mesh>
|
||||
<material><ref>mat_blank</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_cr">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_button_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="90.0"/></mesh>
|
||||
<material><ref>mat_ui_button_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_bl">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_button_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="270.0"/></mesh>
|
||||
<material><ref>mat_ui_button_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_bc">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_button_edge</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_button_bg_edge</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
<model id="ui_button_br">
|
||||
<render layer="0">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_button_corner</ref></material>
|
||||
</render>
|
||||
<render layer="1">
|
||||
<mesh><ref>mesh_sprite</ref><scale_to_tex/><rot z="180.0"/></mesh>
|
||||
<material><ref>mat_ui_button_bg_corner</ref></material>
|
||||
</render>
|
||||
</model>
|
||||
|
||||
|
||||
|
||||
</models>
|
22
data/xml/shaders.xml
Executable file
|
@ -0,0 +1,22 @@
|
|||
<shaders>
|
||||
<shader id="standard">
|
||||
<vertex>standard</vertex>
|
||||
<fragment>standard</fragment>
|
||||
</shader>
|
||||
<shader id="test">
|
||||
<vertex>test</vertex>
|
||||
<fragment>test</fragment>
|
||||
</shader>
|
||||
<shader id="sprite">
|
||||
<vertex>sprite</vertex>
|
||||
<fragment>sprite</fragment>
|
||||
</shader>
|
||||
<shader id="shadow_pass1">
|
||||
<vertex>shadow_pass1</vertex>
|
||||
<fragment>shadow_pass1</fragment>
|
||||
</shader>
|
||||
<shader id="shadow_pass2">
|
||||
<vertex>shadow_pass2</vertex>
|
||||
<fragment>shadow_pass2</fragment>
|
||||
</shader>
|
||||
</shaders>
|
83
data/xml/ships.xml
Executable file
|
@ -0,0 +1,83 @@
|
|||
<ships>
|
||||
<hull id="hull_lightfr">
|
||||
<name>Spacetruck</name>
|
||||
<modelref>m_fr_spacetruck</modelref>
|
||||
<yaw>55</yaw>
|
||||
<pitch>64</pitch>
|
||||
<roll>35</roll>
|
||||
<mass>15000</mass>
|
||||
<internal_space>15000</internal_space>
|
||||
<skin_space>2450</skin_space>
|
||||
<weapon_slots>0</weapon_slots>
|
||||
<engine_slots>1</engine_slots>
|
||||
<desc>The commercial backbone of the colonies, the Space Truck carries a lot of cargo and does it very cheaply. They are perfect for trading in heavily patrolled sectors, but in rougher areas their lack of defensive systems and voluminous cargo hold makes them an obvious target.</desc>
|
||||
</hull>
|
||||
<hull id="hull_advfi">
|
||||
<name>Kestrel</name>
|
||||
<modelref>m_fi_kestrel</modelref>
|
||||
<desc>Graceful lines and top-end equipment make this fighter a favourite of civilian pilots.</desc>
|
||||
<pitch>215</pitch>
|
||||
<roll>120</roll>
|
||||
<yaw>200</yaw>
|
||||
<mass>480</mass>
|
||||
<internal_space>5</internal_space>
|
||||
<skin_space>28</skin_space>
|
||||
<weapon_slots>6</weapon_slots>
|
||||
<engine_slots>1</engine_slots>
|
||||
</hull>
|
||||
<hull id="hull_hugebs">
|
||||
<name>Thor Class Battlestation</name>
|
||||
<modelref>m_bs_thor</modelref>
|
||||
<desc>Massive and bristling with armaments and defenses, the Thor class battlestations are the Colonial Alliance's most powerful line of defense against any aggressor. Indeed, simulations show that in a best case scenario one of thsese battlestations could potentially defeat an entire foreign Navy single-handedly.</desc>
|
||||
<mass>451000000</mass>
|
||||
<internal_space>6000000</internal_space>
|
||||
<skin_space>140000</skin_space>
|
||||
<weapon_slots>28</weapon_slots>
|
||||
</hull>
|
||||
<hull id="hull_nb">
|
||||
<name>Nav Buoy</name>
|
||||
<modelref>m_misc_navbuoy0</modelref>
|
||||
<mass>1500</mass>
|
||||
</hull>
|
||||
<hull id="hull_nb_test">
|
||||
<name>Nav Buoy Test</name>
|
||||
<modelref>m_misc_navbuoy_test</modelref>
|
||||
<mass>1500</mass>
|
||||
</hull>
|
||||
<hull id="hull_test_planet">
|
||||
<name>Bob</name>
|
||||
<modelref>m_pl_bob</modelref>
|
||||
<mass>4.5e22</mass>
|
||||
</hull>
|
||||
|
||||
<package id="player_start">
|
||||
<name>Starter Pack - Not for Resale</name>
|
||||
<hull id="hull_advfi"/>
|
||||
<engine hardpoint="0" id="1"/>
|
||||
<desc>New pilots get this ship with this equipment</desc>
|
||||
</package>
|
||||
<package id="thor">
|
||||
<name>Thor Class Battlestation</name>
|
||||
<hull id="hull_hugebs"/>
|
||||
<desc>Massive and bristling with armaments and defenses, the Thor class battlestations are the Colonial Alliance's most powerful line of defense against any aggressor. Indeed, simulations show that in a best case scenario one of thsese battlestations could potentially defeat an entire foreign Navy single-handedly.</desc>
|
||||
</package>
|
||||
<package id="test_planet">
|
||||
<name>Bob</name>
|
||||
<hull id="hull_test_planet"/>
|
||||
<desc>A planet</desc>
|
||||
</package>
|
||||
|
||||
<package id="nb">
|
||||
<name>Nav Buoy</name>
|
||||
<desc>Navigation buoys are typically used to mark a route or a specific point in space.</desc>
|
||||
<hull id="hull_nb"/>
|
||||
</package>
|
||||
|
||||
<package id="nb_test">
|
||||
<name>Nav Buoy</name>
|
||||
<desc>Navigation buoys are typically used to mark a route or a specific point in space.</desc>
|
||||
<hull id="hull_nb_test"/>
|
||||
</package>
|
||||
|
||||
|
||||
</ships>
|
5
data/xml/sprites.xml
Executable file
|
@ -0,0 +1,5 @@
|
|||
<sprites>
|
||||
<sprite id="test">
|
||||
<file>tex/test1.png</file>
|
||||
</shader>
|
||||
</shaders>
|
9
data/xml/stellars.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<stellars>
|
||||
<planet id="3">
|
||||
<name>Bob</name>
|
||||
<texture>earthy</texture>
|
||||
<desc>Bob is a rich agricultural planet, with a moderate industrial sector, large population centers, and a stable ecosystem. It's a pleasant place, with a little something for everyone, but is otherwise fairly nondescript.</desc>
|
||||
<mass>7.4e24</mass>
|
||||
<radius>8552.3</radius>
|
||||
</planet>
|
||||
</stellars>
|
100
data/xml/textures.xml
Executable file
|
@ -0,0 +1,100 @@
|
|||
<textures>
|
||||
<texture id="t_black">
|
||||
<file>tex/black.png</file>
|
||||
<coords/>
|
||||
<uniform/>
|
||||
</texture>
|
||||
<texture id="t_white">
|
||||
<file>tex/white.png</file>
|
||||
<uniform/>
|
||||
</texture>
|
||||
<texture id="tnm_flat">
|
||||
<file>tex/nm_flat.png</file>
|
||||
<uniform/>
|
||||
</texture>
|
||||
<material id="mat_blank">
|
||||
<texture ref="t_white" type="noaa"/>
|
||||
<texture ref="tnm_flat" type="normal"/>
|
||||
</material>
|
||||
<texture id="t_test">
|
||||
<file>tex/test1.png</file>
|
||||
</texture>
|
||||
<texture id="t_particle">
|
||||
<file>tex/whitelight_static.png</file>
|
||||
</texture>
|
||||
<texture id="t_star">
|
||||
<file>tex/star_sprite_main.png</file>
|
||||
</texture>
|
||||
<texture id="t_dralthi">
|
||||
<file>tex/dralthi.png</file>
|
||||
</texture>
|
||||
|
||||
|
||||
<texture id="t_ui_button_corner">
|
||||
<file>ui/button_corner.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_button_edge">
|
||||
<file>ui/button_edge.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_button_bg_corner">
|
||||
<file>ui/button_bg_corner.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_button_bg_edge">
|
||||
<file>ui/button_bg_edge.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_frame_corner">
|
||||
<file>ui/frame_corner.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_frame_edge">
|
||||
<file>ui/frame_edge.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_frame_bg_corner">
|
||||
<file>ui/frame_bg_corner.png</file>
|
||||
</texture>
|
||||
<texture id="t_ui_frame_bg_edge">
|
||||
<file>ui/frame_bg_edge.png</file>
|
||||
</texture>
|
||||
<material id="mat_ui_button_corner">
|
||||
<texture ref="t_ui_button_corner" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_button_edge">
|
||||
<texture ref="t_ui_button_edge" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_button_bg_corner">
|
||||
<texture ref="t_ui_button_bg_corner" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_button_bg_edge">
|
||||
<texture ref="t_ui_button_bg_edge" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_frame_corner">
|
||||
<texture ref="t_ui_frame_corner" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_frame_edge">
|
||||
<texture ref="t_ui_frame_edge" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_frame_bg_corner">
|
||||
<texture ref="t_ui_frame_bg_corner" type="noaa"/>
|
||||
</material>
|
||||
<material id="mat_ui_frame_bg_edge">
|
||||
<texture ref="t_ui_frame_bg_edge" type="noaa"/>
|
||||
</material>
|
||||
|
||||
<texture id="t_test_plasma">
|
||||
<file>tex/plasma1.png</file>
|
||||
</texture>
|
||||
<texture id="t_test_plasma2">
|
||||
<file>tex/plasma2.png</file>
|
||||
</texture>
|
||||
<material id="mat_test">
|
||||
<texture ref="t_test"/>
|
||||
</material>
|
||||
<material id="mat_star">
|
||||
<texture ref="t_star"/>
|
||||
</material>
|
||||
<material id="mat_particle">
|
||||
<texture ref="t_particle"/>
|
||||
</material>
|
||||
<material id="mat_dralthi">
|
||||
<texture ref="t_dralthi"/>
|
||||
</material>
|
||||
</textures>
|
22
data/xml/weapons.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<weapons>
|
||||
<component id="lightblaster">
|
||||
<name>Light Blaster</name>
|
||||
<desc>The staggering ubiquity of the blaster class weapons is due to their simplicity and reliability. This particular model is one of the smallest blaster models, and it is more of a mild deterrant than an actual combat weapon. Against any moderately capable fighter it would prove almost ineffective even in large numbers, and it would be absolutely laughable to suggest that it would be of any use at all against a larger ship. Still, they are often found on shuttles and small freighters hoping that any agressor will see that numerous guns are mounted without bothering to scan too closely.</desc>
|
||||
<price>250</price>
|
||||
<size>0.2</size>
|
||||
<mass>2</mass>
|
||||
<launcher>w_lightblaster</launcher>
|
||||
</component>
|
||||
<launcher id="w_lightblaster">
|
||||
<refire>250</refire>
|
||||
<projectile>wp_lightblaster</projectile>
|
||||
<velocity>1000</velocity>
|
||||
</launcher>
|
||||
<projectile id="wp_lightblaster">
|
||||
<sprite>hard_particle</sprite>
|
||||
<sprite_color red="1.0" green="1.0" blue="1.0" alpha="1.0"/>
|
||||
<range>400</range>
|
||||
<damagemin>20</damagemin>
|
||||
<damagemax>20</damagemax>
|
||||
</projectile>
|
||||
</weapons>
|
6
looprun.bat
Executable file
|
@ -0,0 +1,6 @@
|
|||
@echo off
|
||||
:restart
|
||||
roc_test.py
|
||||
pause
|
||||
echo Starting...
|
||||
goto restart
|
97
refuge.py
Executable file
|
@ -0,0 +1,97 @@
|
|||
#!/usr/local/bin/python2.4
|
||||
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
import os
|
||||
import sys
|
||||
import math
|
||||
import random
|
||||
import inputs
|
||||
import gamedata
|
||||
import gametimer
|
||||
import video
|
||||
import glwrapper
|
||||
import init_universe
|
||||
import universe
|
||||
import time
|
||||
import components
|
||||
try:
|
||||
from PIL import PngImagePlugin
|
||||
except:
|
||||
import PngImagePlugin
|
||||
from .gameobj import *
|
||||
from player import *
|
||||
from particles import *
|
||||
from ai import *
|
||||
|
||||
pygame.init()
|
||||
gamedata.load_gamedata()
|
||||
|
||||
size = width, height = (1600,1200)
|
||||
size = width, height = (1024,768)
|
||||
|
||||
video.set_res(size)
|
||||
video.init()
|
||||
video.enable_vsync()
|
||||
gametimer.start_loop()
|
||||
init_universe.init()
|
||||
view = None
|
||||
skipping = False
|
||||
while True:
|
||||
events = pygame.event.get()
|
||||
#if skipping:
|
||||
# print "SKIPPING! Forced? %s" % (video.get_forced_redraw(),)
|
||||
gametimer.next_frame(skipping)
|
||||
"""
|
||||
if guiscreen != None or guidlg != None:
|
||||
video.force_redraw() # irrelevant right now, but when we exit the gui, we'll need a full redraw!
|
||||
for ev in events:
|
||||
if ev.type == QUIT:
|
||||
inputs.add_command('exit')
|
||||
break
|
||||
if 'exit' in inputs.commands:
|
||||
break
|
||||
if guiscreen:
|
||||
guiscreen.distribute_events(*events)
|
||||
continue
|
||||
"""
|
||||
pygame.event.pump()
|
||||
for ev in events:
|
||||
if ev.type == QUIT:
|
||||
inputs.add_command('exit')
|
||||
break
|
||||
elif ev.type == KEYUP:
|
||||
inputs.keyup(ev.key)
|
||||
elif ev.type == KEYDOWN:
|
||||
inputs.keydown(ev.key)
|
||||
#elif ev.type == VIDEOEXPOSE:
|
||||
# video.force_redraw()
|
||||
elif ev.type in (MOUSEBUTTONDOWN, MOUSEBUTTONUP):
|
||||
pass
|
||||
|
||||
if 'exit' in inputs.commands:
|
||||
break
|
||||
|
||||
#map.handle_keys(keys)
|
||||
#units.mgr.update()
|
||||
#view.update()
|
||||
|
||||
#if video.get_forced_redraw():
|
||||
# video.get_scr().fill((0,0,0))
|
||||
|
||||
#skipping = video.skipping_next_frame()
|
||||
|
||||
|
||||
if not skipping:
|
||||
universe.next_frame()
|
||||
video.predraw()
|
||||
universe.render()
|
||||
|
||||
if not skipping:
|
||||
video.next_frame()
|
||||
inputs.next_frame()
|
||||
else:
|
||||
video.reset_skipping()
|
||||
|
||||
|
||||
|
175
roc_test.py
Executable file
|
@ -0,0 +1,175 @@
|
|||
#import roc
|
||||
import os
|
||||
import sys
|
||||
import roc
|
||||
import pygame
|
||||
from OpenGL.GL import *
|
||||
from py3dutil import vect, quat
|
||||
from roc import models
|
||||
from roc import fonts
|
||||
from roc import gametimer
|
||||
from roc.platform import *
|
||||
from roc import pipeline
|
||||
import time
|
||||
import collections
|
||||
import random
|
||||
import math
|
||||
|
||||
class partycle(object):
|
||||
def __init__(self, x, y, xd, yd, rot, rotd, color):
|
||||
self.x = x
|
||||
self.y = y
|
||||
self.xd = xd
|
||||
self.yd = yd
|
||||
self.rot = rot
|
||||
self.rotd = rotd
|
||||
self.color = color
|
||||
|
||||
@classmethod
|
||||
def random(cls):
|
||||
x, y = [((random.random() * 2.0) - 1.0) * 10.0 for _ in range(2)]
|
||||
xd, yd = [((random.random() * 2.0) - 1.0) * 4.0 for _ in range(2)]
|
||||
hue = random.random()
|
||||
m1 = 1.0
|
||||
h1 = hue * 6.0
|
||||
s1 = 1.0 - abs((h1 % 2.0) - 1.0)
|
||||
if h1 < 1.0:
|
||||
r, g, b = 1.0, s1, 0.0
|
||||
elif h1 < 2.0:
|
||||
r, g, b = s1, 1.0, 0.0
|
||||
elif h1 < 3.0:
|
||||
r, g, b = 0.0, 1.0, s1
|
||||
elif h1 < 4.0:
|
||||
r, g, b = 0.0, s1, 1.0
|
||||
elif h1 < 5.0:
|
||||
r, g, b = s1, 0.0, 1.0
|
||||
elif h1 < 6.0:
|
||||
r, g, b = 1.0, 0.0, s1
|
||||
|
||||
rot = random.random() * 90.0
|
||||
rotd = ((random.random() * 2.0) - 1.0) * 3.0
|
||||
rv = cls(x, y, xd, yd, rot, rotd, (r, g, b, 1.0))
|
||||
|
||||
return rv
|
||||
|
||||
def movestep(self):
|
||||
self.x += self.xd
|
||||
self.y += self.yd
|
||||
self.xd *= 0.985
|
||||
self.yd *= 0.985
|
||||
self.rot += self.rotd
|
||||
|
||||
class test_engine(roc.roc_engine.base_engine):
|
||||
def __init__(self):
|
||||
self.font = models.mgr.fontlib["micross20"]
|
||||
self.text1 = models.TextModel("micross20", "#$% 0123 ,,,, Hello world!\xa8\xa8\xa8F", (1.0, 1.0, 0.5, 1.0))
|
||||
self.string = ""
|
||||
self.move = 199.0
|
||||
self.moveinc = 1.0
|
||||
self.particles = collections.deque()
|
||||
self.particles.append(partycle.random())
|
||||
self.gtime = gametimer.GameTimer()
|
||||
self.gtime.start_loop()
|
||||
|
||||
|
||||
|
||||
def frame(self, events):
|
||||
self.gtime.next_frame()
|
||||
#print "*** Starting frame"
|
||||
# pink triangle
|
||||
glDisable(GL_BLEND)
|
||||
glDisable(GL_TEXTURE_2D)
|
||||
glBegin(GL_TRIANGLE_STRIP)
|
||||
glNormal3f(0.0, 0.0, 1.0)
|
||||
glTexCoord2f(0.0, 0.0)
|
||||
glColor4f(1.0, 0.0, 0.5, 0.0)
|
||||
glVertex3f( 20.0, 50.0, 1.0)
|
||||
glVertex3f( 20.0, 600.0, 1.0)
|
||||
glVertex3f( 400.0, 50.0, 1.0)
|
||||
glEnd()
|
||||
|
||||
# yellow square
|
||||
glBegin(GL_TRIANGLE_STRIP)
|
||||
glNormal3f(0.0, 0.0, 1.0)
|
||||
glTexCoord2f(0.0, 0.0)
|
||||
glColor4f(0.0, 0.2, 0.5, 0.8)
|
||||
glVertex3f( 150.0, 20.0, -50.0)
|
||||
glVertex3f( 150.0, 400.0, -50.0)
|
||||
glVertex3f( 360.0, 20.0, -50.0)
|
||||
glVertex3f( 360.0, 400.0, -50.0)
|
||||
glEnd()
|
||||
glEnable(GL_BLEND)
|
||||
glEnable(GL_TEXTURE_2D)
|
||||
glColor4f(1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
# texture test
|
||||
mdl = models.mgr.create("m_test")
|
||||
glPushMatrix()
|
||||
glTranslate(100.0, 300.0, -5.0)
|
||||
mdl.render()
|
||||
glPopMatrix()
|
||||
|
||||
|
||||
|
||||
|
||||
# font test
|
||||
glPushMatrix()
|
||||
glTranslate(200.0, 200.0, 5.0)
|
||||
self.text1.render()
|
||||
glPopMatrix()
|
||||
|
||||
for x in range(self.gtime.num_frames(10)):
|
||||
self.move = self.move + self.moveinc
|
||||
if self.move > 300.0:
|
||||
self.moveinc = -1.0
|
||||
elif self.move < 200.0:
|
||||
self.moveinc = 1.0
|
||||
for party in self.particles:
|
||||
party.movestep()
|
||||
if self.moveinc > 0.0:
|
||||
party = partycle.random()
|
||||
self.particles.append(party)
|
||||
#print party.color
|
||||
else:
|
||||
self.particles.popleft()
|
||||
|
||||
|
||||
glPushMatrix()
|
||||
glTranslate(self.move, 250.0, 5.0)
|
||||
|
||||
|
||||
"""
|
||||
if len(self.string) > 61:
|
||||
self.string = ""
|
||||
|
||||
for x in xrange(self.gtime.num_frames(1000)):
|
||||
self.string = self.string + str(len(self.string) % 10)
|
||||
"""
|
||||
for x in range(self.gtime.num_frames(100)):
|
||||
self.string = str(round(self.gtime.get_fps(), 1))
|
||||
#print len(self.gtime.g_framelist)
|
||||
|
||||
|
||||
self.font.render(self.string)
|
||||
glPopMatrix()
|
||||
|
||||
# texture test
|
||||
mdl2 = models.mgr.create("m_particle")
|
||||
mdl2.layers[0].color = None
|
||||
#print mdl2.layers[0].mesh
|
||||
for party in self.particles:
|
||||
glPushMatrix()
|
||||
glTranslate(600.0 + party.x, 350.0 + party.y, 6.0)
|
||||
glRotate(party.rot, 0.0, 0.0, 1.0)
|
||||
glColor4f(*party.color)
|
||||
mdl2.render()
|
||||
glPopMatrix()
|
||||
|
||||
|
||||
|
||||
roc.init2d()
|
||||
roc.set_engine(test_engine())
|
||||
roc.main()
|
||||
|
||||
|
||||
|
238
shooter.py
Executable file
|
@ -0,0 +1,238 @@
|
|||
import os
|
||||
import sys
|
||||
import roc
|
||||
import pygame
|
||||
from OpenGL.GL import *
|
||||
from py3dutil import vect, quat
|
||||
from roc import models
|
||||
from roc import fonts
|
||||
from roc import gametimer
|
||||
from roc.platform import *
|
||||
from roc import pipeline
|
||||
import time
|
||||
import collections
|
||||
import random
|
||||
import math
|
||||
from roc import ui
|
||||
|
||||
|
||||
class partycle(object):
|
||||
def __init__(self, x, y, xd, yd, rot, rotd, color):
|
||||
self.life = random.random() * 1000.0
|
||||
self.x = x
|
||||
self.y = y
|
||||
self.xd = xd
|
||||
self.yd = yd
|
||||
self.rot = rot
|
||||
self.rotd = rotd
|
||||
self.basecolor = color
|
||||
self.color = color
|
||||
|
||||
@classmethod
|
||||
def random(cls):
|
||||
x, y = [((random.random() * 2.0) - 1.0) * 1.0 for _ in range(2)]
|
||||
xd, yd = [((random.random() * 2.0) - 1.0) * 4.0 for _ in range(2)]
|
||||
dir1, dir2 = [(random.random() * math.pi * 2.0) for _ in range(2)]
|
||||
mag1 = random.random() * 100.0
|
||||
mag2 = random.random() * 4.0
|
||||
dir1 = random.random() * math.pi * 2.0
|
||||
dir2 = ((random.random() * 2.0) - 1.0) * 0.1
|
||||
mag2 += 1.0
|
||||
|
||||
x = math.sin(dir1) * mag1
|
||||
y = math.cos(dir1) * mag1
|
||||
xd = math.sin(dir1+dir2) * mag2
|
||||
yd = math.cos(dir1+dir2 ) * mag2
|
||||
|
||||
hue = random.random()
|
||||
m1 = 1.0
|
||||
h1 = hue * 6.0
|
||||
s1 = 1.0 - abs((h1 % 2.0) - 1.0)
|
||||
if h1 < 1.0:
|
||||
r, g, b = 1.0, s1, 0.0
|
||||
elif h1 < 2.0:
|
||||
r, g, b = s1, 1.0, 0.0
|
||||
elif h1 < 3.0:
|
||||
r, g, b = 0.0, 1.0, s1
|
||||
elif h1 < 4.0:
|
||||
r, g, b = 0.0, s1, 1.0
|
||||
elif h1 < 5.0:
|
||||
r, g, b = s1, 0.0, 1.0
|
||||
elif h1 < 6.0:
|
||||
r, g, b = 1.0, 0.0, s1
|
||||
|
||||
rot = random.random() * 90.0
|
||||
rotd = ((random.random() * 2.0) - 1.0) * 3.0
|
||||
rv = cls(x, y, xd, yd, rot, rotd, (r, g, b, 1.0))
|
||||
|
||||
return rv
|
||||
|
||||
def movestep(self):
|
||||
self.life += 1.0
|
||||
self.x += self.xd
|
||||
self.y += self.yd
|
||||
self.xd *= 0.985
|
||||
self.yd *= 0.985
|
||||
self.rot += self.rotd
|
||||
#self.color = [math.cos(self.life / 20.0) * x for x in self.basecolor]
|
||||
|
||||
|
||||
class test_engine(roc.roc_engine.base_engine):
|
||||
def __init__(self):
|
||||
self.font = models.mgr.fontlib["micross20"]
|
||||
self.text1 = models.TextModel("micross20", "#$% 0123 ,,,, Hello world!\xa8\xa8\xa8Foobar", (1.0, 1.0, 0.5, 1.0))
|
||||
self.string = ""
|
||||
self.move = 199.0
|
||||
self.moveinc = 1.0
|
||||
self.particles = collections.deque()
|
||||
self.particles.append(partycle.random())
|
||||
self.gtime = gametimer.GameTimer()
|
||||
self.gtime.start_loop()
|
||||
from roc import enums
|
||||
mdl = models.mgr.create("ui_frame_cl")
|
||||
print((mdl.layers[0].scale))
|
||||
f = ui.UIFrame(enums.ui_frametype.model, mdl)
|
||||
f = ui.make_button("hello world", None)
|
||||
f = ui.make_mainmenu()
|
||||
f.posset = (205, 205)
|
||||
#f.minsize = (9, 80)
|
||||
ui.mgr.add(f, "mainmenu")
|
||||
|
||||
|
||||
def frame(self, events):
|
||||
self.gtime.next_frame()
|
||||
for ev in events:
|
||||
ui.mgr.handle_event(ev)
|
||||
|
||||
#print "*** Starting frame"
|
||||
"""
|
||||
# pink triangle
|
||||
glDisable(GL_BLEND)
|
||||
glDisable(GL_TEXTURE_2D)
|
||||
glBegin(GL_TRIANGLE_STRIP)
|
||||
glNormal3f(0.0, 0.0, 1.0)
|
||||
glTexCoord2f(0.0, 0.0)
|
||||
glColor4f(1.0, 0.0, 0.5, 0.0)
|
||||
glVertex3f( 20.0, 50.0, 1.0)
|
||||
glVertex3f( 20.0, 600.0, 1.0)
|
||||
glVertex3f( 400.0, 50.0, 1.0)
|
||||
glEnd()
|
||||
|
||||
# yellow square
|
||||
glBegin(GL_TRIANGLE_STRIP)
|
||||
glNormal3f(0.0, 0.0, 1.0)
|
||||
glTexCoord2f(0.0, 0.0)
|
||||
glColor4f(0.0, 0.2, 0.5, 0.8)
|
||||
glVertex3f( 150.0, 20.0, -50.0)
|
||||
glVertex3f( 150.0, 400.0, -50.0)
|
||||
glVertex3f( 360.0, 20.0, -50.0)
|
||||
glVertex3f( 360.0, 400.0, -50.0)
|
||||
glEnd()
|
||||
glEnable(GL_BLEND)
|
||||
glEnable(GL_TEXTURE_2D)
|
||||
glColor4f(1.0, 1.0, 1.0, 1.0)
|
||||
"""
|
||||
|
||||
# texture test
|
||||
mdl = models.mgr.create("m_test")
|
||||
glPushMatrix()
|
||||
glTranslate(150.0, 300.0, -5.0)
|
||||
mdl.render()
|
||||
glPopMatrix()
|
||||
|
||||
|
||||
|
||||
|
||||
# font test
|
||||
glPushMatrix()
|
||||
glTranslate(200.0, 200.0, 5.0)
|
||||
self.text1.render()
|
||||
glPopMatrix()
|
||||
|
||||
for x in range(self.gtime.num_frames(10)):
|
||||
self.move = self.move + self.moveinc
|
||||
if self.move > 300.0:
|
||||
self.moveinc = -1.0
|
||||
elif self.move < 200.0:
|
||||
self.moveinc = 1.0
|
||||
for party in self.particles:
|
||||
party.movestep()
|
||||
if self.moveinc > 0.0:
|
||||
party = partycle.random()
|
||||
self.particles.append(party)
|
||||
#print party.color
|
||||
else:
|
||||
self.particles.popleft()
|
||||
|
||||
|
||||
glPushMatrix()
|
||||
glTranslate(self.move, 250.0, 5.0)
|
||||
|
||||
|
||||
"""
|
||||
if len(self.string) > 61:
|
||||
self.string = ""
|
||||
|
||||
for x in xrange(self.gtime.num_frames(1000)):
|
||||
self.string = self.string + str(len(self.string) % 10)
|
||||
"""
|
||||
for x in range(self.gtime.num_frames(100)):
|
||||
self.string = str(round(self.gtime.get_fps(), 1))
|
||||
#print len(self.gtime.g_framelist)
|
||||
|
||||
|
||||
self.font.render(self.string)
|
||||
glPopMatrix()
|
||||
|
||||
# texture test
|
||||
mdl2 = models.mgr.create("m_dralthi")
|
||||
mdl2.layers[0].color = None
|
||||
#print mdl2.layers[0].mesh
|
||||
for party in self.particles:
|
||||
glPushMatrix()
|
||||
glTranslate(600.0 + party.x, 350.0 + party.y, 6.0)
|
||||
glRotate(party.rot, 0.0, 0.0, 1.0)
|
||||
glColor4f(*party.color)
|
||||
mdl2.render()
|
||||
glPopMatrix()
|
||||
|
||||
ui.mgr.render()
|
||||
|
||||
|
||||
class sotv_engine(roc.roc_engine.base_engine):
|
||||
def __init__(self):
|
||||
self.font = models.mgr.fontlib["micross20"]
|
||||
self.text1 = models.TextModel("micross20", "#$% 0123 ,,,, Hello world!\xa8\xa8\xa8Foobar", (1.0, 1.0, 0.5, 1.0))
|
||||
self.string = ""
|
||||
self.move = 199.0
|
||||
self.moveinc = 1.0
|
||||
self.particles = collections.deque()
|
||||
self.particles.append(partycle.random())
|
||||
self.gtime = gametimer.GameTimer()
|
||||
self.gtime.start_loop()
|
||||
from roc import enums
|
||||
mdl = models.mgr.create("ui_frame_cl")
|
||||
print((mdl.layers[0].scale))
|
||||
f = ui.UIFrame(enums.ui_frametype.model, mdl)
|
||||
f = ui.make_button("hello world", None)
|
||||
f = ui.make_mainmenu()
|
||||
f.posset = (205, 205)
|
||||
#f.minsize = (9, 80)
|
||||
ui.mgr.add(f, "mainmenu")
|
||||
|
||||
|
||||
def frame(self, events):
|
||||
self.gtime.next_frame()
|
||||
for ev in events:
|
||||
ui.mgr.handle_event(ev)
|
||||
|
||||
|
||||
|
||||
ui.mgr.render()
|
||||
|
||||
roc.init2d()
|
||||
roc.set_engine(sotv_engine())
|
||||
roc.main()
|
||||
|
||||
|
||||
|