Random line of code thread
category: code [glöplog]
Code:
std::vector<std::vector<std::pair<glm::vec3, glm::vec4>>> m_points;
ugh...
Code:
0 ::::?( (-.)><(.*.)><(-.) )"""="j;:
As random as it gets, I suppose... (let's call it "basic truth" ;)
Code:
move.l #((WID+512+18)<<16)|(7+10),(sc_RastPort+rp_cp_x,a4)
Code:
this_cat = prcl_divided[(prcl_divided > lowercatvalue) & (prcl_divided <= highercatvalue)]
Not the feline variant, I'm afraid.
Code:
if r < 4 then print "Wow! That was quick!" end
A first quick micro game in Lua. (you could run this f.e. here)
Code:
readelf -WS "$1"|sed 's/\[ \([0-9]\)\]/[\1]/'|awk '$2 ~ "^.text"{print $6;}'|python -c 'print(sum(map(lambda s: int(s.strip(),16),__import__("sys").stdin.readlines())))'
Code:
move.l @u0v0,@uv_temp
add.w @uv_temp,@v_left ; (v_left + u0)
swap @uv_temp
add.w @uv_temp,@u_left ; (u_left + u0)
move.l @u1v1,@uv_temp
sub.w @uv_temp,@v_left ; (v_left + u0) - v1
swap @uv_temp
sub.w @uv_temp,@u_left ; (u_left + u0) - u1
neg.w @u_left
neg.w @v_left
ext.l @u_left
ext.l @v_left
divs.w @len,@u_left ; dudx = u_left / len
divs.w @len,@v_left ; dvdx = v_left / len
@kill uv_temp
@rename u_left dudx
@rename v_left dvdx
ext.l @dudx
ext.l @dvdx
add.l @dvdx,@dvdx ; ...
asl.l #8,@dvdx ; dvdx << 9
Part of a texture mapper written in https://github.com/deplinenoise/deluxe68 and used for the cube in Eon
Code:
//try to copy the piece
CorrectlyPut=TRUE;
yy=0;
while((CorrectlyPut==TRUE) && (yy<PieceH)) {
xx=0;
if((yy&1)==1) { DeltaX=DeltaShift; } else { DeltaX=0; }
while((CorrectlyPut==TRUE) && (xx<PieceW)) {
t=AllPieces[PieceIndex][2+Orientation*(MaxSizeForThisPiece+3)+3+yy*PieceW+xx];
if(t!=-1) {
if(RecursiveSpaces[(PieceIndex+1)*PuzzleSize+(yy+y)*PuzzleWidth+xx+x+DeltaX]==-1) {
RecursiveSpaces[(PieceIndex+1)*PuzzleSize+(yy+y)*PuzzleWidth+xx+x+DeltaX]=t;
} else {
CorrectlyPut=FALSE;
}
}
xx++;
} //next xx
yy++;
} //next yy
Part of an hexagonal pieces packing routine...
Code:
clr.w -(sp)
trap #1
used in glokzilla
Code:
.SCREEN = $416+6 ; RNC Loader -> screen memory
Code:
$(CC) $(CPPFLAGS) -MM "$<" | sed -e 's#^\(.*\)\.o:\(.*\)$$#obj/$(notdir $<).o obj/\1.d: \2 obj/\nifeq ($$(compile$(suffix $<)),)\n$$(error "No rule to make a $(suffix $<) file!")\nendif\n\t$$(call compile$(suffix $<),$$@,$$<)#' > "$@"
Makefiles. Not even once.
Code:
RELEASE_FLAGS = -oabhii+klmnrt -s -d0 -dNDEBUG
str=str"_COLORS("lc")="trim(line)||d2c(10)
Code:
; mm3/7 are free
movq mm3, [ebx + 48] ; 1
paddd mm2, mm1
movq mm7, [ebx + 56] ; 1
pmaddwd mm3, mm6
pmaddwd mm7, [edx - 8] ; 2
paddd mm5, mm4
; load next dct shit
movq mm4, [edx] ; 1
movq mm1, mm2
; mm0 - intermediate result
; mm1 - mm2 - sum for ch0
; mm3/7 in pipeline
; mm4 - dct shit
; mm5 - partial ch1 acc
; mm6 - load dct coef
movq mm6, [edx + 16] ; 1
paddd mm3, mm5
movq mm5, [edx + 8] ; 1
paddd mm3, mm7
TI-BASIC:
Python:
Code:
While Ans≠31447:Do
Python:
Code:
requestFinal = stupidFuckingPacketHeader+requestBody+requestFooter
Code:
bool wifi_softap_set_dhcps_lease(struct dhcps_lease *please)
Code:
pea .TAB(pc,d2.w)
Code:
cs:xlat
Code:
release_date_date=release.release_date_date,
Code:
val asset: Any? = null,
val library_effects: Any? = null,
val library_materials: Any? = null,
val library_geometries: Any? = null,
etc etc etc
it works, but afterwards cherrypicking thru the nested linked hashmaps that the xml parser blurts out aint worth the laziness :D
Code:
addq.w #$001+1,d2 ; +1 to avoid branch
Code:
sex
sex
Code:
if((Occurences4[PieceIndex]==0) && (Occurences1[PieceIndex]!=FullOccurence) && (Occurences2[PieceIndex]!=FullOccurence) && (Occurences3[PieceIndex]!=FullOccurence)) {
Code:
26941 ccccgccccg ggcccgcccc cgggcccgcc ccgaccacgc cccggccccg gccccggccc