Dark Bit Factory & Gravity

PROGRAMMING => C / C++ /C# => Topic started by: Optimus on July 23, 2008

Title: DevC - TinyPTC (urgent help needed)
Post by: Optimus on July 23, 2008

I am preparing an intro from Euskal. Actually it was a demo that I try to crunch into 64k and it happens but at 99,9% I got a problem that could cancel everything I have done so far :(

1) Urgent need of TinyPTC compiled for gcc/DevC/windows. I can't find this! I found one tptc lib that relsoft provided, but when I finish and finally crunch under 64k and all my adventures are finished,.... arghhh IT DOESN'T GO FULLSCREEN, because the provided lib is only the GDI version of TPTC and there is no DDRAW or other version that can go fullscreen there, also I don't have time to see how can I compile TPTC for DevC. I want something fast and easy because my whole 64kb attempt will blow in the air just because NO_FULLSCREEN (and I got through adventures to squize, manage minifmod, find exe packers, etc... to be blown away because NO_FULLSCREEN. I have tried #define fullscreen thing on tinyptc.h but it doesn't work because GDI only)

PLEAZ. Someone must have done a fullscreen TPTC project in DevC++ windows in the past. Someone might have the lib and a files and the main h or source code it needs. Or a link where they are provided! Or a Devpak for tptc anywhere?

2) I did the attempt to port my project on Visual Studio 2008 with the good TPTC. And I get the most WTF error ever. Where I have int i; or for (int i=0; i<... etc etc, it tells me he can't find the int type. (WHAT?). In the original TPTC project you have to place the ints outside globally, like static int i; and only this way it works. But no time to place all the variables out of my project as static. That would be stupid. Why does this happen? Is it because tptc does something?

3) Of course if you have something for 1 I don't need to go to 2. The project is 99,9% ready, I just need to get the proper tptc files for devc and pray. Pitty to not release this as intro because it mostly fits as intro.

If you know something..
Title: Re: DevC - TinyPTC (urgent help needed)
Post by: hellfire on July 23, 2008
1. You take the source (http://sourceforge.net/project/showfiles.php?group_id=5722&package_id=84475) and compile/include the version you need.
Set the according #define in tinyptc.h
- Alternative: Use Pixel-Toaster (http://www.pixeltoaster.com).
2. You rename your source-file from .c to .cpp?

Good luck.
Title: Re: DevC - TinyPTC (urgent help needed)
Post by: Optimus on July 23, 2008
I might try this, I hope it's easy and doesn't ask me for more stuff I can't understand (do I need to do the mmx.asm compile too or maybe there is also a pure C ddraw version?)

Is Pixel-Toaster for tiny executables or does it want a DLL?
Title: Re: DevC - TinyPTC (urgent help needed)
Post by: hellfire on July 23, 2008
As you can see in "convert.c", the mmx-versions from "mmx.asm" are used when "#define __PTC_MMX__
" from tinyptc.h is set.
You can compile it manually using nasm (http://sourceforge.net/project/showfiles.php?group_id=6208&package_id=47034):
Code: [Select]
nasm -o mmx.obj -f win32 mmx.asm
Title: Re: DevC - TinyPTC (urgent help needed)
Post by: Rbz on July 23, 2008
@Optimus: check out this example of using tinyptc_ext with dev-cpp, it is small as the original tinyptc.

If you like I can post original tptc dev-cpp fullscreen project when I get back to home...
Title: Re: DevC - TinyPTC (urgent help needed)
Post by: Optimus on July 24, 2008
Ok, my demo is ready to ship. Relsoft gave me instruction how to connect the tptc in devc.