mirror of
https://github.com/Theaninova/mhlib.git
synced 2025-12-17 23:16:21 +00:00
cleanup
This commit is contained in:
@@ -32,7 +32,7 @@ Support of games primarily depends on who developed them - Games with structural
|
|||||||
* [x] Moorhuhn Schatzjäger 3
|
* [x] Moorhuhn Schatzjäger 3
|
||||||
* [ ] Moorhuhn Invasion
|
* [ ] Moorhuhn Invasion
|
||||||
* `.sar` Starforce 3D Engine (Visual Imagination Software "VIS" GbR): LightWave 3D + Open Dynamics Engine + CEGUI
|
* `.sar` Starforce 3D Engine (Visual Imagination Software "VIS" GbR): LightWave 3D + Open Dynamics Engine + CEGUI
|
||||||
* [ ] Moorhuhn Kart 3
|
* [x] Moorhuhn Kart 3
|
||||||
* [ ] Moorhuhn Director's Cut
|
* [ ] Moorhuhn Director's Cut
|
||||||
* [ ] Moorhuhn Kart Thunder
|
* [ ] Moorhuhn Kart Thunder
|
||||||
* `*.dat` "Phenomedia 2D Engine"
|
* `*.dat` "Phenomedia 2D Engine"
|
||||||
|
|||||||
@@ -50,17 +50,17 @@ vec3 project(
|
|||||||
case 4: // Front Projection
|
case 4: // Front Projection
|
||||||
return vec3(0.0, 1.0, 0.0);
|
return vec3(0.0, 1.0, 0.0);
|
||||||
case 3:
|
case 3:
|
||||||
vec3 p = (transform * vec4(position, 1.0)).xyz / 10.0;
|
vec3 p = (transform * vec4(position, 1.0)).xyz;
|
||||||
vec3 n = normalize(abs(mat3(transform) * normal));
|
vec3 n = normalize(abs(mat3(transform) * normal));
|
||||||
vec2 uv2 = (n.x > n.y && n.x > n.z) ? vec2(p.z, p.y)
|
vec2 uv2 = (n.x > n.y && n.x > n.z) ? vec2(p.z, p.y)
|
||||||
: ((n.y > n.x && n.y > n.z) ? vec2(p.x, p.z) : vec2(p.x, p.y));
|
: ((n.y > n.x && n.y > n.z) ? vec2(p.x, p.z) : vec2(p.x, p.y));
|
||||||
return texture(tex, uv2).rgb;
|
return texture(tex, uv2 + 0.5).rgb;
|
||||||
case 2: // Spherical
|
case 2: // Spherical
|
||||||
return vec3(0.0, 0.0, 1.0);
|
return vec3(0.0, 0.0, 1.0);
|
||||||
case 1: // Cylindrical
|
case 1: // Cylindrical
|
||||||
return vec3(1.0, 1.0, 0.0);
|
return vec3(1.0, 1.0, 0.0);
|
||||||
case 0: // Planar
|
case 0: // Planar
|
||||||
return texture(tex, (transform * vec4(position, 1.0)).xz / 10.0).rgb;
|
return texture(tex, (transform * vec4(position, 1.0)).xz).rgb;
|
||||||
default:
|
default:
|
||||||
return vec3(0.0);
|
return vec3(0.0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,23 @@ resource_name = "load"
|
|||||||
script/source = "@tool
|
script/source = "@tool
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
|
@export var load_list = [
|
||||||
|
\"anlagen\",
|
||||||
|
\"boden\",
|
||||||
|
\"bok\",
|
||||||
|
\"fensterscheiben\",
|
||||||
|
\"gelaender\",
|
||||||
|
\"kraftfelder\",
|
||||||
|
\"rundgang\",
|
||||||
|
\"stampfer\",
|
||||||
|
\"timetunnel\",
|
||||||
|
\"waende\",
|
||||||
|
]
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var scene = load(\"sar://D:/Moorhuhnkart/3dobjects_tracks/track07_ufo/waende.lwo\").instantiate()
|
for item in load_list:
|
||||||
add_child(scene)
|
var scene = load(\"sar://D:/Moorhuhnkart/3dobjects_tracks/track07_ufo/%s.lwo\" % item).instantiate()
|
||||||
|
add_child(scene)
|
||||||
"
|
"
|
||||||
|
|
||||||
[node name="test" type="Node3D"]
|
[node name="test" type="Node3D"]
|
||||||
|
|||||||
@@ -34,12 +34,12 @@ pub fn collect_clip(target: &mut HashMap<u32, Gd<Texture2D>>, clip: ImageClip) {
|
|||||||
if sequence.data.flags & 0x1 != 1 {
|
if sequence.data.flags & 0x1 != 1 {
|
||||||
godot_error!("Non-looping animated textures are not supported!")
|
godot_error!("Non-looping animated textures are not supported!")
|
||||||
}
|
}
|
||||||
let mut frame_duration = 15.0 / 60.0;
|
let mut frame_duration = 1.0 / 15.0;
|
||||||
|
|
||||||
for meta in attributes {
|
for meta in attributes {
|
||||||
match meta {
|
match meta {
|
||||||
ImageClipSubChunk::Time(time) => {
|
ImageClipSubChunk::Time(time) => {
|
||||||
frame_duration = time.frame_rate as f64 / 60.0;
|
frame_duration = 1.0 / time.frame_rate as f64;
|
||||||
}
|
}
|
||||||
x => godot_error!("TODO: {:?}", x),
|
x => godot_error!("TODO: {:?}", x),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ impl MaterialUvInfo {
|
|||||||
.scaled(size),
|
.scaled(size),
|
||||||
origin: pos,
|
origin: pos,
|
||||||
}
|
}
|
||||||
|
.affine_inverse()
|
||||||
.to_variant(),
|
.to_variant(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user