What's under your ctrl-v?

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

// Floors! (and ceilings)
// This is MEGA-SUPER-AWFUL-SLOW.

if (rFloors) {
if (s_Height<scrHeight) {

int pixlX;
int pixlY;
int floorTexture = 1;
int topOfScan=centreY+(s_Height>>1);
int p = r*screen->format->BytesPerPixel;
Uint8 *c = (Uint8*)screen->pixels+p;
Uint8 *f = (Uint8*)screen->pixels+(scrHeight-1)*screen->pitch+p;
int stepRow = screen->pitch;
int endY = scrHeight-topOfScan;
if (Slock(screen)) {
for (int y=0; y<=endY; ++y) {
double pixlDist = pixelDistTable[y+r*scrHeight];
double flrX = pixlDist*qSin(rayAngle)+playerX;
double flrY = pixlDist*qCos(rayAngle)+playerY;
int floorTexture = mapFloors[(int)flrX][(int)flrY];
int ceilingTexture = mapCeilings[(int)flrX][(int)flrY];
if (floorTexture>0 && floorTexture<64 && textures[floorTexture]!=NULL) {
pixlX = ((int)(flrX*128))%128;
pixlY = ((int)(flrY*128))%128;
*(Uint32*)f = *(Uint32*)((Uint8*)textures[floorTexture]->pixels+pixelLookup[pixlX][pixlY]);
}
if (ceilingTexture>0 && ceilingTexture<64 && textures[ceilingTexture]!=NULL) {
pixlX = ((int)(flrX*textures[ceilingTexture]->w))%textures[ceilingTexture]->w;
pixlY = ((int)(flrY*textures[ceilingTexture]->h))%textures[ceilingTexture]->h;
*(Uint32*)c = *(Uint32*)((Uint8*)textures[ceilingTexture]->pixels+pixelLookup[pixlX][pixlY]);

}
f-=stepRow;
c+=stepRow;
}
Sulock(screen);
}
}
}
Floor/ceiling mapper used in my raycaster. I was moving it to a new place in the code that should save some overdraw.

EDIT: Accursed forums! Eating my tabs and my HTML! :roll:
EDIT2: GARGH! Screwed the BBCode up too!
Spengo
Calc Master
Posts: 1116
Joined: Sat 15 Jan, 2005 3:56 am
Location: ooga booga land
Contact:

Post by Spengo »

Hey! That looks even better than Dr. Snipe! Also made with a basic fps engine.
|
\/
bananas... o.o
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

userlogin.tpl.php
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
Mortal-God
New Member
Posts: 60
Joined: Sun 19 Dec, 2004 10:20 pm
Location: here and there

Post by Mortal-God »

I owe UF money and they won't stop complaining about it. So I copied the site in a new browser so I could finally pay them and make stop all the whining.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Spengo wrote:Hey! That looks even better than Dr. Snipe! Also made with a basic fps engine.
|
\/
Hot damn! That rocks!
Spengo
Calc Master
Posts: 1116
Joined: Sat 15 Jan, 2005 3:56 am
Location: ooga booga land
Contact:

Post by Spengo »

Glad you liked it :D
I made some more games but there isn't space on my site for them :P
bananas... o.o
User avatar
Madskillz
Calc Wizard
Posts: 745
Joined: Fri 17 Dec, 2004 10:22 pm
Location: Wandering around in the Jungle...
Contact:

Post by Madskillz »

Sonichq.org

That is what mine has under it!
The Revolution is here...
Ajaxhunter
New Member
Posts: 20
Joined: Sat 18 Dec, 2004 12:37 am
Location: VA

Post by Ajaxhunter »

CD single

IM cut-and-paste
the_unknown_one
Calc Master
Posts: 1089
Joined: Fri 17 Dec, 2004 9:53 am

lol

Post by the_unknown_one »

*listening to Invisible Touch - Genesis*

:lol: Nice song :p
@Madskillz: Sonic rocks! :)
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

Post by leofox »

EDIT: i removed the numbers for privacy reasons, in case it's something important

some random letters and numbers crap. Weird-ish, i don't remember what it was for.
Image
Image
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

i would post it here, but it's a 40 pages long document for school... so... nah :roll:
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Leofox░is░teh░pwn
Yes I am reviving this topic :twisted: .[/quote]
Last edited by kalan_vod on Tue 18 Oct, 2005 12:05 am, edited 1 time in total.
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

A grasshopper jumps
And behind the sunrise, they
Do not see him fall.
Interesting... I *hope* I didn't write that...
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

I hate me!
I didn't write that...
lecks
Extreme Poster
Posts: 484
Joined: Fri 09 Sep, 2005 1:56 am

Post by lecks »

bedford introduction to drama 1st edition
thats whats been under my ctrl v all day. ive been searching for a book we've been using in class. stupid IB english teacher making us read about drama. i hear u can get the answers online... :roll:
Post Reply