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
; AutoExp.Dat - templates for automatically expanding data | |
; Copyright(c) Microsoft Corporation. All Rights Reserved. | |
;--------------------------------------------------------------- | |
; | |
; While debugging, Data Tips and items in the Watch and Variable | |
; windows are automatically expanded to show their most important | |
; elements. The expansion follows the format given by the rules | |
; in this file. You can add rules for your types or change the | |
; predefined rules. | |
; |
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 <SFML/Graphics.hpp> | |
#include "Ball.hpp" | |
Ball::Ball(int x, int y) : Entity(x, y, 10, 10, 4) {} | |
void Ball::checkCollision(int x, int y) { | |
; | |
} |
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 <chrono> | |
#include <ctime> | |
#include <cstdlib> | |
#include <iomanip> | |
#include <iostream> | |
#include <random> | |
struct AABB{int32_t left, top, right, bottom;}; | |
extern "C" bool check_aabb(AABB *a, AABB *b); | |
extern "C" bool check_aabb_conventional(AABB *a, AABB *b); |
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
section .data | |
fmt: db "%#06x", 0xA, 0x0 | |
align 16 | |
aabb1: | |
.left: dd 1 | |
.top: dd 1 | |
.right: dd 1 | |
.bottom: dd 1 | |
align 16 | |
aabb2: |
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
std::chrono::high_resolution_clock::time_point start, end, timetoprint; | |
timetoprint = start = end = std::chrono::high_resolution_clock::now(); | |
long long frame_count=0; | |
long double frametime_total=0.f; | |
while(!glfwWindowShouldClose(win)) { | |
end = std::chrono::high_resolution_clock::now(); | |
long int frametime_us = (std::chrono::duration_cast<std::chrono::microseconds>(end-start).count()); | |
float frametime_s = ft/1e6f; |
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
Clock gameClock; | |
while gameIsRunning: | |
frameTime = gameClock.restart() | |
process_input() | |
update_physics(frameTime) | |
update_graphics(frameTime) |
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
char*c="code",*z="input",d['u0']={0}; | |
main(r,i,k){char*p=d;int s['~']={k=r=0},*l=s;while(i=c[r++])k?i==91?++k:i==93?k?--k:--k:0:(i==93?*p?r=*l:l--:i==91?*p?*++l=r:++k:0,p+=i==62,p-=i==60,i==46?putchar(*p):0,*p-=i==45,i==44?*p=*z++:0,*p+=i==43);} |
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
Program received signal SIGSEGV, Segmentation fault. | |
0x000000000041dab8 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x8c630000000008, __in_chrg=<optimized out>) | |
at /usr/include/c++/4.9.1/bits/shared_ptr_base.h:665 | |
665 if (_M_pi != nullptr) | |
(gdb) bt | |
#0 0x000000000041dab8 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x8c630000000008, __in_chrg=<optimized out>) | |
at /usr/include/c++/4.9.1/bits/shared_ptr_base.h:665 | |
#1 0x000000000041d57a in std::__shared_ptr<wind::Entity, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x8c630000000000, __in_chrg=<optimized out>) | |
at /usr/include/c++/4.9.1/bits/shared_ptr_base.h:914 | |
#2 0x000000000041d594 in std::shared_ptr<wind::Entity>::~shared_ptr (this=0x8c630000000000, __in_chrg=<optimized out>) |
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
/* | |
g++ | |
std::pow: Times (min, max, avg): 27635604us, 28006757us, 27696884us | |
expanded: Times (min, max, avg): 1318329us, 1409901us, 1335821us | |
jplatte's... thing: Times (min, max, avg): 7105522us, 7219386us, 7135305us | |
g++ -O3 | |
std::pow: Times (min, max, avg): 25542284us, 26192220us, 25633656us | |
expanded: Times (min, max, avg): 0us, 0us, 0us |
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 <chrono> | |
#include <iostream> | |
#include <fea/util/noise.hpp> | |
int main() | |
{ | |
fea::Noise noise; | |
uint64_t min(-1), max(0), avg(0); | |
int steps = 10; |
NewerOlder