actually all compiles now
This commit is contained in:
99
Makefile
99
Makefile
@@ -1,68 +1,68 @@
|
|||||||
CSC = gmcs
|
CSC = gmcs
|
||||||
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
||||||
DEFINE = DEBUG;TRACE
|
DEFINE = DEBUG;TRACE
|
||||||
|
PROGRAMS =fileformats gl game ra cnc aftermath server seqed
|
||||||
|
|
||||||
PROGRAMS = fileformats gl game ra cnc aftermath server seqed
|
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll
|
||||||
|
|
||||||
COMMON_LIBS := System.dll System.Core.dll System.Drawing.dll System.Xml.dll
|
fileformats_SRCS = $(shell find OpenRa.FileFormats/ -iname '*.cs')
|
||||||
|
fileformats_TARGET = OpenRa.FileFormats.dll
|
||||||
|
fileformats_KIND = library
|
||||||
|
fileformats_LIBS = $(COMMON_LIBS)
|
||||||
|
|
||||||
fileformats_SRCS := $(shell find OpenRa.FileFormats/ -iname '*.cs')
|
gl_SRCS = $(shell find OpenRa.Gl/ -iname '*.cs')
|
||||||
fileformats_TARGET := OpenRa.FileFormats.dll
|
gl_TARGET = OpenRa.Gl.dll
|
||||||
fileformats_KIND := library
|
gl_KIND = library
|
||||||
fileformats_LIBS := $(COMMON_LIBS)
|
gl_DEPS = $(fileformats_TARGET) $(game_TARGET) \
|
||||||
|
|
||||||
gl_SRCS := $(shell find OpenRa.Gl/ -iname '*.cs')
|
|
||||||
gl_TARGET := OpenRa.Gl.dll
|
|
||||||
gl_KIND := library
|
|
||||||
gl_DEPS := $(fileformats_TARGET) \
|
|
||||||
thirdparty/Tao/Tao.Glfw.dll
|
thirdparty/Tao/Tao.Glfw.dll
|
||||||
gl_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll \
|
gl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
|
||||||
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll \
|
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll \
|
||||||
$(gl_DEPS)
|
$(gl_DEPS) $(game_TARGET)
|
||||||
|
|
||||||
|
game_SRCS = $(shell find OpenRa.Game/ -iname '*.cs')
|
||||||
game_SRCS := $(shell find OpenRa.Game/ -iname '*.cs')
|
game_TARGET = OpenRa.Game.exe
|
||||||
game_TARGET := OpenRa.Game.exe
|
game_KIND = winexe
|
||||||
game_KIND := winexe
|
game_DEPS = $(fileformats_TARGET)
|
||||||
game_DEPS := $(fileformats_TARGET)
|
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
|
||||||
game_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
|
|
||||||
thirdparty/Tao/Tao.OpenAl.dll
|
thirdparty/Tao/Tao.OpenAl.dll
|
||||||
|
game_FLAGS = -win32icon:OpenRa.Game/OpenRa.ico
|
||||||
|
|
||||||
game_FLAGS := -win32icon:OpenRa.Game/OpenRa.ico
|
ra_SRCS = $(shell find OpenRa.Mods.RA/ -iname '*.cs')
|
||||||
|
ra_TARGET = mods/ra/OpenRa.Mods.RA.dll
|
||||||
|
ra_KIND = library
|
||||||
|
ra_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
|
ra_LIBS = $(COMMON_LIBS) $(ra_DEPS)
|
||||||
|
|
||||||
ra_SRCS := $(shell find OpenRa.Mods.RA/ -iname '*.cs')
|
cnc_SRCS = $(shell find OpenRa.Mods.Cnc/ -iname '*.cs')
|
||||||
ra_TARGET := mods/ra/OpenRa.Mods.RA.dll
|
cnc_TARGET = mods/cnc/OpenRa.Mods.Cnc.dll
|
||||||
ra_KIND := library
|
cnc_KIND = library
|
||||||
ra_DEPS := $(fileformats_TARGET) $(game_TARGET)
|
cnc_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
ra_LIBS := $(COMMON_LIBS) $(ra_DEPS)
|
cnc_LIBS = $(COMMON_LIBS) $(cnc_DEPS)
|
||||||
|
|
||||||
cnc_SRCS := $(shell find OpenRa.Mods.Cnc/ -iname '*.cs')
|
aftermath_SRCS = $(shell find OpenRa.Mods.Aftermath/ -iname '*.cs')
|
||||||
cnc_TARGET := mods/cnc/OpenRa.Mods.Cnc.dll
|
aftermath_TARGET = mods/cnc/OpenRa.Mods.Aftermath.dll
|
||||||
cnc_KIND := library
|
aftermath_KIND = library
|
||||||
cnc_DEPS := $(fileformats_TARGET) $(game_TARGET)
|
aftermath_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||||
cnc_LIBS := $(COMMON_LIBS) $(cnc_DEPS)
|
aftermath_LIBS = $(COMMON_LIBS) $(aftermath_DEPS)
|
||||||
|
|
||||||
aftermath_SRCS := $(shell find OpenRa.Mods.Aftermath/ -iname '*.cs')
|
server_SRCS = $(shell find OpenRA.Server/ -iname '*.cs')
|
||||||
aftermath_TARGET := mods/cnc/OpenRa.Mods.Aftermath.dll
|
server_TARGET = OpenRA.Server.exe
|
||||||
aftermath_KIND := library
|
server_KIND = winexe
|
||||||
aftermath_DEPS := $(fileformats_TARGET) $(game_TARGET)
|
server_DEPS = $(fileformats_TARGET)
|
||||||
aftermath_LIBS := $(COMMON_LIBS) $(aftermath_DEPS)
|
server_LIBS = $(COMMON_LIBS) $(server_DEPS)
|
||||||
|
|
||||||
server_SRCS := $(shell find OpenRA.Server/ -iname '*.cs')
|
seqed_SRCS = $(shell find SequenceEditor/ -iname '*.cs')
|
||||||
server_TARGET := OpenRA.Server.exe
|
seqed_TARGET = SequenceEditor.exe
|
||||||
server_KIND := winexe
|
seqed_KIND = winexe
|
||||||
server_DEPS := $(fileformats_TARGET)
|
seqed_DEPS = $(fileformats_TARGET)
|
||||||
server_LIBS := $(COMMON_LIBS) $(server_DEPS)
|
seqed_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS)
|
||||||
|
|
||||||
seqed_SRCS := $(shell find SequenceEditor/ -iname '*.cs')
|
|
||||||
seqed_TARGET := SequenceEditor.exe
|
|
||||||
seqed_KIND := winexe
|
|
||||||
seqed_DEPS := $(fileformats_TARGET)
|
|
||||||
seqed_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS)
|
|
||||||
|
|
||||||
# -platform:x86
|
# -platform:x86
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
define BUILD_ASSEMBLY
|
define BUILD_ASSEMBLY
|
||||||
|
|
||||||
$$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS)
|
$$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS)
|
||||||
@echo CSC $$(@)
|
@echo CSC $$(@)
|
||||||
@$(CSC) $$($(1)_LIBS:%=-r:%) \
|
@$(CSC) $$($(1)_LIBS:%=-r:%) \
|
||||||
@@ -72,19 +72,20 @@ $$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS)
|
|||||||
$$($(1)_SRCS)
|
$$($(1)_SRCS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
$(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
$(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.PHONY: clean all default mods server seqed
|
.PHONY: clean all default mods server seqed
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb
|
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb
|
||||||
|
|
||||||
mods: $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET)
|
mods: $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET)
|
||||||
|
|
||||||
server: $(server_TARGET)
|
server: $(server_TARGET)
|
||||||
seqed: $(seqed_TARGET)
|
seqed: $(seqed_TARGET)
|
||||||
all: clean server default mods seqed
|
all: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) $(server_TARGET) $(seqed_TARGET)
|
||||||
|
|
||||||
.DEFAULT: all
|
.DEFAULT: all
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace OpenRa.FileFormats.Graphics
|
|||||||
|
|
||||||
public interface IGraphicsDevice
|
public interface IGraphicsDevice
|
||||||
{
|
{
|
||||||
IVertexBuffer<Vertex> CreateVertexBuffer<Vertex>( int length );
|
IVertexBuffer<Vertex> CreateVertexBuffer( int length );
|
||||||
IIndexBuffer CreateIndexBuffer( int length );
|
IIndexBuffer CreateIndexBuffer( int length );
|
||||||
ITexture CreateTexture( Bitmap bitmap );
|
ITexture CreateTexture( Bitmap bitmap );
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace OpenRa.Graphics
|
|||||||
public LineRenderer( Renderer renderer )
|
public LineRenderer( Renderer renderer )
|
||||||
{
|
{
|
||||||
this.renderer = renderer;
|
this.renderer = renderer;
|
||||||
vertexBuffer = renderer.Device.CreateVertexBuffer<Vertex>(vertices.Length );
|
vertexBuffer = renderer.Device.CreateVertexBuffer(vertices.Length );
|
||||||
indexBuffer = renderer.Device.CreateIndexBuffer( indices.Length );
|
indexBuffer = renderer.Device.CreateIndexBuffer( indices.Length );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace OpenRa.Graphics
|
|||||||
this.renderer = renderer;
|
this.renderer = renderer;
|
||||||
this.shader = shader;
|
this.shader = shader;
|
||||||
|
|
||||||
vertexBuffer = renderer.Device.CreateVertexBuffer<Vertex>( vertices.Length );
|
vertexBuffer = renderer.Device.CreateVertexBuffer( vertices.Length );
|
||||||
indexBuffer = renderer.Device.CreateIndexBuffer( indices.Length );
|
indexBuffer = renderer.Device.CreateIndexBuffer( indices.Length );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace OpenRa.Graphics
|
|||||||
|
|
||||||
terrainSheet = tileMapping[map.MapTiles[map.XOffset, map.YOffset]].sheet;
|
terrainSheet = tileMapping[map.MapTiles[map.XOffset, map.YOffset]].sheet;
|
||||||
|
|
||||||
vertexBuffer = renderer.Device.CreateVertexBuffer<Vertex>( vertices.Length );
|
vertexBuffer = renderer.Device.CreateVertexBuffer( vertices.Length );
|
||||||
vertexBuffer.SetData( vertices );
|
vertexBuffer.SetData( vertices );
|
||||||
|
|
||||||
indexBuffer = renderer.Device.CreateIndexBuffer( indices.Length );
|
indexBuffer = renderer.Device.CreateIndexBuffer( indices.Length );
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ using Tao.Cg;
|
|||||||
using Tao.OpenGl;
|
using Tao.OpenGl;
|
||||||
using OpenRa.FileFormats.Graphics;
|
using OpenRa.FileFormats.Graphics;
|
||||||
using Tao.Glfw;
|
using Tao.Glfw;
|
||||||
using OpenRa;
|
|
||||||
|
|
||||||
[assembly: Renderer( typeof( OpenRa.GlRenderer.GraphicsDevice ))]
|
[assembly: Renderer( typeof( OpenRa.GlRenderer.GraphicsDevice ))]
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ namespace OpenRa.GlRenderer
|
|||||||
: button == Glfw.GLFW_MOUSE_BUTTON_2 ? MouseButtons.Right
|
: button == Glfw.GLFW_MOUSE_BUTTON_2 ? MouseButtons.Right
|
||||||
: button == Glfw.GLFW_MOUSE_BUTTON_3 ? MouseButtons.Middle
|
: button == Glfw.GLFW_MOUSE_BUTTON_3 ? MouseButtons.Middle
|
||||||
: 0;
|
: 0;
|
||||||
Game.DispatchMouseInput( action == Glfw.GLFW_PRESS ? MouseInputEvent.Down : MouseInputEvent.Up,
|
OpenRa.Game.DispatchMouseInput( action == Glfw.GLFW_PRESS ? MouseInputEvent.Down : MouseInputEvent.Up,
|
||||||
new MouseEventArgs( b, action == Glfw.GLFW_PRESS ? 1 : 0, mouseX, mouseY, 0 ), 0 );
|
new MouseEventArgs( b, action == Glfw.GLFW_PRESS ? 1 : 0, mouseX, mouseY, 0 ), 0 );
|
||||||
|
|
||||||
if (action == Glfw.GLFW_PRESS) lastButtonBits |= b;
|
if (action == Glfw.GLFW_PRESS) lastButtonBits |= b;
|
||||||
@@ -82,11 +82,11 @@ namespace OpenRa.GlRenderer
|
|||||||
mouseX = x;
|
mouseX = x;
|
||||||
mouseY = y;
|
mouseY = y;
|
||||||
if (initDone)
|
if (initDone)
|
||||||
Game.DispatchMouseInput(MouseInputEvent.Move, new MouseEventArgs(lastButtonBits, 0, x, y, 0), 0);
|
OpenRa.Game.DispatchMouseInput(MouseInputEvent.Move, new MouseEventArgs(lastButtonBits, 0, x, y, 0), 0);
|
||||||
});
|
});
|
||||||
Glfw.glfwSetWindowCloseCallback( windowCloseCallback = () =>
|
Glfw.glfwSetWindowCloseCallback( windowCloseCallback = () =>
|
||||||
{
|
{
|
||||||
Game.Exit();
|
OpenRa.Game.Exit();
|
||||||
Glfw.glfwIconifyWindow();
|
Glfw.glfwIconifyWindow();
|
||||||
return Gl.GL_TRUE;
|
return Gl.GL_TRUE;
|
||||||
} );
|
} );
|
||||||
@@ -189,7 +189,7 @@ namespace OpenRa.GlRenderer
|
|||||||
|
|
||||||
#region IGraphicsDevice Members
|
#region IGraphicsDevice Members
|
||||||
|
|
||||||
public IVertexBuffer<Vertex> CreateVertexBuffer<Vertex>( int size )
|
public IVertexBuffer<Vertex> CreateVertexBuffer( int size )
|
||||||
{
|
{
|
||||||
return new VertexBuffer<Vertex>( this, size );
|
return new VertexBuffer<Vertex>( this, size );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user