renaming and moving samples around

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-08 15:28:31 +00:00
parent 617ec45690
commit 70d26c3f4f
167 changed files with 137 additions and 0 deletions

22
demos/life/Makefile.in Normal file
View File

@@ -0,0 +1,22 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for toolbar example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../..
program_dir = samples/life
PROGRAM=life
OBJECTS=$(PROGRAM).o
include ../../src/makeprog.env

BIN
demos/life/bitmaps/play.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

View File

@@ -0,0 +1,23 @@
/* XPM */
static char *play_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 2 1",
" c None",
". c Black",
/* pixels */
" ",
" ",
" ",
" . ",
" ... ",
" ..... ",
" ....... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . ",
" ",
" ",
" "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *reset_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 2 1",
" c None",
". c Black",
/* pixels */
" ",
" ",
" ",
" .. .. ",
" ... ... ",
" ... ... ",
" ...... ",
" .... ",
" .... ",
" ...... ",
" ... ... ",
" ... ... ",
" .. .. ",
" ",
" ",
" "
};

BIN
demos/life/bitmaps/stop.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *stop_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 2 1",
" c None",
". c Black",
/* pixels */
" ",
" ",
" ",
" ........ ",
" ........ ",
" ........ ",
" ........ ",
" ........ ",
" ........ ",
" ........ ",
" ........ ",
" ........ ",
" ",
" ",
" ",
" "
};

1182
demos/life/life.cpp Normal file

File diff suppressed because it is too large Load Diff

7
demos/life/life.def Normal file
View File

@@ -0,0 +1,7 @@
NAME Life
DESCRIPTION 'Life! wxWindows application'
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 4048
STACKSIZE 16000

6
demos/life/life.rc Normal file
View File

@@ -0,0 +1,6 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"
reset BITMAP "bitmaps/reset.bmp"
play BITMAP "bitmaps/play.bmp"
stop BITMAP "bitmaps/stop.bmp"

16
demos/life/makefile.b32 Normal file
View File

@@ -0,0 +1,16 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=life
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

19
demos/life/makefile.bcc Normal file
View File

@@ -0,0 +1,19 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=life
OBJECTS=$(TARGET).obj
!include $(WXDIR)\src\makeprog.bcc

17
demos/life/makefile.dos Normal file
View File

@@ -0,0 +1,17 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Makefile : Builds 16-bit sample, VC++ 1.5
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
TARGET=life
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.msc

16
demos/life/makefile.g95 Normal file
View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=life
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

35
demos/life/makefile.unx Normal file
View File

@@ -0,0 +1,35 @@
#
# File: Makefile for samples
# Author: Robert Roebling
# Created: 1999
# Updated:
# Copyright: (c) 1998 Robert Roebling
#
# This makefile requires a Unix version of wxWindows
# to be installed on your system. This is most often
# done typing "make install" when using the complete
# sources of wxWindows or by installing the two
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
# under Linux.
#
CC = gcc
PROGRAM = life
OBJECTS = $(PROGRAM).o
# implementation
.SUFFIXES: .o .cpp
.cpp.o :
$(CC) -c `wx-config --cflags` -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

18
demos/life/makefile.vc Normal file
View File

@@ -0,0 +1,18 @@
#
# File: makefile.vc
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart
#
# Makefile : Builds sample (VC++, WIN32)
# Use FINAL=1 argument to nmake to build final version with no debug info.
# Set WXDIR for your system
WXDIR = $(WXWIN)
PROGRAM=life
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

15
demos/life/makefile.wat Normal file
View File

@@ -0,0 +1,15 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = life
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

BIN
demos/life/mondrian.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

44
demos/life/mondrian.xpm Normal file
View File

@@ -0,0 +1,44 @@
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" "
};

157
demos/life/samples.inc Normal file
View File

