Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Clyde

Pages: [1] 2 3 4 5 6 7 8 ... 164
1
What I found quite useful is when using headers is to use a header guard, as often I would get compile errors saying that variables and functions had already been declared.
All you need do is surround your code with:
Code: [Select]
#ifndef _NAME_OF_HEADER_H_
#define _NAME_OF_HEADER_H_

#endif

btw, the _H_ is optional.

hope it helps.
-Clyde.

2
I don't know if any of the yabasic versions did this, but how about being able to play music / sound effects?

btw, the rafryer/fastz.txt demo doesn't run.

3
Cool!! 8)

4
A mighty welcome, and wow!!

welldone!! :)

5
Well Done to all participants + the winner!!

maybe an idea to consider, is posting about the comps over on pouet net, there's a news thing called bitBot.

6
General chat / Re: The Welcoming Committee
« on: November 11, 2014 »
Hello There Silverhawk!! \o/

7
C / C++ /C# / Re: [c++] Bug In 3d
« on: November 09, 2014 »
That looks really great Dude!! And thanks for the response :)

I haven't tried that out yet, as I can see I'm going to have to rewrite part of this. The fiddling around with using and not using ceilf hasn't quite cured it. I thought I had for a second, but with a texture on the cube it was only disguising the bug. It is a bit of a shame it's misbehaving.

With your guides above,  the delta parts will replace the stuff under the top, mid, bottom sorting? And then the deltaz, deltau etc in a new scanline?

Thanks again for all of your help!!! *

8
Freebasic / Re: FreeBasic Version 1.00.0 released
« on: November 07, 2014 »
It's great that it's still being looked after and being developed on and reached version 1.0

A lot of my stuff crashes with it though. It's something to do with the change to array sizes.

And I've got no clue on how find and to make the updated libraries work; things like caca and bass.
TinyPtc ext still works though. :)

9
Really Great :)

10
I've played Dynablaster Revenge, and it's truly awesome!!!
And Kirl, looks fab :)

11
C / C++ /C# / Re: [c++] Bug In 3d
« on: November 06, 2014 »
Thank You so much for all the pointers!!

Time to try this out :D

edit - Have made a new version of draw_triangle, and it's a heck of a lot better now. :)
I wanted to check if I've implemented and put the ceilf(s) in the right places, or even the right function.

In the scanline function at the moment, rather that casting a float to an integer; I've used: (int)ceilf(float_variable);

Thanks again!! :D

-Clyde.

12
C / C++ /C# / Re: [c++] Pointers And Classes
« on: November 06, 2014 »
is this the same for glFloats ?

13
C / C++ /C# / Re: [c++] Bug In 3d
« on: November 05, 2014 »
Thanks heaps for taking a look and for your time, it's great.

I thought I was interpolating the z values of the triangle in the scanline routine. I must of missed that when converting.

Which bits are missing sub pixel accuracy? The draw triangle and / or scanline stuff.  I did have leftx - 0.05f, and rightx + 0.05f,
and the float to ints as +0.05f. but that made things worse when I did that.

And I'm not really sure if to round them up ( +0.05f ) or down ( -0.05f ) or even if to use higher values; as suggested by LittleWhite.
There was a precision function that I found on the net, that I included in global - maths.

Huge thanks,
Clyde.

14
C / C++ /C# / Re: [c++] Bug In 3d
« on: November 03, 2014 »
Thanks for your time and taking a look.

It didn't recompile? That's interesting.

The stuff to do with the tinyptc equivalent that Jim kindly knocked up, are: the the header and cpp file for tinyptc_ext and the cpp for tinyptcd3d

15
C / C++ /C# / Re: [c++] Bug In 3d
« on: November 03, 2014 »
Thanks for testing and the reply much appreciated, but it's still there. My machine is also 64 bit.

I did think maybe that tinyptcd3d might have something to do with it. but I don't think so.

This rounding / precision issue if all very new to me; especially in CPP as my early stuff was done in basic languages,
which I've not really had to worry about what floats get upto behind the scenes. So any help is greatly appreciated!
And I don't know what or how to do an epsilon test.

The only sort of rounding with floats to ints, i've done are the usual int_value=(float)( flt_value+0.05f);
I did try with a smaller values like 0.0005f, with the left and right x position in the scanline function but that didn't cure it.

Cheers! :)

16
C / C++ /C# / [c++] Bug In 3d
« on: November 01, 2014 »
Hi,

I've converted a 3d thang ive been working on over from freebasic to cpp.

There's a weird drawing bug with the triangles at certain points as it rotates.

I'm scratching my brain cell as to how to fix it.  In basic, it works a charm.

So it got me thinking that it's to do with how floats are dealt with and rounding issues.
Should it be up or down, or even involve precision?  And which bits, the scanline and / or draw triangle bits;  there's some stuff in global - maths, that might be of use.

Thanks for your help and being a super star,
Clyde.

17
C / C++ /C# / Re: [c++] Pointers And Classes
« on: October 27, 2014 »
thanks LittleWhite :)

it's funny that when you make a standard class without being pointers, screen_buffer.graphics("title",640,480); seems to have no quarrels,
but as soon as you start using and returning pointers, c seems to have dementia.

I put static infront of any functions that make and return a new gfx_buffer; and seems to be doing the trick. :)
And then when creating any of them screen_buffer::gfx_buffer=graphics();

another funny thing i ran into when debugging, is that most of my variables that are floats get rounded, for instance: float value=0.08f get turned into 0.079f
and some are incredibly big with e's in them, -2.3753892e-005f. I also need to round to the nearest integer when I'm drawing. int x=(int)float_x;

Next question, is there a tidier looking way to rephrase for example image::gfx_buffer=create_gfx_buffer();
is there something you can do with namespace to get rid of the double colons and the class name part, ::name_of_class= ?

Cheers!! :)




18
C / C++ /C# / [c++] Pointers And Classes
« on: October 24, 2014 »
Hi,


I'm trying to use pointers with classes, but not alot of luck. I remember mentioned sometime ago about making them static, but not really sure on that.


The errors I'm graced with are:


cx0030: Error: expression cannot be evaluated


and then for every element / variables in that particular class, there are loads of question mark, eg. wwidth=??????, height=??????


Hugest of thanks for your time and any help.
Clyde.

19
General chat / Re: The Welcoming Committee
« on: October 24, 2014 »
Salutes to all the new people I've missed!!

20
Purebasic / Re: Patcher Interface
« on: October 24, 2014 »
Hi Inc, and a warm welcome to the site. :)

When I try to run the "Amped" demo on Windows 7 64-bit, I get 2 x "error CreateEff....", and it goes into the demo but has trouble clearing.
Also when I get my act together - life has been really hectic lately. I might ask you for some graphics.

Keep up the good work :)

Pages: [1] 2 3 4 5 6 7 8 ... 164