H3K
Nobaldi's nose
- Joined
- Jun 30, 2025
- Messages
- 1,224
It was already like this. What changed?Thread devolved into being the Shiwi of the Shroom. The Broom?
It was already like this. What changed?Thread devolved into being the Shiwi of the Shroom. The Broom?
That's Goot's ShroomThe Groom![]()
RUST is like 'p incarnate
C is better just learn raylib lil bro
i've never seen C shills who use CC is better just learn raylib lil bro
i've never seen C shills who use C
#pragma once
#include <stdlib.h>
#include "raylib.h"
typedef enum {
CONTROLS_UP,
CONTROLS_UP_ALT,
CONTROLS_DOWN,
CONTROLS_DOWN_ALT,
CONTROLS_LEFT,
CONTROLS_LEFT_ALT,
CONTROLS_RIGHT,
CONTROLS_RIGHT_ALT,
CONTROLS_ACTION_ALT,
CONTROLS_SPECIAL_ALT,
CONTROLS_UTILITY,
CONTROLS_ENTER,
CONTROLS_KCOUNT
} KeyboardControlType;
typedef enum {
CONTROLS_ACTION,
CONTROLS_SPECIAL,
CONTROLS_MCOUNT
} MouseControlType;
#define KEYBOARD_CONTROL_COUNT CONTROLS_KCOUNT
#define MOUSE_CONTROL_COUNT CONTROLS_MCOUNT
typedef struct {
KeyboardKey keys[KEYBOARD_CONTROL_COUNT];
} KeyboardControls;
typedef struct {
KeyboardKey buttons[MOUSE_CONTROL_COUNT];
} MouseControls;
typedef struct {
KeyboardControls keyboard;
MouseControls mouse;
} Controls;
void controls_set_key(Controls* controls, KeyboardControlType action, KeyboardKey key);
void controls_set_mouse_button(Controls* controls, MouseControlType action, MouseButton button);
Controls* controls_init();
#ifdef CONTROLS_IMPLEMENTATION
Controls* controls_init(){
Controls* c = malloc(sizeof(Controls));
if (!c) {
exit(-1);
}
c->keyboard.keys[CONTROLS_UP] = KEY_W;
c->keyboard.keys[CONTROLS_UP_ALT] = KEY_UP;
c->keyboard.keys[CONTROLS_DOWN] = KEY_S;
c->keyboard.keys[CONTROLS_DOWN_ALT] = KEY_DOWN;
c->keyboard.keys[CONTROLS_LEFT] = KEY_A;
c->keyboard.keys[CONTROLS_LEFT_ALT] = KEY_LEFT;
c->keyboard.keys[CONTROLS_RIGHT] = KEY_D;
c->keyboard.keys[CONTROLS_RIGHT_ALT] = KEY_RIGHT;
c->keyboard.keys[CONTROLS_ACTION_ALT] = KEY_Z;
c->keyboard.keys[CONTROLS_SPECIAL_ALT] = KEY_X;
c->keyboard.keys[CONTROLS_ENTER] = KEY_ENTER;
c->mouse.buttons[CONTROLS_ACTION] = MOUSE_BUTTON_LEFT;
c->mouse.buttons[CONTROLS_SPECIAL] = MOUSE_BUTTON_RIGHT;
return c;
}
void controls_set_key(Controls* controls, KeyboardControlType action, KeyboardKey key){
for (int k = 0; k < CONTROLS_KCOUNT; k++) {
if (controls->keyboard.keys[k] == key) {
controls->keyboard.keys[k] = KEY_NULL;
break;
}
}
controls->keyboard.keys[action] = key;
}
void controls_set_mouse_button(Controls* controls, MouseControlType action, MouseButton button){
for (int m = 0; m < CONTROLS_MCOUNT; m++) {
if (controls->mouse.buttons[m] == button) {
controls->mouse.buttons[m] = controls->mouse.buttons[action];
}
controls->mouse.buttons[action] = button;
}
}
#endif
The guy who mogs you in Rust and C, C++, Python, Java, Lua, and Html
its doll's alt
Yes. Hello, lil buddyits doll's alt
Actually you're right I don't shill C because shilling programming languages is autistic but I moved back to C from Rust because of Rusreal womaneryi've never seen C shills who use C
->View attachment 82932C:#pragma once #include <stdlib.h> #include "raylib.h" typedef enum { CONTROLS_UP, CONTROLS_UP_ALT, CONTROLS_DOWN, CONTROLS_DOWN_ALT, CONTROLS_LEFT, CONTROLS_LEFT_ALT, CONTROLS_RIGHT, CONTROLS_RIGHT_ALT, CONTROLS_ACTION_ALT, CONTROLS_SPECIAL_ALT, CONTROLS_UTILITY, CONTROLS_ENTER, CONTROLS_KCOUNT } KeyboardControlType; typedef enum { CONTROLS_ACTION, CONTROLS_SPECIAL, CONTROLS_MCOUNT } MouseControlType; #define KEYBOARD_CONTROL_COUNT CONTROLS_KCOUNT #define MOUSE_CONTROL_COUNT CONTROLS_MCOUNT typedef struct { KeyboardKey keys[KEYBOARD_CONTROL_COUNT]; } KeyboardControls; typedef struct { KeyboardKey buttons[MOUSE_CONTROL_COUNT]; } MouseControls; typedef struct { KeyboardControls keyboard; MouseControls mouse; } Controls; void controls_set_key(Controls* controls, KeyboardControlType action, KeyboardKey key); void controls_set_mouse_button(Controls* controls, MouseControlType action, MouseButton button); Controls* controls_init(); #ifdef CONTROLS_IMPLEMENTATION Controls* controls_init(){ Controls* c = malloc(sizeof(Controls)); if (!c) { exit(-1); } c->keyboard.keys[CONTROLS_UP] = KEY_W; c->keyboard.keys[CONTROLS_UP_ALT] = KEY_UP; c->keyboard.keys[CONTROLS_DOWN] = KEY_S; c->keyboard.keys[CONTROLS_DOWN_ALT] = KEY_DOWN; c->keyboard.keys[CONTROLS_LEFT] = KEY_A; c->keyboard.keys[CONTROLS_LEFT_ALT] = KEY_LEFT; c->keyboard.keys[CONTROLS_RIGHT] = KEY_D; c->keyboard.keys[CONTROLS_RIGHT_ALT] = KEY_RIGHT; c->keyboard.keys[CONTROLS_ACTION_ALT] = KEY_Z; c->keyboard.keys[CONTROLS_SPECIAL_ALT] = KEY_X; c->keyboard.keys[CONTROLS_ENTER] = KEY_ENTER; c->mouse.buttons[CONTROLS_ACTION] = MOUSE_BUTTON_LEFT; c->mouse.buttons[CONTROLS_SPECIAL] = MOUSE_BUTTON_RIGHT; return c; } void controls_set_key(Controls* controls, KeyboardControlType action, KeyboardKey key){ for (int k = 0; k < CONTROLS_KCOUNT; k++) { if (controls->keyboard.keys[k] == key) { controls->keyboard.keys[k] = KEY_NULL; break; } } controls->keyboard.keys[action] = key; } void controls_set_mouse_button(Controls* controls, MouseControlType action, MouseButton button){ for (int m = 0; m < CONTROLS_MCOUNT; m++) { if (controls->mouse.buttons[m] == button) { controls->mouse.buttons[m] = controls->mouse.buttons[action]; } controls->mouse.buttons[action] = button; } } #endif
Mindbroken by the dereferenced member symbol
Most unreadable code awardphp wonned (I have no idea what I am looking at (it's my code))
View attachment 82937
the colors are prettyMost unreadable code award