@@ -0,0 +1,157 @@
/////////////////////////////////////////////////////////////////////////////
// Name: samples.inc
// Purpose: Sample configurations for Life!
// Author: Guillermo Rodriguez Garcia, <guille@iies.es>
// Modified by:
// Created: Jan/2000
// RCS-ID: $Id$
// Copyright: (c) 2000, Guillermo Rodriguez Garcia
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------------------
// sample configurations
// --------------------------------------------------------------------------
/* Format:
*
* Name,
* Description,
* Width, Height,
* Data, ('*' = alive, '.' = dead)
* Field width, Field height, (optional, defaults to 20 x 20)
* Wraparound (optional, defaults to TRUE)
*
*/
LifeShape g_shapes[] =
{
LifeShape( _("Glider"),
_("The glider is the first of a series of life forms, known "
"as spaceships or fishes, which can travel along the game "
"field retaining their original shape."),
3, 3,
".*."
"..*"
"***"),
LifeShape( _("Heavyweight spaceship"),
_("The glider is just the smaller of the spaceships; this "
"one, known as the heavyweight spaceship or 'big fish', "
"is the largest spaceship which can travel alone without "
"destroying itself. Larger ones can only travel safely "
"if they are supported by smaller spaceships."),
7, 4,
".....*."
"......*"
"*.....*"
".******"),
LifeShape( _("Eater"),
_("An eater is any still life that can repair itself from "
"some attacks. This one (bottom right), also known as "
"'fishhook', eats gliders and fishes (spaceships) provided "
"that they approach in a certain angle."),
10, 10,
".*........"
"..*......."
"***......."
".........."
".........."
".........."
"......**.."
"......*.*."
"........*."
"........**" ),
LifeShape( _("Dice shaker"),
_("Oscillators have been extensively explored in Life!. "
"The dice shaker turns around each seven tics; thus, it "
"is an oscillator with a period of fourteen."),
7, 6,
".**.**."
".**.**."
"..*.*.."
"*.*.*.*"
"*.*.*.*"
"**...**" ),
LifeShape( _("Hertz oscillator"),
_("The Hertz oscillator is a good example of a set of life "
"patterns known as 'billiard tables'. A billiard table is "
"an oscillator which is built inside a stable border. In "
"particular, this one has a period of eight."),
14, 11,
".....**......."
".....**......."
".............."
"**...****...**"
"*.*.*....*.*.*"
"..*.**...*.*.."
"*.*.*....*.*.*"
"**...****...**"
".............."
".......**....."
".......**....." ),
LifeShape( _("Phoenix"),
_("A phoenix is a pattern whose cells all die in every "
"generation, and yet lives forever. For example, this is "
"a phoenix with period two."),
8, 8,
"....*..."
"..*.*..."
"......*."
"**......"
"......**"
".*......"
"...*.*.."
"...*...." ),
LifeShape( _("R-pentomino"),
_("The R-pentomino is a methuselah - a life form which "
"lives for hundreds of generations without stabilizing "
"or dying. In particular, the R-Pentomino requires more "
"than one thousand tics to reach a stable (periodic) "
"state."),
3, 3,
".**"
"**."
".*.",
80, 80, FALSE ),
LifeShape( _("Thunderbird"),
_("The thunderbird is another popular methuselah, which "
"doesn't stabilize until the 243th generation. Note that "
"because the initial configuration is symmetrical with "
"respect to the vertical axis, all generations must be "
"symmetrical as well."),
3, 5,
"***"
"..."
".*."
".*."
".*.",
60, 60, FALSE ),
LifeShape( _("Accorn"),
_("Probably the most popular methuselah, the accorn lives "
"for 5206 (!) generations. To see it in action, a very "
"large game field is needed."),
7, 3,
".*....."
"...*..."
"**..***",
150, 150, FALSE ),
LifeShape( _("Galaxy"),
_("One from my personal collection. It is really beautiful "
"to see this configuration expand and shrink periodically "
"for hundreds of tics before reaching a stable state."),
13, 13,
"...***......."
"......*......"
"......*......"
"......*.....*"
".....***....*"
"....* *...*"
".**** ****."
"*...* *...."
"*....***....."
"*.....*......"
"......*......"
"......*......"
".......***...",
80, 80, FALSE )
};