mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
Altera pasta samples
This commit is contained in:
parent
329de1e523
commit
912937a021
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Add source to this project's executable.
|
# Add source to this project's executable.
|
||||||
add_library (Xn65 STATIC
|
add_library (Xn65 STATIC
|
||||||
"../samples/xna.cpp"
|
"../samples/01_blank/xna.cpp"
|
||||||
"csharp/stream.cpp"
|
"csharp/stream.cpp"
|
||||||
"game/component.cpp"
|
"game/component.cpp"
|
||||||
"content/manager.cpp"
|
"content/manager.cpp"
|
||||||
|
13
samples/01_blank/CMakeLists.txt
Normal file
13
samples/01_blank/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# CMakeList.txt : CMake project for CmakeSharedExeTest, include source and define
|
||||||
|
# project specific logic here.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Add source to this project's executable.
|
||||||
|
add_executable (BlankApp WIN32 "xna.cpp")
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||||
|
set_property(TARGET BlankApp PROPERTY CXX_STANDARD 20)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO: Add tests and install targets if needed.
|
||||||
|
target_link_libraries(BlankApp Xn65)
|
@ -25,9 +25,7 @@ namespace xna {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LoadContent() override {
|
void LoadContent() override {
|
||||||
spriteBatch = New<SpriteBatch>(*graphicsDevice);
|
spriteBatch = New<SpriteBatch>(*graphicsDevice);
|
||||||
|
|
||||||
texture = Content()->Load<PTexture2D>("sampleTexture");
|
|
||||||
|
|
||||||
Game::LoadContent();
|
Game::LoadContent();
|
||||||
}
|
}
|
||||||
@ -40,15 +38,7 @@ namespace xna {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Draw(GameTime const& gameTime) override {
|
void Draw(GameTime const& gameTime) override {
|
||||||
graphicsDevice->Clear(Colors::CornflowerBlue);
|
graphicsDevice->Clear(Colors::CornflowerBlue);
|
||||||
|
|
||||||
spriteBatch->Begin();
|
|
||||||
|
|
||||||
if(texture)
|
|
||||||
spriteBatch->Draw(*texture, Vector2(), Colors::White);
|
|
||||||
|
|
||||||
spriteBatch->End();
|
|
||||||
|
|
||||||
Game::Draw(gameTime);
|
Game::Draw(gameTime);
|
||||||
}
|
}
|
||||||
|
|
@ -3,11 +3,4 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Add source to this project's executable.
|
# Add source to this project's executable.
|
||||||
add_executable (SampleApp WIN32 "xna.cpp")
|
add_subdirectory ("01_blank")
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|
||||||
set_property(TARGET SampleApp PROPERTY CXX_STANDARD 20)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# TODO: Add tests and install targets if needed.
|
|
||||||
target_link_libraries(SampleApp Xn65)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user