2013-04-11 11:04:16 +00:00
|
|
|
|
using System.Collections.Generic;
|
2012-04-17 19:13:47 +00:00
|
|
|
|
using SlimDX;
|
|
|
|
|
using SlimDX.Direct3D9;
|
2012-05-21 23:51:32 +00:00
|
|
|
|
using CodeImp.DoomBuilder.GZBuilder.MD3;
|
2012-04-17 19:13:47 +00:00
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|
|
|
|
{
|
2013-09-11 09:47:53 +00:00
|
|
|
|
internal sealed class ModelData
|
|
|
|
|
{
|
|
|
|
|
internal List<string> ModelNames;
|
|
|
|
|
internal List<string> TextureNames;
|
2012-04-17 19:13:47 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
internal GZModel Model;
|
2012-04-17 19:13:47 +00:00
|
|
|
|
|
2013-07-29 08:50:50 +00:00
|
|
|
|
private ModelLoadState loadstate;
|
|
|
|
|
public ModelLoadState LoadState { get { return loadstate; } internal set { loadstate = value; } }
|
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
internal Vector3 Scale;
|
|
|
|
|
internal float zOffset;
|
2012-04-17 19:13:47 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
internal float AngleOffset; //in radians
|
|
|
|
|
internal float PitchOffset; //in radians
|
|
|
|
|
internal float RollOffset; //in radians
|
2014-01-03 10:33:45 +00:00
|
|
|
|
internal bool OverridePalette; //used for voxel models only
|
|
|
|
|
internal bool IsVoxel;
|
Model rendering (all modes): UDMF scale, pitch and roll are now displayed.
Thing Edit Form, UDMF: added controls for setting pitch, roll, scale, render style, fill color, alpha, health and score.
Visual mode, UDMF: UDMF scale is now applied when rendering sprites.
Added Thing Statistics form (Edit -> View Thing Types...), which shows all loaded thing types with some additional info.
Visual mode: sprites with negative ScaleX and positive ScaleY were not rendered properly.
Classic modes: display was not updated after loading a sprite.
Current testing engine change was not saved on closing the program when no other game configuration settings were changed.
2014-04-30 10:01:22 +00:00
|
|
|
|
internal bool InheritActorPitch;
|
|
|
|
|
internal bool InheritActorRoll;
|
2012-07-28 20:36:28 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
internal ModelData() {
|
|
|
|
|
ModelNames = new List<string>();
|
|
|
|
|
TextureNames = new List<string>();
|
2014-01-03 10:33:45 +00:00
|
|
|
|
Scale = new Vector3(1, 1, 1);
|
2013-09-11 09:47:53 +00:00
|
|
|
|
}
|
2012-05-21 23:51:32 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
internal void Dispose() {
|
|
|
|
|
if (Model != null) {
|
|
|
|
|
foreach (Mesh mesh in Model.Meshes)
|
|
|
|
|
mesh.Dispose();
|
2012-05-21 23:51:32 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
foreach (Texture t in Model.Textures)
|
|
|
|
|
t.Dispose();
|
2013-07-29 08:50:50 +00:00
|
|
|
|
|
|
|
|
|
loadstate = ModelLoadState.None;
|
2013-09-11 09:47:53 +00:00
|
|
|
|
}
|
2013-07-29 08:50:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2012-04-17 19:13:47 +00:00
|
|
|
|
}
|