Addapt for android
Center the tree texture on the screen
This commit is contained in:
parent
462f27aa26
commit
1755c18496
17
main.cpp
17
main.cpp
@ -1,19 +1,26 @@
|
||||
#include "raylib.h"
|
||||
#include "Tree.hpp"
|
||||
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 800;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
InitWindow(screenWidth, screenHeight, "raylib");
|
||||
char *name = "treender";
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 800;
|
||||
|
||||
#ifdef MY_ANDROID
|
||||
InitWindow(0, 0, name);
|
||||
screenWidth = GetScreenWidth();
|
||||
screenHeight = GetScreenHeight();
|
||||
#else
|
||||
InitWindow(screenWidth, screenHeight, name);
|
||||
#endif
|
||||
SetTargetFPS(60);
|
||||
{
|
||||
Tree tree(800);
|
||||
tree.newTree();
|
||||
|
||||
Rectangle dest = {0, 0, screenWidth, screenHeight};
|
||||
int yPos = (screenHeight - screenWidth) / 2;
|
||||
Rectangle dest = {yPos, 0, screenWidth, screenWidth};
|
||||
float rotation = 0.0f;
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user