summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/ranger.16
-rw-r--r--doc/ranger.pod6
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index 461ee00e..17795a7c 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -163,13 +163,13 @@ The \fI\s-1README\s0\fR contains install instructions.
 The file \fI\s-1HACKING\s0.md\fR contains guidelines for code modification.
 .PP
 The directory \fIdoc/configs\fR contains configuration files.  They are usually
-installed to \fI/usr/lib/python*/site\-packages/ranger/config\fR and can be
-obtained with ranger's \-\-copy\-config option.
+installed to \fI/usr/share/doc/ranger/config\fR and can be obtained with ranger's
+\&\-\-copy\-config option.
 .PP
 The directory \fIexamples\fR contains reference implementations for ranger
 plugins, sample configuration files and some programs for integrating ranger
 with other software.  They are usually installed to
-\&\fI/usr/lib/python*/site\-packages/ranger/examples\fR.
+\&\fI/usr/share/doc/ranger/examples\fR.
 .PP
 The man page of \fIrifle\fR\|(1) describes the functions of the file opener
 .PP
diff --git a/doc/ranger.pod b/doc/ranger.pod
index ab6dc6d2..ab84de2c 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -36,13 +36,13 @@ The F<README> contains install instructions.
 The file F<HACKING.md> contains guidelines for code modification.
 
 The directory F<doc/configs> contains configuration files.  They are usually
-installed to F</usr/lib/python*/site-packages/ranger/config> and can be
-obtained with ranger's --copy-config option.
+installed to F</usr/share/doc/ranger/config> and can be obtained with ranger's
+--copy-config option.
 
 The directory F<examples> contains reference implementations for ranger
 plugins, sample configuration files and some programs for integrating ranger
 with other software.  They are usually installed to
-F</usr/lib/python*/site-packages/ranger/examples>.
+F</usr/share/doc/ranger/examples>.
 
 The man page of rifle(1) describes the functions of the file opener
 
'>53 54 55 56 57 58 59 60 61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98






































                                                                                       




                                                                       
















                                                                                                




                                 





















                                                               
                                                                         








                                                                               
#include "pong.h"
#include "raylib.h"

void marathon_main() {

    // Init Music
    Music Background = LoadMusicStream("resources/marathon.wav");
    Background.looping = true;
    PlayMusicStream(Background);

    // Init balls lmao
    struct Balls Ball;
	Ball.X = 1280/2.0f;
	Ball.Y = 720/2.0f;
	Ball.Direction = LEFT;
	Ball.Speed = 3.0f;
	Ball.Angle = 0.0f;

    // Init Player
    struct Players Player;
    Player.Y = 0;
    Player.Direction = 0;
    Player.Score = 0;

    // Init sprites
    Texture2D PaddleSprite = LoadTexture("resources/paddle.png");
	Texture2D BallSprite = LoadTexture("resources/ball.png");

    char PlayerScore[50]; // Used later to display score on screen.

    // Set Collision Boxes
	Player.HitBox = (Rectangle){80, Player.Y, 5, PaddleSprite.height};
	Ball.HitBox = (Rectangle){Ball.X, Ball.Y, BallSprite.width, BallSprite.height};

    // Init Camera
    Camera2D MainCamera;
        MainCamera.target = (Vector2){0, 0};
        MainCamera.offset = (Vector2){0, 0};
        MainCamera.rotation = 0;
    bool MarathonGoing = true;
    while(MarathonGoing == true && GameGoing == true) {
        if (WindowShouldClose()) { //Quit Game if the window is closed.
            GameGoing = false;
        }
        UpdateMusicStream(Background);
        snprintf(PlayerScore, 50, "Player: %d", Player.Score);
        MainCamera.zoom = GetScreenHeight()/720.0f;
		MainCamera.offset = (Vector2){GetScreenWidth()/2.0f, GetScreenHeight()/2.0f};
		MainCamera.target = (Vector2){1280/2.0f, 720/2.0f};

        //Controls
		if(IsKeyDown(KEY_UP)) {
			Player.Y -= 10;
		} else if (IsKeyDown(KEY_DOWN)) {
			Player.Y += 10;
		} else if(IsKeyPressed(KEY_ESCAPE)) {
			EnableCursor();
		} else if(IsMouseButtonPressed(MOUSE_BUTTON_LEFT) || IsCursorHidden() == true) {
			Player.Y = GetMouseY()-PaddleSprite.height/2.0f;
			DisableCursor();
		}
        
        // Leave game
        if(IsKeyPressed(KEY_Q)) {
            return;
        }
		
		if(GetMouseY() < 0) {
			SetMousePosition(0, 0);
		} else if(GetMouseY() > 720) {
			SetMousePosition(0, 720);
		}

		//Check if players are off-screen
		if (Player.Y < 0) {
			Player.Y = 0;
		} else if (Player.Y > 480) {
			Player.Y = 480;
		}

        // Collision
        ball(&Player.HitBox, NULL, &Ball, &Player.Score, NULL);
        //Updates hitbox with player's position.
		Player.HitBox.y = Player.Y;

        BeginDrawing();
			ClearBackground(BLACK);
			BeginMode2D(MainCamera);
                DrawRectangle(0, 0, 1280, 720, (Color){20, 20, 20, 255});
				DrawTexture(PaddleSprite, 0, Player.Y, WHITE);
				DrawTexture(BallSprite, Ball.X, Ball.Y, WHITE);
				DrawText(PlayerScore, 0, 0, 32, BLUE);
			EndMode2D();
		EndDrawing();
    }
    EnableCursor();
    return;
}