This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DroneComponent = class(nil, {}); | |
function DroneComponent:OnInit(parentComponent) | |
self.uptime = 0; | |
self.parentComponent = parentComponent; | |
entity = self.parentComponent:getParent(); | |
self.position = _G['caracal::ScriptUtil']:getPositionComponent(entity):getPosition(); | |
self.lightComponent = _G['caracal::ScriptUtil']:getLightComponent(entity); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AttackComponent::onEntityCollisionEvent(IEventPtr pEvent) { | |
std::shared_ptr<EntityCollisionEvent> pCastEvent = std::static_pointer_cast<EntityCollisionEvent>(pEvent); | |
// Don't care if we collide with our selves | |
const RigidBody* aRigidBody = pCastEvent->getRigidBodyA(); | |
if (aRigidBody->name == PROJECTILE_RIGID_BODY_NAME && aRigidBody->parent == mParent) { | |
// Play the hit animation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void GLRenderManager::render() { | |
GLSpriteBatch* batch; | |
std::list<GLSpriteBatch*>::iterator i; | |
// Sort batches by layer and upload to GPU | |
mActiveBatches.sort(sortByLayer()); | |
for (i = mActiveBatches.begin(); i != mActiveBatches.end(); ++i) { | |
batch = *i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 150 | |
#define BLUR_Y 0.004 | |
uniform sampler2D diffuseTexture; | |
uniform sampler2D lightsTexture; | |
uniform float time; | |
uniform vec2 resolution; | |
uniform float distortion; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
uint16_t *fb = (void*)0x6000000; | |
const int xsz = 240; | |
const int ysz = 160; | |
#define FRAME_SEL_BIT 0x10 | |
#define BG2_ENABLE 0x400 | |
int main(void) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binutils: | |
mkdir binutils-objdir | |
cd binutils-objdir | |
CFLAGS="-Wno-error=deprecated-declarations -Wno-error=unused-variable -Wno-error=unused-function" ../binutils-2.24/configure --target=arm-agb-elf --program-prefix=arm-agb-elf- | |
make | |
make install | |
Installing GCC: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All numeric values are in hexadecimal | |
# Use TAB or EQUAL sign to separate name from value | |
# | |
# Key configuration (all numbers are in hexadecimal!) | |
# | |
# Keys values are in the format YYYYXXXX where YYYY is the device number. | |
# 0 means keyboard and XXXX is the SDL define for the desired key | |
# (read SDL_keysym.h). | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 4 space tabs | |
(defun my-generate-tab-stops (&optional width max) | |
"Return a sequence suitable for `tab-stop-list'." | |
(let* ((max-column (or max 200)) | |
(tab-width (or width tab-width)) | |
(count (/ max-column tab-width))) | |
(number-sequence tab-width (* tab-width count) tab-width))) | |
(setq default-tab-width 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-to-list | |
'compilation-error-regexp-alist-alist | |
'(zig | |
"^\\(\\(.*\\):\\([0-9]+\\):\\([0-9]+\\)\\): \\(note:.*\\)?\\(error:.*\\)?$" | |
2 | |
3 | |
4 | |
(nil . 5) | |
1 | |
(5 compilation-info-face) |
OlderNewer