update README with syntax highlighting
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
1. Put Pixel
|
1. Put Pixel
|
||||||
|
|
||||||
```
|
```c
|
||||||
void put_pixel(unsigned int x, unsigned int y, uint32_t color);
|
void put_pixel(unsigned int x, unsigned int y, uint32_t color);
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ void put_pixel(unsigned int x, unsigned int y, uint32_t color);
|
|||||||
|
|
||||||
2. Clear Framebuffer
|
2. Clear Framebuffer
|
||||||
|
|
||||||
```
|
```c
|
||||||
void clear_framebuffer(uint32_t color);
|
void clear_framebuffer(uint32_t color);
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ void clear_framebuffer(uint32_t color);
|
|||||||
|
|
||||||
The main function of a program that uses this engine should look something like this:
|
The main function of a program that uses this engine should look something like this:
|
||||||
|
|
||||||
```
|
```c
|
||||||
int main() {
|
int main() {
|
||||||
// initialize the engine
|
// initialize the engine
|
||||||
if (engine_init(
|
if (engine_init(
|
||||||
@@ -50,7 +50,7 @@ Updating the framebuffer means changing color values in the respective struct an
|
|||||||
|
|
||||||
An excerpt from the main game loop is below:
|
An excerpt from the main game loop is below:
|
||||||
|
|
||||||
```
|
```c
|
||||||
...
|
...
|
||||||
|
|
||||||
// main game loop
|
// main game loop
|
||||||
|
|||||||
Reference in New Issue
Block a user