1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

Altera pasta samples

This commit is contained in:
Danilo 2024-05-25 16:55:10 -03:00
parent 329de1e523
commit 912937a021
4 changed files with 17 additions and 21 deletions

View File

@ -4,7 +4,7 @@
# Add source to this project's executable.
add_library (Xn65 STATIC
"../samples/xna.cpp"
"../samples/01_blank/xna.cpp"
"csharp/stream.cpp"
"game/component.cpp"
"content/manager.cpp"

View 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)

View File

@ -25,9 +25,7 @@ namespace xna {
}
void LoadContent() override {
spriteBatch = New<SpriteBatch>(*graphicsDevice);
texture = Content()->Load<PTexture2D>("sampleTexture");
spriteBatch = New<SpriteBatch>(*graphicsDevice);
Game::LoadContent();
}
@ -40,15 +38,7 @@ namespace xna {
}
void Draw(GameTime const& gameTime) override {
graphicsDevice->Clear(Colors::CornflowerBlue);
spriteBatch->Begin();
if(texture)
spriteBatch->Draw(*texture, Vector2(), Colors::White);
spriteBatch->End();
graphicsDevice->Clear(Colors::CornflowerBlue);
Game::Draw(gameTime);
}

View File

@ -3,11 +3,4 @@
#
# Add source to this project's executable.
add_executable (SampleApp WIN32 "xna.cpp")
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)
add_subdirectory ("01_blank")