Random line of code thread
category: code [glöplog]
Quote:
Code:move.w #300,d0 .lp nop dbra d0,.lp
for those that know what a piece of s**t this is...
CPU dependent DMA wait loop in a certain Sound-/Noise-/Protracker replayer is what it looks like.
Code:
moveq #5-1,d0
.loop move.b $dff006,d1
.wait cmp.b $dff006,d1
beq.b .wait
dbf d0,.loop
Quote:
Quote:Code:move.w #300,d0 .lp nop dbra d0,.lp
for those that know what a piece of s**t this is...
CPU dependent DMA wait loop in a certain Sound-/Noise-/Protracker replayer is what it looks like.
Code:moveq #5-1,d0 .loop move.b $dff006,d1 .wait cmp.b $dff006,d1 beq.b .wait dbf d0,.loop
That's at least what mine look like now!
Code:
xLINER mainobjectdata(i, mainobject(i).locationptr) + (mainobjectdata(i, mainobject(i).scaleptr)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4)) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3)) * baseobjvdata(baseobjldata(iii, 0), 0))), mainobjectdata(i, mainobject(i).locationptr + 1) + (mainobjectdata(i, mainobject(i).scaleptr + 1)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 1) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 1) * baseobjvdata(baseobjldata(iii, 0), 1))), mainobjectdata(i, mainobject(i).locationptr + 2) + (mainobjectdata(i, mainobject(i).scaleptr + 2)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 2) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 2) * baseobjvdata(baseobjldata(iii, 0), 2))), mainobjectdata(i, mainobject(i).locationptr) + (mainobjectdata(i, mainobject(i).scaleptr)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4)) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3)) * baseobjvdata(baseobjldata(iii, 1), 0))), mainobjectdata(i, mainobject(i).locationptr + 1) + (mainobjectdata(i, mainobject(i).scaleptr + 1)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 1) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 1) * baseobjvdata(baseobjldata(iii, 1), 1))), mainobjectdata(i, mainobject(i).locationptr + 2) + (mainobjectdata(i, mainobject(i).scaleptr + 2)) * (mainobjectdata(i, mainobject(i).olocationptr + ((ii - 1) * 4) + 2) + (mainobjectdata(i, mainobject(i).oscaleptr + ((ii - 1) * 3) + 2) * baseobjvdata(baseobjldata(iii, 1), 2)))
hooray, basic doesn't allow multiline splitting!
it's from this demo, sikakreisi. here's a little bit of a background writeup.
appas: Yes it does. Underscore at end of line lets you continue in the next line. ;)
Code:
// Ugly hack but hey, it works...
Code:
mov cl,36
from "FDPLANES.H" (class header):
means "did changed anything here - REBUILD MAIN.CPP!!1"
someone should add this file to makefile' dependency list :D
Code:
// когда что-то тут поменял - ПЕРЕСОБЕРИ MAIN.CPP!!1
means "did changed anything here - REBUILD MAIN.CPP!!1"
someone should add this file to makefile' dependency list :D
Quote:
nop ; sound on channel1
Code:
nop ;256
Code:
ff *= r(uv,t) + r(uv,t+.01) + r(uv,t-.4)*.5;
"Looks like shite :[", "I know, let's do layers :D", "..again?", "yes :D"
Code:
dc.b "you must be a wanker because i got paid to do this"
Code:
dc.b "if you can read this why cant you write it"
Code:
dc.b "why dont you fuck off and die"
Found while patching the game Alcatraz.
jsr Wait_Recal
Most people don't know this, but the quality of a demo is actually measured by the length of singular lines of code. Here's some choice examples of our latest DOS demo done in a hurry to the nth degree.
Quote:
char effu = (sintab[(time>>8+x+156+y) % 255]*y-sintab2[((x+time>>1)+time>>1) % 255]) | x+1+y+1;
if (fb_buffer[(sy+(yy-y))*300+(sx+(xx-x))] != 0 && xx < 310 && yy < 200 && xx > 9 && yy > 0) VGASCRCOPY[yyy+xx] = fb_buffer[(sy+(yy-y))*300+(sx+(xx-x))];
if (scry >= 130) { scry = 130; seanext = 1; skyreveal = 0; seastart = effutime; memset(VGASCRCOPY,0,64000); XMS_CopyFromXMS(kuvapaletti, XMSHandleSkyPal, 0, 768); setpal(kuvapaletti); }
max sdk
Code:
/*! \remarks Returns the decay state of the light.
\return This boolean works as an integer where <b>0</b> is None, <b>1</b>
is Inverse and <b>2</b> is Inverse Square.
\par Default Implementation:
<b>{return 0;}</b> */
virtual BOOL GetDecayType() {return 0;}
Code:
Get #1,,blockId
Get #1,,link
If link > 0 Then
crap=Space(link)
Get #1,,crap
End If
If blockId = !"title\26" Then vcsTitle=crap
If blockId = !"vCopy\26" Then vcsCopyright=crap
It's all about crap.
Code:
bhi.w .fettich ; wenn ja, raus!
Code:
incept: les bx,[word bx+incept-2] ; ES = (0xA000 - 3 lines) = 0x9FC4 (aligned)
; no matter what the location of this instruction
; move around to get reuseable values in byte 3/4
Code:
mov [fs:bp+si], bl
Code:
assign s2_clk = debug_clock;
assign s2_rst = rst1;
assign s2_cyc_i = {m0_adr_o,2'b00} == 32'hF7000000 ? m0_cyc_o : 1'b0;
assign s2_stb_i = m0_stb_o;
assign s2_we_i = m0_we_o;
assign s2_dat_i = m0_dat_o;
assign s2_sel_i = m0_sel_o;
assign s2_err_o = 1'b0;
assign s2_rty_o = 1'b0;
wb_uart uart0 (
.CLK_I (s2_clk),
.RST_I (s2_rst),
.CYC_I (s2_cyc_i),
.STB_I (s2_stb_i),
.SEL_I (s2_sel_i),
.WE_I (s2_we_i),
.DAT_I (s2_dat_i),
.ACK_O (s2_ack_o),
.DAT_O (s2_dat_o),
.RX_I (UART_RX),
.TX_O (UART_TX),
.ISR_O()
);
Code:
****************************************************
* $VER: intro 1.007 (08 Aug 1998)
*
*
* $HISTORY:
*
* 08 Aug 1998 : 001.007 : scheisse
* 08 Aug 1998 : 001.006 : auf party
* 06 Aug 1998 : 001.005 : shit morgen gehts los und noch nicht weiter ;(
* 02 Aug 1998 : 001.004 : explosion funzt
* 02 Aug 1998 : 001.003 : explosion angefangen
* 26 Jul 1998 : 001.002 : naechster tag
* 25 Jul 1998 : 001.001 : anfang
*
****************************************************
Code:
if (gamescom2016)
Oh no... I know the feeling :D
Code:
//*** MACRO: SEARCH TILE NUMBER
// Used in: Problem reading from command line, RuleC0, RuleC1
#define SearchTileNumber(TableValues,TableTiles,TablePossibilities,x,y,s,t,TileFound) \
t=0; \
TileFound=FALSE; \
while((t<NbTiles) && (TileFound==FALSE)) { \
TileFound=TRUE; \
s=0; \
while((s<NbSymbols) && (TileFound==TRUE)) { \
if(Tile[t][s]!=TableValues[x][y][s]) { \
TileFound=FALSE; \
} \
s++; \
} \
if(TileFound==TRUE) { \
TableTiles[x][y]=t; \
TablePossibilities[x][y]=1<<t; \
TileAlreadyPlaced[t]=TRUE; \
RuleP0_void(); \
} \
t++; \
}
Code:
bfset d0{22:8} ; d0=1024-1
G0 Z#1
M5
G17
G0 X0 Y0
M30
M5
G17
G0 X0 Y0
M30