diff options
-rw-r--r-- | debian/aethyra-data.install | 6 | ||||
-rw-r--r-- | debian/aethyra.docs | 6 | ||||
-rw-r--r-- | debian/aethyra.install | 5 | ||||
-rw-r--r-- | debian/aethyra.menu | 4 | ||||
-rw-r--r-- | debian/aethyra.sgml | 149 | ||||
-rw-r--r-- | debian/aethyra.xpm | 312 | ||||
-rw-r--r-- | packaging/debian/aethyra.xpm | 622 | ||||
-rw-r--r-- | src/particle.h | 590 | ||||
-rw-r--r-- | src/particleemitter.cpp | 6 |
9 files changed, 609 insertions, 1091 deletions
diff --git a/debian/aethyra-data.install b/debian/aethyra-data.install deleted file mode 100644 index c652dff3..00000000 --- a/debian/aethyra-data.install +++ /dev/null @@ -1,6 +0,0 @@ -data/graphics/gui/*.png usr/share/games/aethyra/data/graphics/gui -data/graphics/gui/*.xml usr/share/games/aethyra/data/graphics/gui -data/graphics/images/*.png usr/share/games/aethyra/data/graphics/images -data/graphics/images/ambient/*.png usr/share/games/aethyra/data/graphics/images/ambient -data/graphics/tiles/*.png usr/share/games/aethyra/data/graphics/tiles -data/help/*.txt usr/share/games/aethyra/data/help diff --git a/debian/aethyra.docs b/debian/aethyra.docs deleted file mode 100644 index d622a527..00000000 --- a/debian/aethyra.docs +++ /dev/null @@ -1,6 +0,0 @@ -AUTHORS -NEWS -README -ChangeLog -docs/progression.txt -docs/FAQ.txt diff --git a/debian/aethyra.install b/debian/aethyra.install deleted file mode 100644 index 66ba5126..00000000 --- a/debian/aethyra.install +++ /dev/null @@ -1,5 +0,0 @@ -debian/aethyra.desktop usr/share/applications -debian/aethyra.xpm usr/share/pixmaps -data/icons/aethyra.png usr/share/icons -docs/aethyra.6 usr/share/man/man6 -src/aethyra usr/games diff --git a/debian/aethyra.menu b/debian/aethyra.menu deleted file mode 100644 index 42035107..00000000 --- a/debian/aethyra.menu +++ /dev/null @@ -1,4 +0,0 @@ -?package(aethyra):needs="X11" section="Games/Adventure"\ - title="Aethyra"\ - description="Aethyra is a 2D MMORPG using eAthena."\ - command="/usr/games/aethyra" icon="/usr/share/pixmaps/aethyra.xpm" diff --git a/debian/aethyra.sgml b/debian/aethyra.sgml deleted file mode 100644 index 0ed18199..00000000 --- a/debian/aethyra.sgml +++ /dev/null @@ -1,149 +0,0 @@ -<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ - -<!-- Process this file with docbook-to-man to generate an nroff manual - page: `docbook-to-man manpage.sgml > manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - <!-- Fill in your name for FIRSTNAME and SURNAME. --> - <!ENTITY dhfirstname "<firstname>FERREIRA</firstname>"> - <!ENTITY dhsurname "<surname>Yohann</surname>"> - <!-- Please adjust the date whenever revising the manpage. --> - <!ENTITY dhdate "<date>avril 13, 2005</date>"> - <!-- SECTION should be 1-8, maybe w/ subsection other parameters are - allowed: see man(7), man(1). --> - <!ENTITY dhsection "<manvolnum>6</manvolnum>"> - <!ENTITY dhemail "<email>bertram@cegetel.net</email>"> - <!ENTITY dhusername "FERREIRA Yohann"> - <!ENTITY dhucpackage "<refentrytitle>TMW</refentrytitle>"> - <!ENTITY dhpackage "tmw"> - - <!ENTITY debian "<productname>Debian</productname>"> - <!ENTITY gnu "<acronym>GNU</acronym>"> - <!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> -]> - -<refentry> - <refentryinfo> - <address> - &dhemail; - </address> - <author> - &dhfirstname; - &dhsurname; - </author> - <copyright> - <year>2003</year> - <holder>&dhusername;</holder> - </copyright> - &dhdate; - </refentryinfo> - <refmeta> - &dhucpackage; - - &dhsection; - </refmeta> - <refnamediv> - <refname>&dhpackage;</refname> - - <refpurpose>tmw is the abreviation of The Mana World : A Fantasy Online Game</refpurpose> - </refnamediv> - <refsynopsisdiv> - <cmdsynopsis> - <command>&dhpackage;</command> - </cmdsynopsis> - </refsynopsisdiv> - <refsect1> - <title>DESCRIPTION</title> - - <para>This manual page documents briefly the - <command>&dhpackage;</command> ingame - commands.</para> - <para><command>&dhpackage;</command> is a Great Online Game based upon the Seiken Densetsu Serie. -It has its own universe, and and its own character management system, which will -give you the opportunity to play in a 2D heroic-fantasy world forever.</para> - - </refsect1> - <refsect1> - <title>COMMON KEYS</title> - - <para>Arrow Keys, Key Pad Keys (Diagonals Supported). -Move your character around. - -Left Ctrl : -Make your character attack. - -G : -Get Items on the ground or in a chest. - -Alt + 1...9 : -Shows an Emoticon above your character. - -Alt + I : -Shows / Hide Inventory Window. - -Alt + K : -Shows / Hide Skills Window. - -Alt + E : -Shows / Hide Equipment Window. - -Alt + C : -Shows Configuration Window. -</para> - - </refsect1> - <refsect1> - <title>SEE ALSO</title> - - <para>libguichan (2).</para> - - <para>The program is documented fully by <citetitle>The Mana World Team</citetitle> available via the - website http://www.manaworld.org/</para> - </refsect1> - <refsect1> - <title>AUTHOR</title> - - <para>This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 any - later version published by the Free Software Foundation. - </para> - <para> - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - </para> - - </refsect1> -</refentry> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:2 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:nil -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> - - diff --git a/debian/aethyra.xpm b/debian/aethyra.xpm deleted file mode 100644 index 515be72e..00000000 --- a/debian/aethyra.xpm +++ /dev/null @@ -1,312 +0,0 @@ -/* XPM */
-static char * Aethyra_xpm[] = {
-"32 32 277 2",
-" c None",
-". c #840000",
-"+ c #7E0000",
-"@ c #4F0000",
-"# c #810000",
-"$ c #830000",
-"% c #7B0000",
-"& c #460000",
-"* c #4C0000",
-"= c #4B0000",
-"- c #750000",
-"; c #860000",
-"> c #850000",
-", c #5D0000",
-"' c #490000",
-") c #450000",
-"! c #4A0000",
-"~ c #440000",
-"{ c #6A0000",
-"] c #7A0000",
-"^ c #8B0000",
-"/ c #990000",
-"( c #960000",
-"_ c #720000",
-": c #6E0000",
-"< c #740000",
-"[ c #6B0202",
-"} c #550505",
-"| c #420404",
-"1 c #440101",
-"2 c #4D0000",
-"3 c #4E0000",
-"4 c #480000",
-"5 c #9D0000",
-"6 c #9B0000",
-"7 c #6F0000",
-"8 c #710000",
-"9 c #760000",
-"0 c #680404",
-"a c #4B0C0C",
-"b c #3C0909",
-"c c #470202",
-"d c #450101",
-"e c #500000",
-"f c #510000",
-"g c #790000",
-"h c #890000",
-"i c #920000",
-"j c #710706",
-"k c #7D381F",
-"l c #934A1A",
-"m c #7B1A09",
-"n c #6B1609",
-"o c #521E13",
-"p c #4F2517",
-"q c #5D230F",
-"r c #4D0F04",
-"s c #350A0A",
-"t c #360909",
-"u c #470303",
-"v c #930000",
-"w c #840202",
-"x c #712C1C",
-"y c #A58248",
-"z c #866621",
-"A c #835819",
-"B c #98681F",
-"C c #845C1D",
-"D c #BB964A",
-"E c #856225",
-"F c #3D1B0B",
-"G c #241818",
-"H c #251717",
-"I c #360A0A",
-"J c #430000",
-"K c #6C0000",
-"L c #800000",
-"M c #730404",
-"N c #6A431E",
-"O c #473C1C",
-"P c #534420",
-"Q c #806125",
-"R c #53290B",
-"S c #461C09",
-"T c #BB9432",
-"U c #65490F",
-"V c #1F1110",
-"W c #1A2323",
-"X c #1A2222",
-"Y c #261212",
-"Z c #440202",
-"` c #7F0000",
-" . c #870000",
-".. c #6D0505",
-"+. c #422522",
-"@. c #454434",
-"#. c #A18744",
-"$. c #8F7237",
-"%. c #A37F48",
-"&. c #AD8847",
-"*. c #C6A657",
-"=. c #644C14",
-"-. c #211615",
-";. c #1C2626",
-">. c #1B2323",
-",. c #231313",
-"'. c #420202",
-"). c #6C0404",
-"!. c #532D23",
-"~. c #A8915B",
-"{. c #967C37",
-"]. c #6E5926",
-"^. c #453512",
-"/. c #473713",
-"(. c #A4832A",
-"_. c #594310",
-":. c #241F1E",
-"<. c #232828",
-"[. c #1C2020",
-"}. c #241111",
-"|. c #430202",
-"1. c #7C5030",
-"2. c #967C3D",
-"3. c #3E3318",
-"4. c #3D3930",
-"5. c #454442",
-"6. c #524D44",
-"7. c #C09E45",
-"8. c #654F17",
-"9. c #262524",
-"0. c #252929",
-"a. c #410202",
-"b. c #6B0302",
-"c. c #A78041",
-"d. c #6A5621",
-"e. c #414543",
-"f. c #696B6B",
-"g. c #747676",
-"h. c #7B7566",
-"i. c #C9A84F",
-"j. c #665017",
-"k. c #282725",
-"l. c #252A2A",
-"m. c #1B2222",
-"n. c #3D0202",
-"o. c #750802",
-"p. c #B48E41",
-"q. c #564418",
-"r. c #4A4B4B",
-"s. c #6D6F6F",
-"t. c #797A7A",
-"u. c #867C62",
-"v. c #AE9040",
-"w. c #664F12",
-"x. c #2D2A25",
-"y. c #242828",
-"z. c #1E1E1E",
-"A. c #291010",
-"B. c #400202",
-"C. c #860B02",
-"D. c #B78C32",
-"E. c #594013",
-"F. c #433E3E",
-"G. c #606464",
-"H. c #74736C",
-"I. c #7C6D44",
-"J. c #433719",
-"K. c #413311",
-"L. c #322F1E",
-"M. c #1C2121",
-"N. c #271212",
-"O. c #3C0606",
-"P. c #8C0200",
-"Q. c #B5771D",
-"R. c #765513",
-"S. c #3F3636",
-"T. c #555B5B",
-"U. c #686969",
-"V. c #5A5957",
-"W. c #3C3832",
-"X. c #403826",
-"Y. c #2F3023",
-"Z. c #1C1F1D",
-"`. c #2E0A0A",
-" + c #460101",
-".+ c #8F0101",
-"++ c #A03F0C",
-"@+ c #AC7E19",
-"#+ c #4B3625",
-"$+ c #474747",
-"%+ c #5B5C5A",
-"&+ c #83775A",
-"*+ c #8C7539",
-"=+ c #67541F",
-"-+ c #6B551C",
-";+ c #8C6D24",
-">+ c #4E1C09",
-",+ c #4A0101",
-"'+ c #8A0606",
-")+ c #8D1203",
-"!+ c #A76713",
-"~+ c #87611B",
-"{+ c #453A32",
-"]+ c #52554E",
-"^+ c #A38A45",
-"/+ c #715818",
-"(+ c #7A6424",
-"_+ c #443212",
-":+ c #947026",
-"<+ c #7D4E11",
-"[+ c #490400",
-"}+ c #420000",
-"|+ c #7F0808",
-"1+ c #8B0101",
-"2+ c #800F01",
-"3+ c #915E11",
-"4+ c #504F40",
-"5+ c #4E4834",
-"6+ c #5A4715",
-"7+ c #5B4814",
-"8+ c #382813",
-"9+ c #917035",
-"0+ c #533209",
-"a+ c #3F0400",
-"b+ c #8E0101",
-"c+ c #8A0000",
-"d+ c #671104",
-"e+ c #663D12",
-"f+ c #786023",
-"g+ c #74612B",
-"h+ c #665320",
-"i+ c #675321",
-"j+ c #785C24",
-"k+ c #684718",
-"l+ c #380B00",
-"m+ c #400000",
-"n+ c #8C0303",
-"o+ c #8D0000",
-"p+ c #780101",
-"q+ c #510808",
-"r+ c #291A16",
-"s+ c #26291C",
-"t+ c #2D2B18",
-"u+ c #321F0E",
-"v+ c #370A02",
-"w+ c #3E0100",
-"x+ c #850202",
-"y+ c #600202",
-"z+ c #331313",
-"A+ c #1E2121",
-"B+ c #1A1E1E",
-"C+ c #270D0D",
-"D+ c #470000",
-"E+ c #7B0404",
-"F+ c #720101",
-"G+ c #4B0D0D",
-"H+ c #2D1717",
-"I+ c #261414",
-"J+ c #380808",
-"K+ c #7E0202",
-"L+ c #5D0606",
-"M+ c #3B0E0E",
-"N+ c #300C0C",
-"O+ c #430303",
-"P+ c #7A0505",
-"Q+ c #7C0000",
-"R+ c #640404",
-"S+ c #430D0D",
-"T+ c #460202",
-"U+ c #610505",
-"V+ c #440E0E",
-"W+ c #390B0B",
-"X+ c #560202",
-"Y+ c #480707",
-"Z+ c #410505",
-"`+ c #4B0101",
-" @ c #480101",
-" ",
-" ",
-" ",
-" . + @ ",
-" # $ % & * @ = ",
-" - # ; > $ , ' ) ! @ * ~ ",
-" { ] ^ / ( $ _ : < [ } | 1 ) ~ ' 2 2 3 3 4 ",
-" ] ^ 5 6 . 7 8 9 0 a b c * d 4 e f @ 3 4 ",
-" g h / i j k l m n o p q r s t u e 3 2 4 ",
-" 8 > v w x y z A B C D E F G H I = @ ' J ",
-" K L ^ M N O P Q R S T U V W X Y Z e ) ",
-" ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.e & ",
-" ` . ).!.~.{.].^./.(._.:.<.[.}.|.@ 4 ",
-" # [ 1.2.3.4.5.6.7.8.9.0.[.}.a.= ",
-" ` b.c.d.e.f.g.h.i.j.k.l.m.,.n.) ",
-" L o.p.q.r.s.t.u.v.w.x.y.z.A.B.~ ",
-" ; C.D.E.F.G.H.I.J.K.L.M.N.O.4 ",
-" P.Q.R.S.T.U.V.W.X.Y.Z.`. +2 ",
-" .+++@+#+$+%+&+*+=+-+;+>+,+= ",
-" '+)+!+~+{+]+^+/+(+_+:+<+[+}+ ",
-" |+1+2+3+z 4+5+6+7+8+9+0+a+ ",
-" b+c+d+e+f+g+h+i+j+k+l+m+ ",
-" n+o+p+q+r+s+t+u+v+w+) ) ",
-" x+` y+z+A+B+C+1 e D+ ",
-" E+# F+G+H+I+J+3 @ ~ ",
-" K+% L+M+N+O+e ' ",
-" P+Q+R+S+I T+@ ) ",
-" 9 U+V+W+u 2 ",
-" X+Y+Z+ + ",
-" * `+ @ ",
-" ",
-" "};
diff --git a/packaging/debian/aethyra.xpm b/packaging/debian/aethyra.xpm index 515be72e..25d3dc73 100644 --- a/packaging/debian/aethyra.xpm +++ b/packaging/debian/aethyra.xpm @@ -1,312 +1,312 @@ -/* XPM */
-static char * Aethyra_xpm[] = {
-"32 32 277 2",
-" c None",
-". c #840000",
-"+ c #7E0000",
-"@ c #4F0000",
-"# c #810000",
-"$ c #830000",
-"% c #7B0000",
-"& c #460000",
-"* c #4C0000",
-"= c #4B0000",
-"- c #750000",
-"; c #860000",
-"> c #850000",
-", c #5D0000",
-"' c #490000",
-") c #450000",
-"! c #4A0000",
-"~ c #440000",
-"{ c #6A0000",
-"] c #7A0000",
-"^ c #8B0000",
-"/ c #990000",
-"( c #960000",
-"_ c #720000",
-": c #6E0000",
-"< c #740000",
-"[ c #6B0202",
-"} c #550505",
-"| c #420404",
-"1 c #440101",
-"2 c #4D0000",
-"3 c #4E0000",
-"4 c #480000",
-"5 c #9D0000",
-"6 c #9B0000",
-"7 c #6F0000",
-"8 c #710000",
-"9 c #760000",
-"0 c #680404",
-"a c #4B0C0C",
-"b c #3C0909",
-"c c #470202",
-"d c #450101",
-"e c #500000",
-"f c #510000",
-"g c #790000",
-"h c #890000",
-"i c #920000",
-"j c #710706",
-"k c #7D381F",
-"l c #934A1A",
-"m c #7B1A09",
-"n c #6B1609",
-"o c #521E13",
-"p c #4F2517",
-"q c #5D230F",
-"r c #4D0F04",
-"s c #350A0A",
-"t c #360909",
-"u c #470303",
-"v c #930000",
-"w c #840202",
-"x c #712C1C",
-"y c #A58248",
-"z c #866621",
-"A c #835819",
-"B c #98681F",
-"C c #845C1D",
-"D c #BB964A",
-"E c #856225",
-"F c #3D1B0B",
-"G c #241818",
-"H c #251717",
-"I c #360A0A",
-"J c #430000",
-"K c #6C0000",
-"L c #800000",
-"M c #730404",
-"N c #6A431E",
-"O c #473C1C",
-"P c #534420",
-"Q c #806125",
-"R c #53290B",
-"S c #461C09",
-"T c #BB9432",
-"U c #65490F",
-"V c #1F1110",
-"W c #1A2323",
-"X c #1A2222",
-"Y c #261212",
-"Z c #440202",
-"` c #7F0000",
-" . c #870000",
-".. c #6D0505",
-"+. c #422522",
-"@. c #454434",
-"#. c #A18744",
-"$. c #8F7237",
-"%. c #A37F48",
-"&. c #AD8847",
-"*. c #C6A657",
-"=. c #644C14",
-"-. c #211615",
-";. c #1C2626",
-">. c #1B2323",
-",. c #231313",
-"'. c #420202",
-"). c #6C0404",
-"!. c #532D23",
-"~. c #A8915B",
-"{. c #967C37",
-"]. c #6E5926",
-"^. c #453512",
-"/. c #473713",
-"(. c #A4832A",
-"_. c #594310",
-":. c #241F1E",
-"<. c #232828",
-"[. c #1C2020",
-"}. c #241111",
-"|. c #430202",
-"1. c #7C5030",
-"2. c #967C3D",
-"3. c #3E3318",
-"4. c #3D3930",
-"5. c #454442",
-"6. c #524D44",
-"7. c #C09E45",
-"8. c #654F17",
-"9. c #262524",
-"0. c #252929",
-"a. c #410202",
-"b. c #6B0302",
-"c. c #A78041",
-"d. c #6A5621",
-"e. c #414543",
-"f. c #696B6B",
-"g. c #747676",
-"h. c #7B7566",
-"i. c #C9A84F",
-"j. c #665017",
-"k. c #282725",
-"l. c #252A2A",
-"m. c #1B2222",
-"n. c #3D0202",
-"o. c #750802",
-"p. c #B48E41",
-"q. c #564418",
-"r. c #4A4B4B",
-"s. c #6D6F6F",
-"t. c #797A7A",
-"u. c #867C62",
-"v. c #AE9040",
-"w. c #664F12",
-"x. c #2D2A25",
-"y. c #242828",
-"z. c #1E1E1E",
-"A. c #291010",
-"B. c #400202",
-"C. c #860B02",
-"D. c #B78C32",
-"E. c #594013",
-"F. c #433E3E",
-"G. c #606464",
-"H. c #74736C",
-"I. c #7C6D44",
-"J. c #433719",
-"K. c #413311",
-"L. c #322F1E",
-"M. c #1C2121",
-"N. c #271212",
-"O. c #3C0606",
-"P. c #8C0200",
-"Q. c #B5771D",
-"R. c #765513",
-"S. c #3F3636",
-"T. c #555B5B",
-"U. c #686969",
-"V. c #5A5957",
-"W. c #3C3832",
-"X. c #403826",
-"Y. c #2F3023",
-"Z. c #1C1F1D",
-"`. c #2E0A0A",
-" + c #460101",
-".+ c #8F0101",
-"++ c #A03F0C",
-"@+ c #AC7E19",
-"#+ c #4B3625",
-"$+ c #474747",
-"%+ c #5B5C5A",
-"&+ c #83775A",
-"*+ c #8C7539",
-"=+ c #67541F",
-"-+ c #6B551C",
-";+ c #8C6D24",
-">+ c #4E1C09",
-",+ c #4A0101",
-"'+ c #8A0606",
-")+ c #8D1203",
-"!+ c #A76713",
-"~+ c #87611B",
-"{+ c #453A32",
-"]+ c #52554E",
-"^+ c #A38A45",
-"/+ c #715818",
-"(+ c #7A6424",
-"_+ c #443212",
-":+ c #947026",
-"<+ c #7D4E11",
-"[+ c #490400",
-"}+ c #420000",
-"|+ c #7F0808",
-"1+ c #8B0101",
-"2+ c #800F01",
-"3+ c #915E11",
-"4+ c #504F40",
-"5+ c #4E4834",
-"6+ c #5A4715",
-"7+ c #5B4814",
-"8+ c #382813",
-"9+ c #917035",
-"0+ c #533209",
-"a+ c #3F0400",
-"b+ c #8E0101",
-"c+ c #8A0000",
-"d+ c #671104",
-"e+ c #663D12",
-"f+ c #786023",
-"g+ c #74612B",
-"h+ c #665320",
-"i+ c #675321",
-"j+ c #785C24",
-"k+ c #684718",
-"l+ c #380B00",
-"m+ c #400000",
-"n+ c #8C0303",
-"o+ c #8D0000",
-"p+ c #780101",
-"q+ c #510808",
-"r+ c #291A16",
-"s+ c #26291C",
-"t+ c #2D2B18",
-"u+ c #321F0E",
-"v+ c #370A02",
-"w+ c #3E0100",
-"x+ c #850202",
-"y+ c #600202",
-"z+ c #331313",
-"A+ c #1E2121",
-"B+ c #1A1E1E",
-"C+ c #270D0D",
-"D+ c #470000",
-"E+ c #7B0404",
-"F+ c #720101",
-"G+ c #4B0D0D",
-"H+ c #2D1717",
-"I+ c #261414",
-"J+ c #380808",
-"K+ c #7E0202",
-"L+ c #5D0606",
-"M+ c #3B0E0E",
-"N+ c #300C0C",
-"O+ c #430303",
-"P+ c #7A0505",
-"Q+ c #7C0000",
-"R+ c #640404",
-"S+ c #430D0D",
-"T+ c #460202",
-"U+ c #610505",
-"V+ c #440E0E",
-"W+ c #390B0B",
-"X+ c #560202",
-"Y+ c #480707",
-"Z+ c #410505",
-"`+ c #4B0101",
-" @ c #480101",
-" ",
-" ",
-" ",
-" . + @ ",
-" # $ % & * @ = ",
-" - # ; > $ , ' ) ! @ * ~ ",
-" { ] ^ / ( $ _ : < [ } | 1 ) ~ ' 2 2 3 3 4 ",
-" ] ^ 5 6 . 7 8 9 0 a b c * d 4 e f @ 3 4 ",
-" g h / i j k l m n o p q r s t u e 3 2 4 ",
-" 8 > v w x y z A B C D E F G H I = @ ' J ",
-" K L ^ M N O P Q R S T U V W X Y Z e ) ",
-" ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.e & ",
-" ` . ).!.~.{.].^./.(._.:.<.[.}.|.@ 4 ",
-" # [ 1.2.3.4.5.6.7.8.9.0.[.}.a.= ",
-" ` b.c.d.e.f.g.h.i.j.k.l.m.,.n.) ",
-" L o.p.q.r.s.t.u.v.w.x.y.z.A.B.~ ",
-" ; C.D.E.F.G.H.I.J.K.L.M.N.O.4 ",
-" P.Q.R.S.T.U.V.W.X.Y.Z.`. +2 ",
-" .+++@+#+$+%+&+*+=+-+;+>+,+= ",
-" '+)+!+~+{+]+^+/+(+_+:+<+[+}+ ",
-" |+1+2+3+z 4+5+6+7+8+9+0+a+ ",
-" b+c+d+e+f+g+h+i+j+k+l+m+ ",
-" n+o+p+q+r+s+t+u+v+w+) ) ",
-" x+` y+z+A+B+C+1 e D+ ",
-" E+# F+G+H+I+J+3 @ ~ ",
-" K+% L+M+N+O+e ' ",
-" P+Q+R+S+I T+@ ) ",
-" 9 U+V+W+u 2 ",
-" X+Y+Z+ + ",
-" * `+ @ ",
-" ",
+/* XPM */ +static char * Aethyra_xpm[] = { +"32 32 277 2", +" c None", +". c #840000", +"+ c #7E0000", +"@ c #4F0000", +"# c #810000", +"$ c #830000", +"% c #7B0000", +"& c #460000", +"* c #4C0000", +"= c #4B0000", +"- c #750000", +"; c #860000", +"> c #850000", +", c #5D0000", +"' c #490000", +") c #450000", +"! c #4A0000", +"~ c #440000", +"{ c #6A0000", +"] c #7A0000", +"^ c #8B0000", +"/ c #990000", +"( c #960000", +"_ c #720000", +": c #6E0000", +"< c #740000", +"[ c #6B0202", +"} c #550505", +"| c #420404", +"1 c #440101", +"2 c #4D0000", +"3 c #4E0000", +"4 c #480000", +"5 c #9D0000", +"6 c #9B0000", +"7 c #6F0000", +"8 c #710000", +"9 c #760000", +"0 c #680404", +"a c #4B0C0C", +"b c #3C0909", +"c c #470202", +"d c #450101", +"e c #500000", +"f c #510000", +"g c #790000", +"h c #890000", +"i c #920000", +"j c #710706", +"k c #7D381F", +"l c #934A1A", +"m c #7B1A09", +"n c #6B1609", +"o c #521E13", +"p c #4F2517", +"q c #5D230F", +"r c #4D0F04", +"s c #350A0A", +"t c #360909", +"u c #470303", +"v c #930000", +"w c #840202", +"x c #712C1C", +"y c #A58248", +"z c #866621", +"A c #835819", +"B c #98681F", +"C c #845C1D", +"D c #BB964A", +"E c #856225", +"F c #3D1B0B", +"G c #241818", +"H c #251717", +"I c #360A0A", +"J c #430000", +"K c #6C0000", +"L c #800000", +"M c #730404", +"N c #6A431E", +"O c #473C1C", +"P c #534420", +"Q c #806125", +"R c #53290B", +"S c #461C09", +"T c #BB9432", +"U c #65490F", +"V c #1F1110", +"W c #1A2323", +"X c #1A2222", +"Y c #261212", +"Z c #440202", +"` c #7F0000", +" . c #870000", +".. c #6D0505", +"+. c #422522", +"@. c #454434", +"#. c #A18744", +"$. c #8F7237", +"%. c #A37F48", +"&. c #AD8847", +"*. c #C6A657", +"=. c #644C14", +"-. c #211615", +";. c #1C2626", +">. c #1B2323", +",. c #231313", +"'. c #420202", +"). c #6C0404", +"!. c #532D23", +"~. c #A8915B", +"{. c #967C37", +"]. c #6E5926", +"^. c #453512", +"/. c #473713", +"(. c #A4832A", +"_. c #594310", +":. c #241F1E", +"<. c #232828", +"[. c #1C2020", +"}. c #241111", +"|. c #430202", +"1. c #7C5030", +"2. c #967C3D", +"3. c #3E3318", +"4. c #3D3930", +"5. c #454442", +"6. c #524D44", +"7. c #C09E45", +"8. c #654F17", +"9. c #262524", +"0. c #252929", +"a. c #410202", +"b. c #6B0302", +"c. c #A78041", +"d. c #6A5621", +"e. c #414543", +"f. c #696B6B", +"g. c #747676", +"h. c #7B7566", +"i. c #C9A84F", +"j. c #665017", +"k. c #282725", +"l. c #252A2A", +"m. c #1B2222", +"n. c #3D0202", +"o. c #750802", +"p. c #B48E41", +"q. c #564418", +"r. c #4A4B4B", +"s. c #6D6F6F", +"t. c #797A7A", +"u. c #867C62", +"v. c #AE9040", +"w. c #664F12", +"x. c #2D2A25", +"y. c #242828", +"z. c #1E1E1E", +"A. c #291010", +"B. c #400202", +"C. c #860B02", +"D. c #B78C32", +"E. c #594013", +"F. c #433E3E", +"G. c #606464", +"H. c #74736C", +"I. c #7C6D44", +"J. c #433719", +"K. c #413311", +"L. c #322F1E", +"M. c #1C2121", +"N. c #271212", +"O. c #3C0606", +"P. c #8C0200", +"Q. c #B5771D", +"R. c #765513", +"S. c #3F3636", +"T. c #555B5B", +"U. c #686969", +"V. c #5A5957", +"W. c #3C3832", +"X. c #403826", +"Y. c #2F3023", +"Z. c #1C1F1D", +"`. c #2E0A0A", +" + c #460101", +".+ c #8F0101", +"++ c #A03F0C", +"@+ c #AC7E19", +"#+ c #4B3625", +"$+ c #474747", +"%+ c #5B5C5A", +"&+ c #83775A", +"*+ c #8C7539", +"=+ c #67541F", +"-+ c #6B551C", +";+ c #8C6D24", +">+ c #4E1C09", +",+ c #4A0101", +"'+ c #8A0606", +")+ c #8D1203", +"!+ c #A76713", +"~+ c #87611B", +"{+ c #453A32", +"]+ c #52554E", +"^+ c #A38A45", +"/+ c #715818", +"(+ c #7A6424", +"_+ c #443212", +":+ c #947026", +"<+ c #7D4E11", +"[+ c #490400", +"}+ c #420000", +"|+ c #7F0808", +"1+ c #8B0101", +"2+ c #800F01", +"3+ c #915E11", +"4+ c #504F40", +"5+ c #4E4834", +"6+ c #5A4715", +"7+ c #5B4814", +"8+ c #382813", +"9+ c #917035", +"0+ c #533209", +"a+ c #3F0400", +"b+ c #8E0101", +"c+ c #8A0000", +"d+ c #671104", +"e+ c #663D12", +"f+ c #786023", +"g+ c #74612B", +"h+ c #665320", +"i+ c #675321", +"j+ c #785C24", +"k+ c #684718", +"l+ c #380B00", +"m+ c #400000", +"n+ c #8C0303", +"o+ c #8D0000", +"p+ c #780101", +"q+ c #510808", +"r+ c #291A16", +"s+ c #26291C", +"t+ c #2D2B18", +"u+ c #321F0E", +"v+ c #370A02", +"w+ c #3E0100", +"x+ c #850202", +"y+ c #600202", +"z+ c #331313", +"A+ c #1E2121", +"B+ c #1A1E1E", +"C+ c #270D0D", +"D+ c #470000", +"E+ c #7B0404", +"F+ c #720101", +"G+ c #4B0D0D", +"H+ c #2D1717", +"I+ c #261414", +"J+ c #380808", +"K+ c #7E0202", +"L+ c #5D0606", +"M+ c #3B0E0E", +"N+ c #300C0C", +"O+ c #430303", +"P+ c #7A0505", +"Q+ c #7C0000", +"R+ c #640404", +"S+ c #430D0D", +"T+ c #460202", +"U+ c #610505", +"V+ c #440E0E", +"W+ c #390B0B", +"X+ c #560202", +"Y+ c #480707", +"Z+ c #410505", +"`+ c #4B0101", +" @ c #480101", +" ", +" ", +" ", +" . + @ ", +" # $ % & * @ = ", +" - # ; > $ , ' ) ! @ * ~ ", +" { ] ^ / ( $ _ : < [ } | 1 ) ~ ' 2 2 3 3 4 ", +" ] ^ 5 6 . 7 8 9 0 a b c * d 4 e f @ 3 4 ", +" g h / i j k l m n o p q r s t u e 3 2 4 ", +" 8 > v w x y z A B C D E F G H I = @ ' J ", +" K L ^ M N O P Q R S T U V W X Y Z e ) ", +" ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.e & ", +" ` . ).!.~.{.].^./.(._.:.<.[.}.|.@ 4 ", +" # [ 1.2.3.4.5.6.7.8.9.0.[.}.a.= ", +" ` b.c.d.e.f.g.h.i.j.k.l.m.,.n.) ", +" L o.p.q.r.s.t.u.v.w.x.y.z.A.B.~ ", +" ; C.D.E.F.G.H.I.J.K.L.M.N.O.4 ", +" P.Q.R.S.T.U.V.W.X.Y.Z.`. +2 ", +" .+++@+#+$+%+&+*+=+-+;+>+,+= ", +" '+)+!+~+{+]+^+/+(+_+:+<+[+}+ ", +" |+1+2+3+z 4+5+6+7+8+9+0+a+ ", +" b+c+d+e+f+g+h+i+j+k+l+m+ ", +" n+o+p+q+r+s+t+u+v+w+) ) ", +" x+` y+z+A+B+C+1 e D+ ", +" E+# F+G+H+I+J+3 @ ~ ", +" K+% L+M+N+O+e ' ", +" P+Q+R+S+I T+@ ) ", +" 9 U+V+W+u 2 ", +" X+Y+Z+ + ", +" * `+ @ ", +" ", " "};
diff --git a/src/particle.h b/src/particle.h index 41d7df97..e1ea92d9 100644 --- a/src/particle.h +++ b/src/particle.h @@ -1,296 +1,296 @@ -/*
- * The Mana World
- * Copyright 2006 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * The Mana World is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * The Mana World is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _PARTICLE_H
-#define _PARTICLE_H
-
-#include <list>
-#include <string>
-
-#include <guichan/color.hpp>
-
-#include "guichanfwd.h"
-#include "sprite.h"
-#include "vector.h"
-
-class Map;
-class Particle;
-class ParticleEmitter;
-
-typedef std::list<Particle *> Particles;
-typedef Particles::iterator ParticleIterator;
-typedef std::list<ParticleEmitter *> Emitters;
-typedef Emitters::iterator EmitterIterator;
-
-/**
- * A particle spawned by a ParticleEmitter.
- */
-class Particle : public Sprite
-{
- public:
- static const float PARTICLE_SKY; /**< Maximum Z position of particles */
- static int fastPhysics; /**< Mode of squareroot calculation */
- static int particleCount; /**< Current number of particles */
- static int maxCount; /**< Maximum number of particles */
- static int emitterSkip; /**< Duration of pause between two emitter updates in ticks */
-
- /**
- * Constructor.
- *
- * @param map the map this particle will add itself to, may be NULL
- */
- Particle(Map *map);
-
- /**
- * Destructor.
- */
- ~Particle();
-
- /**
- * Deletes all child particles and emitters.
- */
- void clear();
-
- /**
- * Gives a particle the properties of an engine root particle and loads
- * the particle-related config settings.
- */
- void setupEngine();
-
- /**
- * Updates particle position, returns false when the particle should
- * be deleted.
- */
- virtual bool update();
-
- /**
- * Draws the particle image.
- */
- virtual void draw(Graphics *graphics, int offsetX, int offsetY) const;
-
- /**
- * Necessary for sorting with the other sprites.
- */
- virtual int getPixelY() const
- { return (int) (mPos.y + mPos.z) - 64; }
-
- /**
- * Sets the map the particle is on.
- */
- void setMap(Map *map);
-
- /**
- * Creates a child particle that hosts some emitters described in the
- * particleEffectFile.
- */
- Particle *addEffect(const std::string &particleEffectFile,
- int pixelX, int pixelY, int rotation = 0);
-
- /**
- * Creates a standalone text particle.
- */
- Particle *addTextSplashEffect(const std::string &text,
- int colorR, int colorG, int colorB,
- gcn::Font *font, int x, int y);
-
- /**
- * Creates a standalone text particle.
- */
- Particle *addTextRiseFadeOutEffect(const std::string &text,
- gcn::Font *font,
- int x, int y);
-
- /**
- * Adds an emitter to the particle.
- */
- void addEmitter (ParticleEmitter* emitter)
- { mChildEmitters.push_back(emitter); }
-
- /**
- * Sets the position in 3 dimensional space in pixels relative to map.
- */
- void moveTo(const Vector &pos)
- { moveBy (pos - mPos);}
-
- /**
- * Sets the position in 2 dimensional space in pixels relative to map.
- */
- void moveTo(float x, float y);
-
- /**
- * Returns the particle position.
- */
- const Vector& getPosition() const
- { return mPos; }
-
- /**
- * Changes the particle position relative
- */
- void moveBy (const Vector &change);
-
- /**
- * Sets the time in game ticks until the particle is destroyed.
- */
- void setLifetime(int lifetime)
- { mLifetimeLeft = lifetime; mLifetimePast = 0; }
-
- /**
- * Sets the age of the pixel in game ticks where the particle has
- * faded in completely.
- */
- void setFadeOut(int fadeOut)
- { mFadeOut = fadeOut; }
-
- /**
- * Sets the remaining particle lifetime where the particle starts to
- * fade out.
- */
- void setFadeIn(int fadeIn)
- { mFadeIn = fadeIn; }
-
- /**
- * Sets the alpha value of the particle
- */
- void setAlpha(float alpha)
- { mAlpha = alpha; }
-
- /**
- * Sets the sprite iterator of the particle on the current map to make
- * it easier to remove the particle from the map when it is destroyed.
- */
- void setSpriteIterator(std::list<Sprite*>::iterator spriteIterator)
- { mSpriteIterator = spriteIterator; }
-
- /**
- * Gets the sprite iterator of the particle on the current map.
- */
- std::list<Sprite*>::iterator
- getSpriteIterator() const
- { return mSpriteIterator; }
-
- /**
- * Sets the current velocity in 3 dimensional space.
- */
- void setVelocity(float x, float y, float z)
- { mVelocity.x = x; mVelocity.y = y; mVelocity.z = z; }
-
- /**
- * Sets the downward acceleration.
- */
- void setGravity(float gravity)
- { mGravity = gravity; }
-
- /**
- * Sets the ammount of random vector changes
- */
- void setRandomness(int r)
- { mRandomness = r; }
-
- /**
- * Sets the ammount of velocity particles retain after
- * hitting the ground.
- */
- void setBounce(float bouncieness)
- { mBounce = bouncieness; }
-
- /**
- * Sets the flag if the particle is supposed to be moved by its parent
- */
- void setFollow(bool follow)
- { mFollow = follow; }
-
- /**
- * Gets the flag if the particle is supposed to be moved by its parent
- */
- bool doesFollow()
- { return mFollow; }
-
- /**
- * Makes the particle move toward another particle with a
- * given acceleration and momentum
- */
- void setDestination(Particle *target, float accel, float moment)
- { mTarget = target; mAcceleration = accel; mMomentum = moment; }
-
- /**
- * Sets the distance in pixel the particle can come near the target
- * particle before it is destroyed. Does only make sense after a target
- * particle has been set using setDestination.
- */
- void setDieDistance(float dist)
- { mInvDieDistance = 1.0f / dist; }
-
- bool isAlive()
- { return mAlive; }
-
- /**
- * Determines whether the particle and its children are all dead
- */
- bool isExtinct()
- { return !isAlive() && mChildParticles.empty(); }
-
- /**
- * Manually marks the particle for deletion.
- */
- void kill()
- { mAlive = false; mAutoDelete = true; }
-
- /**
- * After calling this function the particle will only request
- * deletion when kill() is called
- */
- void disableAutoDelete()
- { mAutoDelete = false; }
-
- protected:
- bool mAlive; /**< Is the particle supposed to be drawn and updated?*/
- Vector mPos; /**< Position in pixels relative to map. */
- int mLifetimeLeft; /**< Lifetime left in game ticks*/
- int mLifetimePast; /**< Age of the particle in game ticks*/
- int mFadeOut; /**< Lifetime in game ticks left where fading out begins*/
- int mFadeIn; /**< Age in game ticks where fading in is finished*/
- float mAlpha; /**< Opacity of the graphical representation of the particle */
-
- private:
- // generic properties
- bool mAutoDelete; /**< May the particle request its deletion by the parent particle? */
- Map *mMap; /**< Map the particle is on. */
- std::list<Sprite*>::iterator mSpriteIterator; /**< iterator of the particle on the current map */
- Emitters mChildEmitters; /**< List of child emitters. */
- Particles mChildParticles; /**< List of particles controlled by this particle */
-
- // dynamic particle
- Vector mVelocity; /**< Speed in pixels per game-tick. */
- float mGravity; /**< Downward acceleration in pixels per game-tick. */
- int mRandomness; /**< Ammount of random vector change */
- float mBounce; /**< How much the particle bounces off when hitting the ground */
- bool mFollow; /**< is this particle moved when its parent particle moves? */
-
- // follow-point particles
- Particle *mTarget; /**< The particle that attracts this particle*/
- float mAcceleration; /**< Acceleration towards the target particle in pixels per game-tickČ*/
- float mInvDieDistance; /**< Distance in pixels from the target particle that causes the destruction of the particle*/
- float mMomentum; /**< How much speed the particle retains after each game tick*/
-};
-
-extern Particle *particleEngine;
-
+/* + * The Mana World + * Copyright 2006 The Mana World Development Team + * + * This file is part of The Mana World. + * + * The Mana World is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * The Mana World is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with The Mana World; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PARTICLE_H +#define _PARTICLE_H + +#include <list> +#include <string> + +#include <guichan/color.hpp> + +#include "guichanfwd.h" +#include "sprite.h" +#include "vector.h" + +class Map; +class Particle; +class ParticleEmitter; + +typedef std::list<Particle *> Particles; +typedef Particles::iterator ParticleIterator; +typedef std::list<ParticleEmitter *> Emitters; +typedef Emitters::iterator EmitterIterator; + +/** + * A particle spawned by a ParticleEmitter. + */ +class Particle : public Sprite +{ + public: + static const float PARTICLE_SKY; /**< Maximum Z position of particles */ + static int fastPhysics; /**< Mode of squareroot calculation */ + static int particleCount; /**< Current number of particles */ + static int maxCount; /**< Maximum number of particles */ + static int emitterSkip; /**< Duration of pause between two emitter updates in ticks */ + + /** + * Constructor. + * + * @param map the map this particle will add itself to, may be NULL + */ + Particle(Map *map); + + /** + * Destructor. + */ + ~Particle(); + + /** + * Deletes all child particles and emitters. + */ + void clear(); + + /** + * Gives a particle the properties of an engine root particle and loads + * the particle-related config settings. + */ + void setupEngine(); + + /** + * Updates particle position, returns false when the particle should + * be deleted. + */ + virtual bool update(); + + /** + * Draws the particle image. + */ + virtual void draw(Graphics *graphics, int offsetX, int offsetY) const; + + /** + * Necessary for sorting with the other sprites. + */ + virtual int getPixelY() const + { return (int) (mPos.y + mPos.z) - 64; } + + /** + * Sets the map the particle is on. + */ + void setMap(Map *map); + + /** + * Creates a child particle that hosts some emitters described in the + * particleEffectFile. + */ + Particle *addEffect(const std::string &particleEffectFile, + int pixelX, int pixelY, int rotation = 0); + + /** + * Creates a standalone text particle. + */ + Particle *addTextSplashEffect(const std::string &text, + int colorR, int colorG, int colorB, + gcn::Font *font, int x, int y); + + /** + * Creates a standalone text particle. + */ + Particle *addTextRiseFadeOutEffect(const std::string &text, + gcn::Font *font, + int x, int y); + + /** + * Adds an emitter to the particle. + */ + void addEmitter (ParticleEmitter* emitter) + { mChildEmitters.push_back(emitter); } + + /** + * Sets the position in 3 dimensional space in pixels relative to map. + */ + void moveTo(const Vector &pos) + { moveBy (pos - mPos);} + + /** + * Sets the position in 2 dimensional space in pixels relative to map. + */ + void moveTo(float x, float y); + + /** + * Returns the particle position. + */ + const Vector& getPosition() const + { return mPos; } + + /** + * Changes the particle position relative + */ + void moveBy (const Vector &change); + + /** + * Sets the time in game ticks until the particle is destroyed. + */ + void setLifetime(int lifetime) + { mLifetimeLeft = lifetime; mLifetimePast = 0; } + + /** + * Sets the age of the pixel in game ticks where the particle has + * faded in completely. + */ + void setFadeOut(int fadeOut) + { mFadeOut = fadeOut; } + + /** + * Sets the remaining particle lifetime where the particle starts to + * fade out. + */ + void setFadeIn(int fadeIn) + { mFadeIn = fadeIn; } + + /** + * Sets the alpha value of the particle + */ + void setAlpha(float alpha) + { mAlpha = alpha; } + + /** + * Sets the sprite iterator of the particle on the current map to make + * it easier to remove the particle from the map when it is destroyed. + */ + void setSpriteIterator(std::list<Sprite*>::iterator spriteIterator) + { mSpriteIterator = spriteIterator; } + + /** + * Gets the sprite iterator of the particle on the current map. + */ + std::list<Sprite*>::iterator + getSpriteIterator() const + { return mSpriteIterator; } + + /** + * Sets the current velocity in 3 dimensional space. + */ + void setVelocity(float x, float y, float z) + { mVelocity.x = x; mVelocity.y = y; mVelocity.z = z; } + + /** + * Sets the downward acceleration. + */ + void setGravity(float gravity) + { mGravity = gravity; } + + /** + * Sets the ammount of random vector changes + */ + void setRandomness(int r) + { mRandomness = r; } + + /** + * Sets the ammount of velocity particles retain after + * hitting the ground. + */ + void setBounce(float bouncieness) + { mBounce = bouncieness; } + + /** + * Sets the flag if the particle is supposed to be moved by its parent + */ + void setFollow(bool follow) + { mFollow = follow; } + + /** + * Gets the flag if the particle is supposed to be moved by its parent + */ + bool doesFollow() + { return mFollow; } + + /** + * Makes the particle move toward another particle with a + * given acceleration and momentum + */ + void setDestination(Particle *target, float accel, float moment) + { mTarget = target; mAcceleration = accel; mMomentum = moment; } + + /** + * Sets the distance in pixel the particle can come near the target + * particle before it is destroyed. Does only make sense after a target + * particle has been set using setDestination. + */ + void setDieDistance(float dist) + { mInvDieDistance = 1.0f / dist; } + + bool isAlive() + { return mAlive; } + + /** + * Determines whether the particle and its children are all dead + */ + bool isExtinct() + { return !isAlive() && mChildParticles.empty(); } + + /** + * Manually marks the particle for deletion. + */ + void kill() + { mAlive = false; mAutoDelete = true; } + + /** + * After calling this function the particle will only request + * deletion when kill() is called + */ + void disableAutoDelete() + { mAutoDelete = false; } + + protected: + bool mAlive; /**< Is the particle supposed to be drawn and updated?*/ + Vector mPos; /**< Position in pixels relative to map. */ + int mLifetimeLeft; /**< Lifetime left in game ticks*/ + int mLifetimePast; /**< Age of the particle in game ticks*/ + int mFadeOut; /**< Lifetime in game ticks left where fading out begins*/ + int mFadeIn; /**< Age in game ticks where fading in is finished*/ + float mAlpha; /**< Opacity of the graphical representation of the particle */ + + private: + // generic properties + bool mAutoDelete; /**< May the particle request its deletion by the parent particle? */ + Map *mMap; /**< Map the particle is on. */ + std::list<Sprite*>::iterator mSpriteIterator; /**< iterator of the particle on the current map */ + Emitters mChildEmitters; /**< List of child emitters. */ + Particles mChildParticles; /**< List of particles controlled by this particle */ + + // dynamic particle + Vector mVelocity; /**< Speed in pixels per game-tick. */ + float mGravity; /**< Downward acceleration in pixels per game-tick. */ + int mRandomness; /**< Ammount of random vector change */ + float mBounce; /**< How much the particle bounces off when hitting the ground */ + bool mFollow; /**< is this particle moved when its parent particle moves? */ + + // follow-point particles + Particle *mTarget; /**< The particle that attracts this particle*/ + float mAcceleration; /**< Acceleration towards the target particle in pixels per game-tickČ*/ + float mInvDieDistance; /**< Distance in pixels from the target particle that causes the destruction of the particle*/ + float mMomentum; /**< How much speed the particle retains after each game tick*/ +}; + +extern Particle *particleEngine; + #endif diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index 2a4e4c8a..bdfaa5ba 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -360,9 +360,9 @@ ParticleEmitter::createParticles(int tick) { newParticle = new Particle(mMap); } -
- Vector position(mParticlePosX.value(tick),
- mParticlePosY.value(tick),
+ + Vector position(mParticlePosX.value(tick), + mParticlePosY.value(tick), mParticlePosZ.value(tick)); newParticle->moveTo(position); |