pouët.net

Random line of code thread

category: code [glöplog]
Code:or rax, rax
added on the 2019-04-02 18:45:00 by porocyon porocyon
Code:next_freq += (beat_frequency/*cents -100..100*/ / powf(2.0f, (next_freq - 60.0f/*center = c-5*/) / 12.0f/*octave*/)) * 0.01f; // Moog Sub37 style note independent beat frequency, next_freq is a linear floating point note number (0..127)
added on the 2019-04-03 22:08:31 by bsp bsp
Code:inc $d027 -> nop nop nop


from this new gist about a 2k game I looked a bit into.
added on the 2019-04-04 12:22:15 by tomaes tomaes
Code:cmp.l #SCREEN+40*200*2+(40*180),a1 ; remove for final release
added on the 2019-04-04 12:43:35 by StingRay StingRay
Code:movem.w (a3,d4.w*8),d0-d3 ;x,y,z,g
added on the 2019-04-04 13:00:44 by ham ham
Code: dc.l $01fe01fe,$01fe01fe ; line 16 (laserline)
added on the 2019-04-08 10:21:19 by StingRay StingRay
Code:fisubr word [bp+2 + C_radius]
added on the 2019-04-08 13:59:23 by Blueberry Blueberry
Code:public void atThisPointIMightAsWellSeeIfAddingAMethodThatDoesAbsolutelyNothingWillFixThis() {
added on the 2019-04-08 14:46:42 by jobe jobe
LDA #$01 ;idk what is this
added on the 2019-04-08 15:56:43 by pitapoto pitapoto
Quote:
LDA #$01 ;idk what is this


it puts "1" into the accumulator.
added on the 2019-04-08 18:40:38 by lynn lynn
Code:void init() { // ... load_assets(); audio_yield(); //hack load_more_assets(); // ... }


Because the ARM7 somehow throws up and locks when it doesn't get MP3 data in time, because FIFOs lock up because interrupts etc... *sigh*
added on the 2019-04-09 02:52:33 by porocyon porocyon
Code:if cheat.er then
added on the 2019-04-10 22:38:07 by DevEd DevEd
Code:cmp di, sp
added on the 2019-04-12 22:49:54 by Blueberry Blueberry
Code:move.b CRD_ST_SETCOL,CRD_DS_STATE+3*CRD_DS_SIZEOF(a0)
added on the 2019-04-15 22:44:44 by StingRay StingRay
Code:move.l d1,$707C(a5)
added on the 2019-04-16 11:48:12 by ham ham
Code:if menu.item==0 then cy=math.ceil(lerp(cy,44+(menu.item*16),0.5)) -- HACK else cy=math.ceil(lerp(cy,45+(menu.item*16),0.5)) end


Without this hack, the cursor is drawn one pixel too low when the first item is highlighted, because the way TIC-80 converts floating points to ints is bullshit :D
added on the 2019-04-16 16:40:43 by DevEd DevEd
Code:r,ba,bb,fy,fz,iz,ja=0,c.ba,0,57,1,0xffff,45-iy+c.el
added on the 2019-04-16 17:39:57 by jobe jobe
Code:for (int y = 0; y < h; ++y) for (int x = 0; x < w; ++x, ++vram) *vram = /* hmmm */;
added on the 2019-04-16 18:24:16 by porocyon porocyon
deque<Hengst> temp;
Code:love.graphics.draw(bgTex, -(bgTex:getWidth() / 2), -(bgTex:getHeight() / 2))
added on the 2019-04-17 13:48:20 by lynn lynn
Code:eps *= 1.0+chkud/150000.0; //varies marching step length
added on the 2019-04-17 14:02:53 by pitapoto pitapoto
Code:glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), 0);
added on the 2019-04-17 15:42:57 by Xyl2k Xyl2k
Code: sample = f_b0 * w0 + f_b1 * f_w1 + f_b2 * f_w2;
added on the 2019-04-18 18:19:41 by KeyJ KeyJ
Code:timeline[curpart = startm = startv = 0].part->init();
added on the 2019-04-18 18:44:01 by porocyon porocyon
wait, this one's more fun:
Code:while (GFX_STATUS&(1<<27)) ; // PREVENT random lockups
added on the 2019-04-18 18:45:33 by porocyon porocyon

login