浏览代码

Minor format tweaks

pull/1029/head
Ray 5 年前
父节点
当前提交
5ad65d9291
共有 3 个文件被更改,包括 8 次插入8 次删除
  1. +2
    -2
      examples/core/core_world_screen.c
  2. +1
    -1
      examples/models/models_heightmap.c
  3. +5
    -5
      examples/models/models_rlgl_full_solar_system.c

+ 2
- 2
examples/core/core_world_screen.c 查看文件

@ -62,8 +62,8 @@ int main(void)
EndMode3D(); EndMode3D();
DrawText("Enemy: 100 / 100", cubeScreenPosition.x - MeasureText("Enemy: 100 / 100", 20) / 2, cubeScreenPosition.y, 20, BLACK);
DrawText("Text is always on top of the cube", (screenWidth - MeasureText("Text is always on top of the cube", 20)) / 2, 25, 20, GRAY);
DrawText("Enemy: 100 / 100", cubeScreenPosition.x - MeasureText("Enemy: 100/100", 20)/2, cubeScreenPosition.y, 20, BLACK);
DrawText("Text is always on top of the cube", (screenWidth - MeasureText("Text is always on top of the cube", 20))/2, 25, 20, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

+ 1
- 1
examples/models/models_heightmap.c 查看文件

@ -21,7 +21,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [models] example - heightmap loading and drawing"); InitWindow(screenWidth, screenHeight, "raylib [models] example - heightmap loading and drawing");
// Define our custom camera to look into our 3d world // Define our custom camera to look into our 3d world
Camera camera = { { 18.0f, 16.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Camera camera = { { 18.0f, 18.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM) Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM) Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM)

+ 5
- 5
examples/models/models_rlgl_full_solar_system.c 查看文件

@ -47,8 +47,8 @@ int main(void)
{ {
// Initialization // Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
const int screenWidth = 1024;
const int screenHeight = 768;
const int screenWidth = 800;
const int screenHeight = 450;
const char *text; const char *text;
bool gridEnabled = true; bool gridEnabled = true;
bool helpEnabled = false; bool helpEnabled = false;
@ -67,9 +67,6 @@ int main(void)
SetCameraMode(camera, CAMERA_FREE); SetCameraMode(camera, CAMERA_FREE);
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Create Bodies // Create Bodies
Body sun = CreateBody(0.2, 0.0, 0, GOLD, "sun"); Body sun = CreateBody(0.2, 0.0, 0, GOLD, "sun");
Body moon = CreateBody(0.05, 0.200, 24, GRAY, "moon"); Body moon = CreateBody(0.05, 0.200, 24, GRAY, "moon");
@ -94,6 +91,9 @@ int main(void)
AddBodyChildren(&sun, &pluto); AddBodyChildren(&sun, &pluto);
AddBodyChildren(&earth, &moon); AddBodyChildren(&earth, &moon);
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop // Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key while (!WindowShouldClose()) // Detect window close button or ESC key

正在加载...
取消
保存