Author Topic: My C++ code  (Read 7124 times)

0 Members and 1 Guest are viewing this topic.

Offline fog76

  • ZX 81
  • *
  • Posts: 8
  • Karma: 6
    • View Profile
My C++ code
« on: January 07, 2012 »
Hi guys,
in these days i'm putting online my C++ source code of oldschool demo effects. If you are interested, take a look at http://insolitdust.sourceforge.net/

I have not finished to upload my whole collection, but every day will put something.

 :hi:
Enzo.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: My C++ code
« Reply #1 on: January 07, 2012 »
Great stuff fog76, I'm sure that will prove really useful for a lot of people here. Thanks for sharing and have some good karma :)
raizor

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: My C++ code
« Reply #2 on: January 07, 2012 »
Hello fog76, here's some karma from me as well for your great first post!  :hi:
www.kirl.nl
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: My C++ code
« Reply #3 on: January 07, 2012 »
Cool deed :)  thank you very much!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline fog76

  • ZX 81
  • *
  • Posts: 8
  • Karma: 6
    • View Profile
Re: My C++ code
« Reply #4 on: January 08, 2012 »
Hello guys,
i'm glad you like my idea!! I am preparing new code, by tomorrow publish new routines!!!

Of course, suggestions and criticisms are welcome!  :||

 :clap: :clap:
Enzo.

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 267
  • Karma: 7
    • View Profile
Re: My C++ code
« Reply #5 on: January 08, 2012 »
Very nice. I've read other tuts and code around the place, this will definitely help if/when I want to learn C++. Thanks.

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: My C++ code
« Reply #6 on: January 08, 2012 »
Hi fog76,
I've had a quick look at your free-directional tunnel example.
Nice to see you're supporting linux!
It behaves a bit strange on my dual-screen setup though:
It uses the whole physical width of both screens (3840x1080) as fullscreen mode and puts a rather small image in the center so that the middle is on the border between the two screens.

And strictly speaking it's not a "free-directional" tunnel as you can only move and rotate along the z-axis.
This is usually called a move-table effect as it just moves the texture-coordinates along a precomputed table.
Free-directional would be something like this.
Challenge Trophies Won:

Offline fog76

  • ZX 81
  • *
  • Posts: 8
  • Karma: 6
    • View Profile
Re: My C++ code
« Reply #7 on: January 09, 2012 »
Hi fog76,
I've had a quick look at your free-directional tunnel example.
Nice to see you're supporting linux!
It behaves a bit strange on my dual-screen setup though:
It uses the whole physical width of both screens (3840x1080) as fullscreen mode and puts a rather small image in the center so that the middle is on the border between the two screens.

And strictly speaking it's not a "free-directional" tunnel as you can only move and rotate along the z-axis.
This is usually called a move-table effect as it just moves the texture-coordinates along a precomputed table.
Free-directional would be something like this.

You're right, I will correct the caption later today or tomorrow, however I also have code for a real "free-directional" tunnel... just convert the code (from old turbo pascal source  ;D) make it public!!

Unfortunately I do not have a dual monitor system for testing. Probably a resolution of 640x480 is not supported by the video card in fullscreen mode, please note that some LCD monitors (and video cards) do not support fullscreen mode less than 640x480, maybe your system requires at least 800x600. Try creating a simple SDL application that set full screen mode at 800x600 at 256 colors so you can see until everything is displayed correctly.

Fog76

Offline fog76

  • ZX 81
  • *
  • Posts: 8
  • Karma: 6
    • View Profile
Re: My C++ code
« Reply #8 on: January 24, 2012 »
Hi guys,
i just want to let you know that I added more effect on my pages.

Take a look here:http://insolitdust.sourceforge.net/code.html

Fog76.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: My C++ code
« Reply #9 on: January 24, 2012 »
Some more good stuff there fog76, thanks again for sharing this with everyone :)
raizor

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: My C++ code
« Reply #10 on: January 24, 2012 »
I tried to compile voxel-0.1-Linux.zip on Suse 11.4 (64bit) with GCC 4.5.
make says:
Quote
main.cc:1:0: error: CPU you selected does not support x86-64 instruction set

configure told me:
Code: [Select]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for VOXEL... yes
Challenge Trophies Won:

Offline fog76

  • ZX 81
  • *
  • Posts: 8
  • Karma: 6
    • View Profile
Re: My C++ code
« Reply #11 on: February 06, 2012 »
@ellfire

My code set g++ to use 586 instruction optimization, probably this is what prevents the compilation on x64 systems.

In folder "src" check the file Makefile.am and find "...CXXFLAGS=-i586" try to edit this line and delete this options, then restart the make.

Or you can create a new Anjuta project and recompile the source.

Bye,
Fog76.

P.s.
More effect added!!!  ;D ;D

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: My C++ code
« Reply #12 on: February 06, 2012 »
Nice one fog76, some cool stuff there.