├── .gitignore ├── source ├── SexyAppFramework │ ├── Flags.cpp │ ├── bass.dll │ ├── EditWidget.cpp │ ├── dsoundversion.h │ ├── D3D8Helper.h │ ├── DirectXErrorString.h │ ├── SliderListener.h │ ├── CheckboxListener.h │ ├── ScrollListener.h │ ├── Quantize.h │ ├── SoundBuild.cpp │ ├── DialogListener.h │ ├── CritSect.h │ ├── Insets.h │ ├── ListListener.h │ ├── CursorWidget.h │ ├── CritSect.cpp │ ├── WidgetBuildBase.cpp │ ├── DialogButton.h │ ├── MiscBuildBase.cpp │ ├── Insets.cpp │ ├── MiscBuild.cpp │ ├── EditListener.h │ ├── GraphicsBuild.cpp │ ├── HyperlinkWidget.h │ ├── ButtonListener.h │ ├── CursorWidget.cpp │ ├── AutoCrit.h │ ├── ScrollbuttonWidget.h │ ├── NativeDisplay.h │ ├── NativeDisplay.cpp │ ├── FModSoundInstance.h │ ├── Ratio.cpp │ ├── Debug.h │ ├── TriVertex.h │ ├── FModSoundInstance.cpp │ ├── SoundInstance.h │ ├── Slider.h │ ├── MTRand.h │ ├── PropertiesParser.h │ ├── FModSoundManager.h │ ├── Checkbox.h │ ├── MI_GetRLAlphaData.inc │ ├── SharedImage.h │ ├── Font.h │ ├── Color.h │ ├── SysFont.h │ ├── MI_GetNativeAlphaData.inc │ ├── ogg │ │ ├── config_types.h │ │ ├── window.h │ │ ├── COPYING │ │ ├── registry.h │ │ ├── mdct.h │ │ ├── registry.c │ │ └── os.h │ ├── HyperlinkWidget.cpp │ ├── SWTri_Loop.cpp │ ├── SWTri_TexelARGB.cpp │ ├── MusicInterface.h │ ├── Font.cpp │ ├── SoundManager.h │ ├── DSoundInstance.h │ ├── Point.h │ ├── Ratio.h │ ├── Flags.h │ ├── MusicInterface.cpp │ ├── SWTri_Pixel888.cpp │ ├── SWTri_Pixel565.cpp │ ├── SWTri_Pixel555.cpp │ ├── Buffer.h │ ├── SWTri_GetTexel.cpp │ ├── ScrollbuttonWidget.cpp │ ├── FModMusicInterface.h │ ├── TextWidget.h │ ├── BassMusicInterface.h │ ├── Quantize.cpp │ ├── ButtonWidget.h │ ├── HTTPTransfer.h │ ├── Checkbox.cpp │ ├── DDI_FastBlt_NoAlpha.inc │ └── ModVal.h ├── ImageLib │ ├── j2k-codec │ │ ├── j2k-codec.url │ │ ├── purchase.url │ │ ├── j2k.ico │ │ ├── j2k-codec.dll │ │ ├── j2k-codec.exp │ │ ├── j2k-codec.lib │ │ ├── j2k-control.dll │ │ ├── file_id.diz │ │ └── J2K_Control.idl │ ├── zlib │ │ ├── index │ │ ├── ChangeLog │ │ ├── inffast.h │ │ ├── infcodes.h │ │ ├── infblock.h │ │ ├── adler32.c │ │ ├── descrip.mms │ │ ├── uncompr.c │ │ ├── infutil.c │ │ └── compress.c │ ├── png │ │ ├── pngnow.png │ │ ├── pngtest.png │ │ ├── todo │ │ ├── pngasmrd.h │ │ ├── png.5 │ │ └── knownbug │ ├── jpeg2000 │ │ ├── COPYRIGHT │ │ ├── INSTALL │ │ └── README │ ├── jpeg │ │ ├── makvms.opt │ │ ├── jversion.h │ │ ├── jconfig.vms │ │ ├── jconfig.dj │ │ ├── jconfig.wat │ │ ├── jconfig.sas │ │ ├── jconfig.cfg │ │ ├── jconfig.mac │ │ ├── jconfig.manx │ │ ├── jconfig.h │ │ ├── rdgif.c │ │ ├── maktjpeg.st │ │ ├── jconfig.st │ │ ├── jconfig.vc │ │ ├── jconfig.bcc │ │ ├── ansi2knr.1 │ │ ├── jchuff.h │ │ ├── rdjpgcom.1 │ │ ├── jconfig.mc6 │ │ ├── makcjpeg.st │ │ └── makdjpeg.st │ └── ImageLib.h ├── demos │ ├── bass.dll │ ├── images │ │ ├── moon.gif │ │ ├── btn_up.gif │ │ ├── dialog.gif │ │ ├── layer0.jpg │ │ ├── layer1.png │ │ ├── layer2.png │ │ ├── moon_.gif │ │ ├── slider.gif │ │ ├── spark.jpg │ │ ├── btn_down.gif │ │ ├── btn_down_.gif │ │ ├── btn_over.gif │ │ ├── btn_over_.gif │ │ ├── btn_up_.gif │ │ ├── checkbox.gif │ │ ├── checkbox_.gif │ │ ├── dialog_.gif │ │ ├── lightning.gif │ │ ├── beam_opaque.jpg │ │ ├── custom_hand.gif │ │ ├── custom_text.gif │ │ ├── dialog_btn.gif │ │ ├── dialog_btn_.gif │ │ ├── lightning_.gif │ │ ├── loader_bar.jpg │ │ ├── robotrobot.gif │ │ ├── beam_opaque_.gif │ │ ├── custom_hand_.gif │ │ ├── custom_pointer.gif │ │ ├── hungarr_logo.jpg │ │ ├── hungarr_logo_.gif │ │ ├── loader_loading.gif │ │ ├── planets_small.jpg │ │ ├── planets_small_.gif │ │ ├── slider_thumb.gif │ │ ├── turbot_worry.gif │ │ ├── turbot_worry_.gif │ │ ├── unicron_baby.JPG │ │ ├── unicron_baby_.GIF │ │ ├── unicron_horiz.jpg │ │ ├── unicron_horiz_.gif │ │ ├── unicron_vert.jpg │ │ ├── unicron_vert_.gif │ │ ├── atomicexplosion.jpg │ │ ├── atomicexplosion_.jpg │ │ ├── custom_dragging.gif │ │ ├── custom_dragging_.gif │ │ ├── custom_pointer_.gif │ │ ├── loader_loading_.gif │ │ ├── unicron_beam_up.jpg │ │ ├── unicron_beam_up_.gif │ │ ├── bomb_radial_death.jpg │ │ ├── bomb_radial_death_.jpg │ │ ├── particle_lightning.jpg │ │ ├── unicron_beam_down.jpg │ │ ├── unicron_beam_down_.gif │ │ ├── unicron_beam_left.jpg │ │ ├── unicron_beam_left_.gif │ │ ├── unicron_beam_right.jpg │ │ └── unicron_beam_right_.gif │ ├── music │ │ ├── music.mo3 │ │ └── hungarr.ogg │ ├── sounds │ │ ├── bad2.ogg │ │ ├── click2.ogg │ │ ├── lament.ogg │ │ ├── planet.ogg │ │ ├── timer.ogg │ │ ├── explosion.ogg │ │ ├── level_up.ogg │ │ ├── level_up2.ogg │ │ ├── magzap1.ogg │ │ ├── mouseover.ogg │ │ ├── mutator.ogg │ │ ├── shorting.ogg │ │ ├── slowdown1.ogg │ │ ├── metal_loop.wav │ │ ├── robotlaser.ogg │ │ ├── whirlpool1.ogg │ │ ├── electro_start.ogg │ │ ├── laserpowerup.ogg │ │ └── killall_explode.ogg │ ├── fonts │ │ ├── _Kiloton9.png │ │ ├── _supernova20.png │ │ ├── ContinuumBold12.txt │ │ ├── _ArmorPiercing22.png │ │ ├── _ContinuumBold12.gif │ │ └── supernova20.txt │ ├── XMLDemo │ │ ├── Board.h │ │ ├── main.cpp │ │ ├── XMLDemoApp.h │ │ └── Board.cpp │ ├── V12Demo │ │ └── DemoWidget.h │ ├── properties │ │ └── demo.xml │ ├── Hun-garr │ │ └── main.cpp │ ├── Demo3 │ │ └── main.cpp │ ├── Demo2 │ │ └── main.cpp │ ├── Demo1 │ │ └── main.cpp │ ├── Demo4 │ │ └── main.cpp │ └── Demo5 │ │ └── main.cpp └── PakLib │ └── PakLib.vcxproj.filters ├── popcap.jpg ├── tools ├── fmod.dll ├── PopPak.exe ├── FontTester.exe ├── GFXMonger.exe ├── MapLookup.exe ├── FontBuilder.exe └── ResourceGen.exe ├── docs ├── Font Building.pdf ├── Vista Support.pdf ├── SexyAppFramework.pdf ├── Pak Resource File Support.pdf ├── Framework Open Source Wstring.pdf ├── SexyAppBase_1_33_Code_Reference.chm ├── Using PopCap Resource Manifests.pdf └── Framework Version 1.2 Usage Notes.pdf ├── PopCap Framework License.md ├── j2k-codec Notes.md ├── Framework 1.22 Changes.md ├── Framework 1.21 Changes.md ├── INSTALLATION NOTES.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.user 2 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Flags.cpp: -------------------------------------------------------------------------------- 1 | #include "Flags.h" 2 | 3 | -------------------------------------------------------------------------------- /popcap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/popcap.jpg -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/j2k-codec.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://j2k-codec.com/ 3 | -------------------------------------------------------------------------------- /tools/fmod.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/fmod.dll -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/purchase.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://j2k-codec.com/order.html 3 | -------------------------------------------------------------------------------- /tools/PopPak.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/PopPak.exe -------------------------------------------------------------------------------- /tools/FontTester.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/FontTester.exe -------------------------------------------------------------------------------- /tools/GFXMonger.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/GFXMonger.exe -------------------------------------------------------------------------------- /tools/MapLookup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/MapLookup.exe -------------------------------------------------------------------------------- /docs/Font Building.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/Font Building.pdf -------------------------------------------------------------------------------- /docs/Vista Support.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/Vista Support.pdf -------------------------------------------------------------------------------- /source/demos/bass.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/bass.dll -------------------------------------------------------------------------------- /tools/FontBuilder.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/FontBuilder.exe -------------------------------------------------------------------------------- /tools/ResourceGen.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/tools/ResourceGen.exe -------------------------------------------------------------------------------- /docs/SexyAppFramework.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/SexyAppFramework.pdf -------------------------------------------------------------------------------- /PopCap Framework License.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/PopCap Framework License.md -------------------------------------------------------------------------------- /source/ImageLib/zlib/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/zlib/index -------------------------------------------------------------------------------- /source/demos/images/moon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/moon.gif -------------------------------------------------------------------------------- /source/demos/music/music.mo3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/music/music.mo3 -------------------------------------------------------------------------------- /source/demos/sounds/bad2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/bad2.ogg -------------------------------------------------------------------------------- /source/ImageLib/png/pngnow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/png/pngnow.png -------------------------------------------------------------------------------- /source/ImageLib/zlib/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/zlib/ChangeLog -------------------------------------------------------------------------------- /source/demos/images/btn_up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/btn_up.gif -------------------------------------------------------------------------------- /source/demos/images/dialog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/dialog.gif -------------------------------------------------------------------------------- /source/demos/images/layer0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/layer0.jpg -------------------------------------------------------------------------------- /source/demos/images/layer1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/layer1.png -------------------------------------------------------------------------------- /source/demos/images/layer2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/layer2.png -------------------------------------------------------------------------------- /source/demos/images/moon_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/moon_.gif -------------------------------------------------------------------------------- /source/demos/images/slider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/slider.gif -------------------------------------------------------------------------------- /source/demos/images/spark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/spark.jpg -------------------------------------------------------------------------------- /source/demos/music/hungarr.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/music/hungarr.ogg -------------------------------------------------------------------------------- /source/demos/sounds/click2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/click2.ogg -------------------------------------------------------------------------------- /source/demos/sounds/lament.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/lament.ogg -------------------------------------------------------------------------------- /source/demos/sounds/planet.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/planet.ogg -------------------------------------------------------------------------------- /source/demos/sounds/timer.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/timer.ogg -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/j2k.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/j2k-codec/j2k.ico -------------------------------------------------------------------------------- /source/ImageLib/png/pngtest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/png/pngtest.png -------------------------------------------------------------------------------- /source/SexyAppFramework/bass.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/SexyAppFramework/bass.dll -------------------------------------------------------------------------------- /source/demos/fonts/_Kiloton9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/fonts/_Kiloton9.png -------------------------------------------------------------------------------- /source/demos/images/btn_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/btn_down.gif -------------------------------------------------------------------------------- /source/demos/images/btn_down_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/btn_down_.gif -------------------------------------------------------------------------------- /source/demos/images/btn_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/btn_over.gif -------------------------------------------------------------------------------- /source/demos/images/btn_over_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/btn_over_.gif -------------------------------------------------------------------------------- /source/demos/images/btn_up_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/btn_up_.gif -------------------------------------------------------------------------------- /source/demos/images/checkbox.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/checkbox.gif -------------------------------------------------------------------------------- /source/demos/images/checkbox_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/checkbox_.gif -------------------------------------------------------------------------------- /source/demos/images/dialog_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/dialog_.gif -------------------------------------------------------------------------------- /source/demos/images/lightning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/lightning.gif -------------------------------------------------------------------------------- /source/demos/sounds/explosion.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/explosion.ogg -------------------------------------------------------------------------------- /source/demos/sounds/level_up.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/level_up.ogg -------------------------------------------------------------------------------- /source/demos/sounds/level_up2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/level_up2.ogg -------------------------------------------------------------------------------- /source/demos/sounds/magzap1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/magzap1.ogg -------------------------------------------------------------------------------- /source/demos/sounds/mouseover.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/mouseover.ogg -------------------------------------------------------------------------------- /source/demos/sounds/mutator.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/mutator.ogg -------------------------------------------------------------------------------- /source/demos/sounds/shorting.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/shorting.ogg -------------------------------------------------------------------------------- /source/demos/sounds/slowdown1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/slowdown1.ogg -------------------------------------------------------------------------------- /docs/Pak Resource File Support.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/Pak Resource File Support.pdf -------------------------------------------------------------------------------- /source/demos/fonts/_supernova20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/fonts/_supernova20.png -------------------------------------------------------------------------------- /source/demos/images/beam_opaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/beam_opaque.jpg -------------------------------------------------------------------------------- /source/demos/images/custom_hand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_hand.gif -------------------------------------------------------------------------------- /source/demos/images/custom_text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_text.gif -------------------------------------------------------------------------------- /source/demos/images/dialog_btn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/dialog_btn.gif -------------------------------------------------------------------------------- /source/demos/images/dialog_btn_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/dialog_btn_.gif -------------------------------------------------------------------------------- /source/demos/images/lightning_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/lightning_.gif -------------------------------------------------------------------------------- /source/demos/images/loader_bar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/loader_bar.jpg -------------------------------------------------------------------------------- /source/demos/images/robotrobot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/robotrobot.gif -------------------------------------------------------------------------------- /source/demos/sounds/metal_loop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/metal_loop.wav -------------------------------------------------------------------------------- /source/demos/sounds/robotlaser.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/robotlaser.ogg -------------------------------------------------------------------------------- /source/demos/sounds/whirlpool1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/whirlpool1.ogg -------------------------------------------------------------------------------- /docs/Framework Open Source Wstring.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/Framework Open Source Wstring.pdf -------------------------------------------------------------------------------- /source/SexyAppFramework/EditWidget.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/SexyAppFramework/EditWidget.cpp -------------------------------------------------------------------------------- /source/demos/fonts/ContinuumBold12.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/fonts/ContinuumBold12.txt -------------------------------------------------------------------------------- /source/demos/images/beam_opaque_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/beam_opaque_.gif -------------------------------------------------------------------------------- /source/demos/images/custom_hand_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_hand_.gif -------------------------------------------------------------------------------- /source/demos/images/custom_pointer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_pointer.gif -------------------------------------------------------------------------------- /source/demos/images/hungarr_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/hungarr_logo.jpg -------------------------------------------------------------------------------- /source/demos/images/hungarr_logo_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/hungarr_logo_.gif -------------------------------------------------------------------------------- /source/demos/images/loader_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/loader_loading.gif -------------------------------------------------------------------------------- /source/demos/images/planets_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/planets_small.jpg -------------------------------------------------------------------------------- /source/demos/images/planets_small_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/planets_small_.gif -------------------------------------------------------------------------------- /source/demos/images/slider_thumb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/slider_thumb.gif -------------------------------------------------------------------------------- /source/demos/images/turbot_worry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/turbot_worry.gif -------------------------------------------------------------------------------- /source/demos/images/turbot_worry_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/turbot_worry_.gif -------------------------------------------------------------------------------- /source/demos/images/unicron_baby.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_baby.JPG -------------------------------------------------------------------------------- /source/demos/images/unicron_baby_.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_baby_.GIF -------------------------------------------------------------------------------- /source/demos/images/unicron_horiz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_horiz.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_horiz_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_horiz_.gif -------------------------------------------------------------------------------- /source/demos/images/unicron_vert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_vert.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_vert_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_vert_.gif -------------------------------------------------------------------------------- /source/demos/sounds/electro_start.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/electro_start.ogg -------------------------------------------------------------------------------- /source/demos/sounds/laserpowerup.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/laserpowerup.ogg -------------------------------------------------------------------------------- /docs/SexyAppBase_1_33_Code_Reference.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/SexyAppBase_1_33_Code_Reference.chm -------------------------------------------------------------------------------- /docs/Using PopCap Resource Manifests.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/Using PopCap Resource Manifests.pdf -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/j2k-codec.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/j2k-codec/j2k-codec.dll -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/j2k-codec.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/j2k-codec/j2k-codec.exp -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/j2k-codec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/j2k-codec/j2k-codec.lib -------------------------------------------------------------------------------- /source/demos/fonts/_ArmorPiercing22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/fonts/_ArmorPiercing22.png -------------------------------------------------------------------------------- /source/demos/fonts/_ContinuumBold12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/fonts/_ContinuumBold12.gif -------------------------------------------------------------------------------- /source/demos/images/atomicexplosion.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/atomicexplosion.jpg -------------------------------------------------------------------------------- /source/demos/images/atomicexplosion_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/atomicexplosion_.jpg -------------------------------------------------------------------------------- /source/demos/images/custom_dragging.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_dragging.gif -------------------------------------------------------------------------------- /source/demos/images/custom_dragging_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_dragging_.gif -------------------------------------------------------------------------------- /source/demos/images/custom_pointer_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/custom_pointer_.gif -------------------------------------------------------------------------------- /source/demos/images/loader_loading_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/loader_loading_.gif -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_up.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_up_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_up_.gif -------------------------------------------------------------------------------- /source/demos/sounds/killall_explode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/sounds/killall_explode.ogg -------------------------------------------------------------------------------- /docs/Framework Version 1.2 Usage Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/docs/Framework Version 1.2 Usage Notes.pdf -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/j2k-control.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/ImageLib/j2k-codec/j2k-control.dll -------------------------------------------------------------------------------- /source/demos/images/bomb_radial_death.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/bomb_radial_death.jpg -------------------------------------------------------------------------------- /source/demos/images/bomb_radial_death_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/bomb_radial_death_.jpg -------------------------------------------------------------------------------- /source/demos/images/particle_lightning.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/particle_lightning.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_down.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_down.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_down_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_down_.gif -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_left.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_left_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_left_.gif -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_right.jpg -------------------------------------------------------------------------------- /source/demos/images/unicron_beam_right_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeggleCommunity/PopCapFramework/HEAD/source/demos/images/unicron_beam_right_.gif -------------------------------------------------------------------------------- /source/ImageLib/jpeg2000/COPYRIGHT: -------------------------------------------------------------------------------- 1 | The copyright information for the JasPer software accompanies the software 2 | license, and can be found in the file named "LICENSE". 3 | -------------------------------------------------------------------------------- /source/SexyAppFramework/dsoundversion.h: -------------------------------------------------------------------------------- 1 | #ifndef __DSOUNDVERSION_H__ 2 | #define __DSOUNDVERSION_H__ 3 | 4 | #define DIRECTSOUND_VERSION 0x0600 5 | #include 6 | 7 | #endif -------------------------------------------------------------------------------- /source/ImageLib/jpeg/makvms.opt: -------------------------------------------------------------------------------- 1 | ! A pointer to the VAX/VMS C Run-Time Shareable Library. 2 | ! This file is needed by makefile.mms and makefile.vms, 3 | ! but only for the older VAX C compiler. DEC C does not need it. 4 | Sys$Library:VAXCRTL.EXE /Share 5 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg2000/INSTALL: -------------------------------------------------------------------------------- 1 | Detailed instructions on how to build and install the JasPer software 2 | can be found in the JasPer Software Reference Manual which is located 3 | in the doc directory. (See the section titled "Building the Software".) 4 | -------------------------------------------------------------------------------- /source/SexyAppFramework/D3D8Helper.h: -------------------------------------------------------------------------------- 1 | #ifndef __D3D8HELPER_H__ 2 | #define __D3D8HELPER_H__ 3 | 4 | #include 5 | 6 | namespace Sexy 7 | { 8 | bool GetD3D8AdapterInfo(GUID &theGUID, std::string &theDriver, std::string &theDescription); 9 | } 10 | 11 | #endif -------------------------------------------------------------------------------- /source/SexyAppFramework/DirectXErrorString.h: -------------------------------------------------------------------------------- 1 | #ifndef __SEXY_DIRECTXERRORSTRING_H__ 2 | #define __SEXY_DIRECTXERRORSTRING_H__ 3 | #include 4 | #include 5 | 6 | namespace Sexy 7 | { 8 | std::string GetDirectXErrorString(HRESULT theResult); 9 | } // namespace 10 | 11 | #endif -------------------------------------------------------------------------------- /source/SexyAppFramework/SliderListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __SLIDERLISTENER_H__ 2 | #define __SLIDERLISTENER_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class SliderListener 8 | { 9 | public: 10 | virtual void SliderVal(int theId, double theVal) {}; 11 | }; 12 | 13 | } 14 | 15 | #endif //__SLIDERLISTENER_H__ 16 | -------------------------------------------------------------------------------- /source/SexyAppFramework/CheckboxListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHECKBOX_LISTENER__ 2 | #define __CHECKBOX_LISTENER__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class CheckboxListener 8 | { 9 | public: 10 | virtual void CheckboxChecked(int theId, bool checked) {} 11 | }; 12 | 13 | } 14 | 15 | #endif //__CHECKBOX_LISTENER__ -------------------------------------------------------------------------------- /source/SexyAppFramework/ScrollListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCROLLLISTENER_H__ 2 | #define __SCROLLLISTENER_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class ScrollListener 8 | { 9 | public: 10 | virtual void ScrollPosition(int theId, double thePosition) {}; 11 | }; 12 | 13 | } 14 | 15 | #endif // __SCROLLLISTENER_H__ 16 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Quantize.h: -------------------------------------------------------------------------------- 1 | #ifndef __QUANTIZE_H__ 2 | #define __QUANTIZE_H__ 3 | 4 | #include "Common.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | bool Quantize8Bit(const ulong* theSrcBits, int theWidth, int theHeight, uchar* theDestColorIndices, ulong* theDestColorTable); 10 | 11 | } 12 | 13 | #endif //__QUANTIZE_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/SoundBuild.cpp: -------------------------------------------------------------------------------- 1 | #include "DSoundManager.cpp" // build first because this defines DIRECTSOUND_VERSION to 0x0600 2 | 3 | #include "DSoundInstance.cpp" 4 | #include "BassLoader.cpp" 5 | #include "BassMusicInterface.cpp" 6 | #include "FModLoader.cpp" 7 | #include "FModMusicInterface.cpp" 8 | #include "FModSoundInstance.cpp" 9 | #include "MusicInterface.cpp" 10 | -------------------------------------------------------------------------------- /source/SexyAppFramework/DialogListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __DIALOGLISTENER_H__ 2 | #define __DIALOGLISTENER_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class DialogListener 8 | { 9 | public: 10 | virtual void DialogButtonPress(int theDialogId, int theButtonId) {} 11 | virtual void DialogButtonDepress(int theDialogId, int theButtonId) {} 12 | }; 13 | 14 | } 15 | 16 | #endif // __DIALOGLISTENER_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/CritSect.h: -------------------------------------------------------------------------------- 1 | #ifndef _H_CritSect 2 | #define _H_CritSect 3 | 4 | #include "Common.h" 5 | 6 | class CritSync; 7 | 8 | namespace Sexy 9 | { 10 | 11 | class CritSect 12 | { 13 | private: 14 | CRITICAL_SECTION mCriticalSection; 15 | friend class AutoCrit; 16 | 17 | public: 18 | CritSect(void); 19 | ~CritSect(void); 20 | }; 21 | 22 | } 23 | 24 | #endif // _H_CritSect 25 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Insets.h: -------------------------------------------------------------------------------- 1 | #ifndef __INSETS_H__ 2 | #define __INSETS_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class Insets 8 | { 9 | public: 10 | int mLeft; 11 | int mTop; 12 | int mRight; 13 | int mBottom; 14 | 15 | public: 16 | Insets(); 17 | Insets(int theLeft, int theTop, int theRight, int theBottom); 18 | Insets(const Insets& theInsets); 19 | }; 20 | 21 | } 22 | 23 | #endif //__INSETS_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/ListListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __LISTLISTENER_H__ 2 | #define __LISTLISTENER_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class ListListener 8 | { 9 | public: 10 | virtual void ListClicked(int theId, int theIdx, int theClickCount) {} 11 | virtual void ListClosed(int theId) {} 12 | virtual void ListHiliteChanged(int theId, int theOldIdx, int theNewIdx) {} 13 | }; 14 | 15 | } 16 | 17 | #endif //__LISTLISTENER_H__ 18 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /source/demos/XMLDemo/Board.h: -------------------------------------------------------------------------------- 1 | #ifndef __BOARD_H__ 2 | #define __BOARD_H__ 3 | 4 | #include "SexyAppFramework/Widget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class XMLDemoApp; 10 | 11 | class Board : public Widget 12 | { 13 | 14 | public: 15 | 16 | XMLDemoApp* mApp; 17 | 18 | public: 19 | 20 | Board(XMLDemoApp* theApp); 21 | virtual ~Board(); 22 | 23 | void Update(); 24 | void Draw(Graphics* g); 25 | }; 26 | 27 | } 28 | 29 | #endif //__BOARD_H__ 30 | -------------------------------------------------------------------------------- /source/SexyAppFramework/CursorWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __CURSORWIDGET_H__ 2 | #define __CURSORWIDGET_H__ 3 | 4 | #include "Widget.h" 5 | #include "Point.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class Image; 11 | 12 | class CursorWidget : public Widget 13 | { 14 | public: 15 | Image* mImage; 16 | 17 | public: 18 | CursorWidget(); 19 | 20 | virtual void Draw(Graphics* g); 21 | void SetImage(Image* theImage); 22 | Point GetHotspot(); 23 | 24 | }; 25 | 26 | } 27 | 28 | #endif //__CURSORWIDGET_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/CritSect.cpp: -------------------------------------------------------------------------------- 1 | #pragma warning( disable : 4786 ) 2 | 3 | #include "CritSect.h" 4 | #include 5 | 6 | using namespace Sexy; 7 | 8 | //////////////////////////////////////////////////////////////////////////////// 9 | 10 | CritSect::CritSect(void) 11 | { 12 | InitializeCriticalSection(&mCriticalSection); 13 | } 14 | 15 | //////////////////////////////////////////////////////////////////////////////// 16 | 17 | CritSect::~CritSect(void) 18 | { 19 | DeleteCriticalSection(&mCriticalSection); 20 | } 21 | -------------------------------------------------------------------------------- /source/SexyAppFramework/WidgetBuildBase.cpp: -------------------------------------------------------------------------------- 1 | #include "WidgetManager.cpp" 2 | #include "Widget.cpp" 3 | #include "TextWidget.cpp" 4 | #include "Slider.cpp" 5 | #include "ScrollbuttonWidget.cpp" 6 | #include "ScrollbarWidget.cpp" 7 | #include "ListWidget.cpp" 8 | #include "Insets.cpp" 9 | #include "HyperlinkWidget.cpp" 10 | #include "EditWidget.cpp" 11 | #include "Checkbox.cpp" 12 | #include "ButtonWidget.cpp" 13 | #include "Dialog.cpp" 14 | #include "DialogButton.cpp" 15 | #include "FlashWidget.cpp" 16 | #include "WidgetContainer.cpp" 17 | -------------------------------------------------------------------------------- /source/SexyAppFramework/DialogButton.h: -------------------------------------------------------------------------------- 1 | #ifndef __DIALOGBUTTON_H__ 2 | #define __DIALOGBUTTON_H__ 3 | 4 | #include "ButtonWidget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class DialogButton : public ButtonWidget 10 | { 11 | public: 12 | Image* mComponentImage; 13 | int mTranslateX, mTranslateY; 14 | int mTextOffsetX, mTextOffsetY; 15 | 16 | public: 17 | DialogButton(Image* theComponentImage, int theId, ButtonListener* theListener); 18 | 19 | virtual void Draw(Graphics* g); 20 | }; 21 | 22 | } 23 | 24 | #endif //__DIALOGBUTTON_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/MiscBuildBase.cpp: -------------------------------------------------------------------------------- 1 | #include "Flags.cpp" 2 | #include "XMLParser.cpp" 3 | #include "SexyMatrix.cpp" 4 | #include "SEHCatcher.cpp" 5 | #include "PropertiesParser.cpp" 6 | #include "PerfTimer.cpp" 7 | #include "MTRand.cpp" 8 | #include "KeyCodes.cpp" 9 | #include "HTTPTransfer.cpp" 10 | #include "DirectXErrorString.cpp" 11 | #include "Debug.cpp" 12 | #include "CritSect.cpp" 13 | #include "Common.cpp" 14 | #include "Buffer.cpp" 15 | #include "ResourceManager.cpp" 16 | #include "ModVal.cpp" 17 | #include "DescParser.cpp" 18 | #include "Ratio.cpp" -------------------------------------------------------------------------------- /source/ImageLib/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-1998 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | extern int inflate_fast OF(( 12 | uInt, 13 | uInt, 14 | inflate_huft *, 15 | inflate_huft *, 16 | inflate_blocks_statef *, 17 | z_streamp )); 18 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Insets.cpp: -------------------------------------------------------------------------------- 1 | #include "Insets.h" 2 | 3 | using namespace Sexy; 4 | 5 | Insets::Insets() : 6 | mLeft(0), 7 | mTop(0), 8 | mRight(0), 9 | mBottom(0) 10 | { 11 | int a = 0; 12 | } 13 | 14 | Insets::Insets(int theLeft, int theTop, int theRight, int theBottom) : 15 | mLeft(theLeft), 16 | mTop(theTop), 17 | mRight(theRight), 18 | mBottom(theBottom) 19 | { 20 | } 21 | 22 | Insets::Insets(const Insets& theInsets) : 23 | mLeft(theInsets.mLeft), 24 | mTop(theInsets.mTop), 25 | mRight(theInsets.mRight), 26 | mBottom(theInsets.mBottom) 27 | { 28 | } 29 | 30 | -------------------------------------------------------------------------------- /source/SexyAppFramework/MiscBuild.cpp: -------------------------------------------------------------------------------- 1 | #include "XMLParser.cpp" 2 | #include "SexyMatrix.cpp" 3 | #include "SEHCatcher.cpp" 4 | #include "PropertiesParser.cpp" 5 | #include "PerfTimer.cpp" 6 | #include "MTRand.cpp" 7 | #include "KeyCodes.cpp" 8 | #include "InternetManager.cpp" 9 | #include "HTTPTransfer.cpp" 10 | #include "DirectXErrorString.cpp" 11 | #include "Debug.cpp" 12 | #include "CritSect.cpp" 13 | #include "Common.cpp" 14 | #include "Buffer.cpp" 15 | #include "BetaSupport.cpp" 16 | #include "ResourceManager.cpp" 17 | #include "ModVal.cpp" 18 | #include "DescParser.cpp" 19 | #include "Ratio.cpp" -------------------------------------------------------------------------------- /source/SexyAppFramework/EditListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __EDITLISTENER_H__ 2 | #define __EDITLISTENER_H__ 3 | 4 | #include "Common.h" 5 | #include "KeyCodes.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class EditListener 11 | { 12 | public: 13 | virtual void EditWidgetText(int theId, const SexyString& theString) {}; 14 | 15 | virtual bool AllowKey(int theId, KeyCode theKey) { return true; } 16 | virtual bool AllowChar(int theId, SexyChar theChar) { return true; } 17 | virtual bool AllowText(int theId, const SexyString& theText) { return true; } 18 | }; 19 | 20 | } 21 | 22 | #endif //__EDITLISTENER_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/GraphicsBuild.cpp: -------------------------------------------------------------------------------- 1 | #include "DDInterface.cpp" // build first because this defines INITGUID at the top 2 | 3 | #include "Color.cpp" 4 | #include "D3DInterface.cpp" 5 | #include "D3DTester.cpp" 6 | #include "DDImage.cpp" 7 | #include "Font.cpp" 8 | #include "Graphics.cpp" 9 | #include "NativeDisplay.cpp" 10 | #include "Image.cpp" 11 | #include "ImageFont.cpp" 12 | #include "MemoryImage.cpp" 13 | #include "SysFont.cpp" 14 | #include "Quantize.cpp" 15 | #include "SharedImage.cpp" 16 | 17 | // Leave this at the bottom because it undefs DIRECT3D_VERSION 18 | #include "D3D8Helper.cpp" 19 | -------------------------------------------------------------------------------- /source/SexyAppFramework/HyperlinkWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __HYPERLINKWIDGET_H__ 2 | #define __HYPERLINKWIDGET_H__ 3 | 4 | #include "ButtonWidget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class HyperlinkWidget : public ButtonWidget 10 | { 11 | public: 12 | Color mColor; 13 | Color mOverColor; 14 | int mUnderlineSize; 15 | int mUnderlineOffset; 16 | 17 | public: 18 | HyperlinkWidget(int theId, ButtonListener* theButtonListener); 19 | 20 | void Draw(Graphics* g); 21 | void MouseEnter(); 22 | void MouseLeave(); 23 | }; 24 | 25 | } 26 | 27 | #endif //__HYPERLINKWIDGET_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/ButtonListener.h: -------------------------------------------------------------------------------- 1 | #ifndef __BUTTONLISTENER_H__ 2 | #define __BUTTONLISTENER_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class ButtonListener 8 | { 9 | public: 10 | virtual void ButtonPress(int theId) {} 11 | virtual void ButtonPress(int theId, int theClickCount) { ButtonPress(theId); } 12 | virtual void ButtonDepress(int theId) {} 13 | virtual void ButtonDownTick(int theId) {} 14 | virtual void ButtonMouseEnter(int theId) {} 15 | virtual void ButtonMouseLeave(int theId) {} 16 | virtual void ButtonMouseMove(int theId, int theX, int theY) {} 17 | }; 18 | 19 | } 20 | 21 | #endif //__BUTTONLISTENER_H__ -------------------------------------------------------------------------------- /j2k-codec Notes.md: -------------------------------------------------------------------------------- 1 | The framework ships with a demo version of the j2k-codec. The demo has the following restrictions: 2 | * beeps at the end of each decoding 3 | * open the ordering page once in about 30 decoded images 4 | * on the rare occasions do several other little nags 5 | 6 | If you want to use the j2k codec in your application, you will need to purchase a key from 7 | http://j2k-codec.com. The price is between $49 and $399. Once you have purchased a key, 8 | you can use it in the framework by calling: 9 | 10 | ImageLib::SetJ2KCodecKey(<your key>) 11 | 12 | When you load a JPEG2000 image, your key will be automatically passed to the j2k-codec library. 13 | -------------------------------------------------------------------------------- /source/SexyAppFramework/CursorWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "CursorWidget.h" 2 | #include "Image.h" 3 | 4 | using namespace Sexy; 5 | 6 | CursorWidget::CursorWidget() 7 | { 8 | mImage = NULL; 9 | mMouseVisible = false; 10 | } 11 | 12 | void CursorWidget::Draw(Graphics* g) 13 | { 14 | if (mImage != NULL) 15 | g->DrawImage(mImage, 0, 0); 16 | } 17 | 18 | void CursorWidget::SetImage(Image* theImage) 19 | { 20 | mImage = theImage; 21 | if (mImage != NULL) 22 | Resize(mX, mY, theImage->mWidth, theImage->mHeight); 23 | } 24 | 25 | Point CursorWidget::GetHotspot() 26 | { 27 | if (mImage == NULL) 28 | return Point(0, 0); 29 | return Point(mImage->GetWidth()/2, mImage->GetHeight()/2); 30 | } 31 | -------------------------------------------------------------------------------- /source/SexyAppFramework/AutoCrit.h: -------------------------------------------------------------------------------- 1 | #ifndef __AUTOCRIT_INCLUDED__ 2 | #define __AUTOCRIT_INCLUDED__ 3 | 4 | #include "Common.h" 5 | #include "CritSect.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class AutoCrit 11 | { 12 | LPCRITICAL_SECTION mCritSec; 13 | public: 14 | AutoCrit(LPCRITICAL_SECTION theCritSec) : 15 | mCritSec(theCritSec) 16 | { 17 | EnterCriticalSection(mCritSec); 18 | } 19 | 20 | AutoCrit(const CritSect& theCritSect) : 21 | mCritSec((LPCRITICAL_SECTION) &theCritSect.mCriticalSection) 22 | { 23 | EnterCriticalSection(mCritSec); 24 | } 25 | 26 | ~AutoCrit() 27 | { 28 | LeaveCriticalSection(mCritSec); 29 | } 30 | }; 31 | 32 | } 33 | 34 | #endif //__AUTOCRIT_INCLUDED__ -------------------------------------------------------------------------------- /source/SexyAppFramework/ScrollbuttonWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCROLLBUTTONWIDGET_H__ 2 | #define __SCROLLBUTTONWIDGET_H__ 3 | 4 | #include "..\SexyAppFramework\ButtonWidget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class ButtonListener; 10 | 11 | class ScrollbuttonWidget : public ButtonWidget 12 | { 13 | public: 14 | bool mHorizontal; 15 | 16 | // mType is a new way of doing things (1 = up, 2 = down, 3 = left, 4 = right). 17 | // This overrides mHorizontal and mId. 18 | int mType; 19 | 20 | public: 21 | ScrollbuttonWidget(int theId, ButtonListener *theButtonListener, int theType = 0); 22 | virtual ~ScrollbuttonWidget(); 23 | 24 | void Draw(Graphics *g); 25 | }; 26 | 27 | } 28 | 29 | #endif //__SCROLLBUTTONWIDGET_H__ 30 | -------------------------------------------------------------------------------- /source/SexyAppFramework/NativeDisplay.h: -------------------------------------------------------------------------------- 1 | #ifndef __NATIVEDISPLAY_H__ 2 | #define __NATIVEDISPLAY_H__ 3 | #include "Common.h" 4 | 5 | namespace Sexy 6 | { 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | /////////////////////////////////////////////////////////////////////////////// 10 | class NativeDisplay 11 | { 12 | public: 13 | int mRGBBits; 14 | ulong mRedMask; 15 | ulong mGreenMask; 16 | ulong mBlueMask; 17 | int mRedBits; 18 | int mGreenBits; 19 | int mBlueBits; 20 | int mRedShift; 21 | int mGreenShift; 22 | int mBlueShift; 23 | 24 | public: 25 | NativeDisplay(); 26 | virtual ~NativeDisplay(); 27 | }; 28 | 29 | }; 30 | 31 | 32 | #endif -------------------------------------------------------------------------------- /source/SexyAppFramework/NativeDisplay.cpp: -------------------------------------------------------------------------------- 1 | #include "NativeDisplay.h" 2 | 3 | using namespace Sexy; 4 | 5 | /////////////////////////////////////////////////////////////////////////////// 6 | /////////////////////////////////////////////////////////////////////////////// 7 | NativeDisplay::NativeDisplay() 8 | { 9 | mRGBBits = 0; 10 | 11 | mRedMask = 0; 12 | mGreenMask = 0; 13 | mBlueMask = 0; 14 | 15 | mRedBits = 0; 16 | mGreenBits = 0; 17 | mBlueBits = 0; 18 | 19 | mRedShift = 0; 20 | mGreenShift = 0; 21 | mBlueShift = 0; 22 | } 23 | 24 | /////////////////////////////////////////////////////////////////////////////// 25 | /////////////////////////////////////////////////////////////////////////////// 26 | NativeDisplay::~NativeDisplay() 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/file_id.diz: -------------------------------------------------------------------------------- 1 | 2 | J2K-Codec ver 1.8 3 | 4 | ===================================================== 5 | 6 | Make your graphics look better with an easy-to-use 7 | JPEG 2000 decoding component. J2K-Codec can help 8 | game developers, screensaver creators and many 9 | others to improve their products--to achieve better 10 | image quality and reduce installation package size. 11 | The new image compression standard based on wavelet 12 | technology has many interesting features not 13 | available in the old JPEG, such as alpha-channel 14 | and varied resolution levels. 15 | 16 | Don't be outdated. 17 | 18 | ===================================================== 19 | 20 | Web: http://www.j2k-codec.com 21 | E-mail: support@j2k-codec.com -------------------------------------------------------------------------------- /source/SexyAppFramework/FModSoundInstance.h: -------------------------------------------------------------------------------- 1 | #ifndef __FMODSOUNDINSTANCE_H__ 2 | #define __FMODSOUNDINSTANCE_H__ 3 | 4 | #include "SoundInstance.h" 5 | #include "fmod.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class FModSoundInstance : public SoundInstance 11 | { 12 | public: 13 | int mChannelNum; 14 | FSOUND_STREAM* mStream; 15 | 16 | public: 17 | FModSoundInstance(); 18 | virtual ~FModSoundInstance(); 19 | virtual void Release(); 20 | 21 | virtual void SetVolume(double theVolume); 22 | virtual void SetPan(int thePosition); //-db to +db = left to right 23 | 24 | virtual bool Play(bool looping, bool autoRelease); 25 | virtual void Stop(); 26 | virtual bool IsPlaying(); 27 | virtual bool IsReleased(); 28 | }; 29 | 30 | } 31 | 32 | #endif //__FMODSOUNDINSTANCE_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/Ratio.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Ratio.h" 3 | 4 | namespace Sexy 5 | { 6 | 7 | Ratio::Ratio() 8 | : mNumerator(1) 9 | , mDenominator(1) 10 | { 11 | } 12 | 13 | Ratio::Ratio(int theNumerator, int theDenominator) 14 | { 15 | Set(theNumerator, theDenominator); 16 | } 17 | 18 | void Ratio::Set(int theNumerator, int theDenominator) 19 | { 20 | // find the greatest-common-denominator of theNumerator and theDenominator. 21 | int t; 22 | int a = theNumerator; 23 | int b = theDenominator; 24 | while (b != 0) 25 | { 26 | t = b; 27 | b = a % b; 28 | a = t; 29 | } 30 | 31 | // divide by the g-c-d to reduce mNumerator/mDenominator to lowest terms. 32 | mNumerator = theNumerator/a; 33 | mDenominator = theDenominator/a; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Debug.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEBUG_INCLUDED__ 2 | #define __DEBUG_INCLUDED__ 3 | 4 | #include "Common.h" 5 | #include 6 | 7 | extern bool gInAssert; 8 | 9 | #ifdef SEXY_TRACING_ENABLED 10 | void SexyTrace(const char *theStr); 11 | #define SEXY_TRACE(theStr) SexyTrace(theStr) 12 | #else 13 | #define SEXY_TRACE(theStr) 14 | #endif 15 | 16 | extern void SexyTraceFmt(const SexyChar* fmt ...); 17 | extern void OutputDebug(const SexyChar* fmt ...); 18 | 19 | #ifdef NDEBUG 20 | 21 | #define DBG_ASSERTE(exp) ((void)0) 22 | #define DBG_ASSERT(exp) ((void)0) 23 | 24 | #else 25 | 26 | #define DBG_ASSERTE(exp) { gInAssert = true; assert(exp); gInAssert = false; } 27 | #define DBG_ASSERT(exp) { gInAssert = true; assert(exp); gInAssert = false; } 28 | 29 | #endif // NDEBUG 30 | 31 | #endif //__DEBUG_INCLUDED__ -------------------------------------------------------------------------------- /source/SexyAppFramework/TriVertex.h: -------------------------------------------------------------------------------- 1 | #ifndef __TRIVERTEX_H__ 2 | #define __TRIVERTEX_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | /////////////////////////////////////////////////////////////////////////////// 8 | /////////////////////////////////////////////////////////////////////////////// 9 | class TriVertex 10 | { 11 | public: 12 | float x,y,u,v; 13 | DWORD color; //ARGB (0 = use color specified in function call) 14 | 15 | public: 16 | TriVertex() { color = 0; } 17 | TriVertex(float theX, float theY) : x(theX), y(theY) { color = 0; } 18 | TriVertex(float theX, float theY, float theU, float theV) : x(theX), y(theY), u(theU), v(theV) { color = 0; } 19 | TriVertex(float theX, float theY, float theU, float theV, DWORD theColor) : x(theX), y(theY), u(theU), v(theV), color(theColor) { } 20 | }; 21 | 22 | } // namespace Sexy 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /source/ImageLib/zlib/infcodes.h: -------------------------------------------------------------------------------- 1 | /* infcodes.h -- header to use infcodes.c 2 | * Copyright (C) 1995-1998 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | struct inflate_codes_state; 12 | typedef struct inflate_codes_state FAR inflate_codes_statef; 13 | 14 | extern inflate_codes_statef *inflate_codes_new OF(( 15 | uInt, uInt, 16 | inflate_huft *, inflate_huft *, 17 | z_streamp )); 18 | 19 | extern int inflate_codes OF(( 20 | inflate_blocks_statef *, 21 | z_streamp , 22 | int)); 23 | 24 | extern void inflate_codes_free OF(( 25 | inflate_codes_statef *, 26 | z_streamp )); 27 | 28 | -------------------------------------------------------------------------------- /source/SexyAppFramework/FModSoundInstance.cpp: -------------------------------------------------------------------------------- 1 | #include "FModSoundInstance.h" 2 | #include "FModLoader.h" 3 | 4 | using namespace Sexy; 5 | 6 | FModSoundInstance::FModSoundInstance() 7 | { 8 | mStream = NULL; 9 | mChannelNum = 0; 10 | } 11 | 12 | FModSoundInstance::~FModSoundInstance() 13 | { 14 | Release(); 15 | } 16 | 17 | void FModSoundInstance::Release() 18 | { 19 | } 20 | 21 | void FModSoundInstance::SetVolume(double theVolume) 22 | { 23 | } 24 | 25 | void FModSoundInstance::SetPan(int thePosition) 26 | { 27 | } 28 | 29 | bool FModSoundInstance::Play(bool looping, bool autoRelease) 30 | { 31 | if (mStream == NULL) 32 | return false; 33 | 34 | gFMod->FSOUND_Stream_Play(FSOUND_FREE, mStream); 35 | return true; 36 | } 37 | 38 | void FModSoundInstance::Stop() 39 | { 40 | } 41 | 42 | bool FModSoundInstance::IsPlaying() 43 | { 44 | return true; 45 | } 46 | 47 | bool FModSoundInstance::IsReleased() 48 | { 49 | return false; 50 | } 51 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SoundInstance.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOUNDINSTANCE_H__ 2 | #define __SOUNDINSTANCE_H__ 3 | 4 | #include 5 | #include "Common.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class SoundInstance 11 | { 12 | public: 13 | SoundInstance() {} 14 | virtual ~SoundInstance() {} 15 | virtual void Release() = NULL; 16 | 17 | virtual void SetBaseVolume(double theBaseVolume) = NULL; 18 | virtual void SetBasePan(int theBasePan) = NULL; 19 | 20 | virtual void AdjustPitch(double theNumSteps) = NULL; 21 | 22 | virtual void SetVolume(double theVolume) = NULL; 23 | virtual void SetPan(int thePosition) = NULL; //-hundredth db to +hundredth db = left to right 24 | 25 | virtual bool Play(bool looping, bool autoRelease) = NULL; 26 | virtual void Stop() = NULL; 27 | virtual bool IsPlaying() = NULL; 28 | virtual bool IsReleased() = NULL; 29 | virtual double GetVolume() = NULL; 30 | }; 31 | 32 | } 33 | 34 | #endif //__SOUNDINSTANCE_H__ -------------------------------------------------------------------------------- /source/demos/V12Demo/DemoWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEMO_WIDGET_H__ 2 | #define __DEMO_WIDGET_H__ 3 | 4 | #include "SexyAppFramework/Widget.h" 5 | #include "SexyAppFramework/ButtonListener.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class ButtonWidget; 11 | 12 | ////////////////////////////////////////////////////////////////////////// 13 | // Noting new in this header. Check the previous demos if this makes 14 | // no sense to you, as it's all covered there. CHECK OUT THE .CPP FILE 15 | // THOUGH, there's new stuff there. 16 | ////////////////////////////////////////////////////////////////////////// 17 | 18 | 19 | class DemoWidget : public Widget, public ButtonListener 20 | { 21 | 22 | private: 23 | 24 | ButtonWidget* mMoveButton; 25 | ButtonWidget* mCloseButton; 26 | 27 | public: 28 | 29 | DemoWidget(); 30 | virtual ~DemoWidget(); 31 | 32 | void Draw(Graphics* g); 33 | void ButtonDepress(int id); 34 | }; 35 | 36 | } 37 | 38 | #endif //__DEMO_WIDGET_H__ 39 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Slider.h: -------------------------------------------------------------------------------- 1 | #ifndef __SLIDER_H__ 2 | #define __SLIDER_H__ 3 | 4 | #include "Widget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class SliderListener; 10 | 11 | class Slider : public Widget 12 | { 13 | public: 14 | SliderListener* mListener; 15 | double mVal; 16 | int mId; 17 | Image* mTrackImage; 18 | Image* mThumbImage; 19 | 20 | bool mDragging; 21 | int mRelX; 22 | int mRelY; 23 | 24 | bool mHorizontal; 25 | 26 | public: 27 | Slider(Image* theTrackImage, Image* theThumbImage, int theId, SliderListener* theListener); 28 | 29 | virtual void SetValue(double theValue); 30 | 31 | virtual bool HasTransparencies(); 32 | virtual void Draw(Graphics* g); 33 | 34 | virtual void MouseMove(int x, int y); 35 | virtual void MouseDown(int x, int y, int theClickCount); 36 | virtual void MouseDrag(int x, int y); 37 | virtual void MouseUp(int x, int y); 38 | virtual void MouseLeave(); 39 | }; 40 | 41 | } 42 | 43 | #endif //__SLIDER_H__ -------------------------------------------------------------------------------- /source/ImageLib/png/todo: -------------------------------------------------------------------------------- 1 | TODO - list of things to do for libpng: 2 | 3 | Final bug fixes. 4 | Fix problem with C++ and EXTERN "C". 5 | Better C++ wrapper/full C++ implementation? 6 | Keep up with public chunks. 7 | sPLT chunk handling. 8 | cHRM transformation. 9 | Support for application-defined chunk handlers. 10 | Improve setjmp/longjmp usage or remove it in favor of returning error codes. 11 | High-level API for reading images. 12 | Add "grayscale->palette" transformation and "palette->grayscale" detection. 13 | Improved dithering. 14 | Multi-lingual error and warning message support. 15 | Complete sRGB transformation (presently it simply uses gamma=0.45455). 16 | Man pages for function calls. 17 | Better documentation. 18 | Better filter selection 19 | (counting huffman bits/precompression? filter inertia? filter costs?). 20 | Optional palette (sPLT) creation. 21 | Histogram creation. 22 | Text conversion between different code pages (Latin-1 -> Mac and DOS). 23 | Improve API by hiding the info_ptr. 24 | Make a no-floating-point version. 25 | -------------------------------------------------------------------------------- /source/SexyAppFramework/MTRand.h: -------------------------------------------------------------------------------- 1 | #ifndef __MTRAND_H__ 2 | #define __MTRAND_H__ 3 | 4 | #include 5 | 6 | namespace Sexy 7 | { 8 | 9 | #define MTRAND_N 624 10 | 11 | class MTRand 12 | { 13 | unsigned long mt[MTRAND_N]; /* the array for the state vector */ 14 | int mti; 15 | 16 | public: 17 | MTRand(const std::string& theSerialData); 18 | MTRand(unsigned long seed); 19 | MTRand(); 20 | 21 | void SRand(const std::string& theSerialData); 22 | void SRand(unsigned long seed); 23 | unsigned long NextNoAssert(); 24 | unsigned long Next(); 25 | unsigned long NextNoAssert(unsigned long range); 26 | unsigned long Next(unsigned long range); 27 | float NextNoAssert(float range); 28 | float Next( float range ); 29 | 30 | std::string Serialize(); 31 | 32 | static void SetRandAllowed(bool allowed); 33 | }; 34 | 35 | struct MTAutoDisallowRand 36 | { 37 | MTAutoDisallowRand() { MTRand::SetRandAllowed(false); } 38 | ~MTAutoDisallowRand() { MTRand::SetRandAllowed(true); } 39 | }; 40 | 41 | } 42 | 43 | #endif //__MTRAND_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/PropertiesParser.h: -------------------------------------------------------------------------------- 1 | #ifndef __SEXYAPPFRAMEWORK_NO_PROPERTIES_PARSER__ 2 | #ifndef __PROPERTIESPARSER_H__ 3 | #define __PROPERTIESPARSER_H__ 4 | 5 | #include "SexyAppBase.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class XMLParser; 11 | 12 | class PropertiesParser 13 | { 14 | public: 15 | SexyAppBase* mApp; 16 | XMLParser* mXMLParser; 17 | SexyString mError; 18 | bool mHasFailed; 19 | 20 | protected: 21 | void Fail(const SexyString& theErrorText); 22 | 23 | bool ParseSingleElement(SexyString* theString); 24 | bool ParseStringArray(StringVector* theStringVector); 25 | bool ParseProperties(); 26 | bool DoParseProperties(); 27 | 28 | public: 29 | PropertiesParser(SexyAppBase* theApp); 30 | virtual ~PropertiesParser(); 31 | 32 | bool ParsePropertiesFile(const std::string& theFilename); 33 | bool ParsePropertiesBuffer(const Buffer& theBuffer); 34 | SexyString GetErrorText(); 35 | }; 36 | 37 | } 38 | 39 | #endif //__PROPERTIESPARSER_H__ 40 | 41 | #endif // __SEXYAPPFRAMEWORK_NO_PROPERTIES_PARSER__ -------------------------------------------------------------------------------- /source/ImageLib/jpeg2000/README: -------------------------------------------------------------------------------- 1 | JasPer Readme 2 | ************* 3 | 4 | This is the source code distribution for JasPer. JasPer is a collection 5 | of software (i.e., a library and application programs) for the coding 6 | and manipulation of images. This software can handle image data in a 7 | variety of formats. One such format supported by JasPer is the JPEG-2000 8 | format defined in ISO/IEC 15444-1. 9 | 10 | The complete licensing terms for the JasPer software can be found in 11 | the file named "LICENSE" in the top level directory of this software 12 | distribution. Any use of this software contrary to the terms of the 13 | license is strictly prohibited. The changes made to the software 14 | since the last release are described in the file "NEWS". Detailed 15 | documentation on the JasPer software can be found in the JasPer Software 16 | Reference Manual. This manual is located in the "doc" directory, and 17 | includes useful information such as: 1) how to build, install, and use 18 | the software, 2) how to submit report bugs, and 3) where to find 19 | additional information about the software. 20 | 21 | Enjoy! :) 22 | -------------------------------------------------------------------------------- /Framework 1.22 Changes.md: -------------------------------------------------------------------------------- 1 | Framework 1.22 changes: 2 | 3 | * Support for Visual Studio 2005 4 | 5 | * Fixed some C++ language conformance issues 6 | 7 | * Fixed some bugs with the flash widget and rendering issues 8 | 9 | * Got tired of casting warnings, properly casting stuff now 10 | 11 | * Fixed some demo bugs and bad programming practices 12 | 13 | * IMPORTANT NEW CHANGE: in order to cut filesize bloat, caused 14 | by the addition of the software triangle rasterizer 15 | code in 1.21, you now need to do the following IF you 16 | use DrawImageMatrix or DrawImageTransform (with a 17 | complex transformation) or if you get errors compiling 18 | or at run time you get the assert "You need to call 19 | SWTri_AddDrawTriFunc or SWTri_AddAllDrawTriFuncs" 20 | 21 | 1. Include "SexyAppFramework/SWTri.h" 22 | 2. Call the function SWTri_AddAllDrawTriFuncs() 23 | 3. Alternatively to #2, if you know which triangle draw 24 | functions you need, you can add them specifically via 25 | SWTri_AddDrawTriFunc(...) and specifying which draw 26 | function you need (check SWTri.h for a list). 27 | 28 | * Removed the ImageLib project files as they aren't needed, to avoid confusion -------------------------------------------------------------------------------- /source/ImageLib/ImageLib.h: -------------------------------------------------------------------------------- 1 | #ifndef __IMAGELIB_H__ 2 | #define __IMAGELIB_H__ 3 | 4 | #include 5 | 6 | namespace ImageLib 7 | { 8 | 9 | class Image 10 | { 11 | public: 12 | int mWidth; 13 | int mHeight; 14 | unsigned long* mBits; 15 | 16 | public: 17 | Image(); 18 | virtual ~Image(); 19 | 20 | int GetWidth(); 21 | int GetHeight(); 22 | unsigned long* GetBits(); 23 | }; 24 | 25 | bool WriteJPEGImage(const std::string& theFileName, Image* theImage); 26 | bool WritePNGImage(const std::string& theFileName, Image* theImage); 27 | bool WriteTGAImage(const std::string& theFileName, Image* theImage); 28 | bool WriteBMPImage(const std::string& theFileName, Image* theImage); 29 | extern int gAlphaComposeColor; 30 | extern bool gAutoLoadAlpha; 31 | extern bool gIgnoreJPEG2000Alpha; // I've noticed alpha in jpeg2000's that shouldn't have alpha so this defaults to true 32 | 33 | 34 | Image* GetImage(const std::string& theFileName, bool lookForAlphaImage = true); 35 | 36 | void InitJPEG2000(); 37 | void CloseJPEG2000(); 38 | void SetJ2KCodecKey(const std::string& theKey); 39 | 40 | } 41 | 42 | #endif //__IMAGELIB_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/FModSoundManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __FMODSOUNDMANAGER_H__ 2 | #define __FMODSOUNDMANAGER_H__ 3 | 4 | #include "SoundManager.h" 5 | #include "FModSoundInstance.h" 6 | #include "fmod.h" 7 | 8 | namespace Sexy 9 | { 10 | 11 | class FModSoundManager : public SoundManager 12 | { 13 | public: 14 | double mMasterVolume; 15 | FSOUND_STREAM* mSourceStreams[MAX_SOURCE_SOUNDS]; 16 | 17 | public: 18 | FModSoundManager(HWND theWindow); 19 | virtual ~FModSoundManager(); 20 | 21 | virtual bool Initialized(); 22 | 23 | virtual bool LoadSound(unsigned int theSfxID, const std::string& theFilename); 24 | virtual int LoadSound(const std::string& theFilename); 25 | virtual void SetVolume(double theVolume); 26 | 27 | virtual SoundInstance* GetSoundInstance(unsigned int theSfxID); 28 | 29 | virtual void ReleaseSounds(); 30 | virtual void ReleaseChannels(); 31 | 32 | virtual double GetMasterVolume(); 33 | virtual void SetMasterVolume(double theVolume); 34 | 35 | virtual void Flush(); 36 | virtual void SetCooperativeWindow(HWND theHWnd, bool isWindowed); 37 | }; 38 | 39 | } 40 | 41 | #endif //__FMODSOUNDMANAGER_H__ 42 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.vms: -------------------------------------------------------------------------------- 1 | /* jconfig.vms --- jconfig.h for use on Digital VMS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #define TWO_FILE_COMMANDLINE /* Needed on VMS */ 33 | #undef NEED_SIGNAL_CATCHER 34 | #undef DONT_USE_B_MODE 35 | #undef PROGRESS_REPORT /* optional */ 36 | 37 | #endif /* JPEG_CJPEG_DJPEG */ 38 | -------------------------------------------------------------------------------- /source/ImageLib/png/pngasmrd.h: -------------------------------------------------------------------------------- 1 | /* pngasmrd.h - assembler version of utilities to read a PNG file 2 | * 3 | * libpng 1.0.5 - October 15, 1999 4 | * For conditions of distribution and use, see copyright notice in png.h 5 | * Copyright (c) 1999 Glenn Randers-Pehrson 6 | * 7 | */ 8 | 9 | #ifdef PNG_ASSEMBLER_CODE_SUPPORTED 10 | 11 | /* Set this in the makefile for VC++ on Pentium, not in pngconf.h */ 12 | #ifdef PNG_USE_PNGVCRD 13 | /* Platform must be Pentium. Makefile must assemble and load pngvcrd.c . 14 | * MMX will be detected at run time and used if present. 15 | */ 16 | #define PNG_HAVE_ASSEMBLER_COMBINE_ROW 17 | #define PNG_HAVE_ASSEMBLER_READ_INTERLACE 18 | #define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW 19 | #endif 20 | 21 | /* Set this in the makefile for gcc on Pentium, not in pngconf.h */ 22 | #ifdef PNG_USE_PNGGCCRD 23 | /* Platform must be Pentium. Makefile must assemble and load pnggccrd.c 24 | * (not available in libpng 1.0.5). 25 | * MMX will be detected at run time and used if present. 26 | */ 27 | #define PNG_HAVE_ASSEMBLER_COMBINE_ROW 28 | #define PNG_HAVE_ASSEMBLER_READ_INTERLACE 29 | #define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /source/PakLib/PakLib.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Checkbox.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHECKBOX_H__ 2 | #define __CHECKBOX_H__ 3 | 4 | #include "Widget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class CheckboxListener; 10 | class Image; 11 | 12 | class Checkbox : public Widget 13 | { 14 | protected: 15 | CheckboxListener* mListener; 16 | 17 | public: 18 | int mId; 19 | 20 | bool mChecked; 21 | 22 | Image* mUncheckedImage; 23 | Image* mCheckedImage; 24 | 25 | Rect mCheckedRect; 26 | Rect mUncheckedRect; 27 | 28 | Color mOutlineColor; // These are only used if no image is specified 29 | Color mBkgColor; 30 | Color mCheckColor; 31 | 32 | public: 33 | virtual void SetChecked(bool checked, bool tellListener = true); 34 | virtual bool IsChecked(); 35 | 36 | virtual void MouseDown(int x, int y, int theClickCount) { Widget::MouseDown(x, y, theClickCount); } 37 | virtual void MouseDown(int x, int y, int theBtnNum, int theClickCount); 38 | virtual void Draw(Graphics* g); 39 | 40 | public: 41 | Checkbox(Image* theUncheckedImage, Image* theCheckedImage, int theId, CheckboxListener* theCheckboxListener); 42 | }; 43 | 44 | } 45 | 46 | #endif //__CHECKBOX_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/MI_GetRLAlphaData.inc: -------------------------------------------------------------------------------- 1 | { 2 | 3 | uchar* aWPtr = mRLAlphaData; 4 | 5 | if (mWidth==1) 6 | { 7 | memset(aWPtr,1,mHeight); 8 | } 9 | else 10 | { 11 | for (int aRow = 0; aRow < mHeight; aRow++) 12 | { 13 | int aRCount = 1; 14 | int aRLCount = 1; 15 | 16 | int anAVal = NEXT_SRC_COLOR >> 24; 17 | int aLastAClass = (anAVal == 0) ? 0 : (anAVal == 255) ? 1 : 2; 18 | 19 | while (aRCount < mWidth) 20 | { 21 | aRCount++; 22 | 23 | anAVal = NEXT_SRC_COLOR >> 24; 24 | int aThisAClass = (anAVal == 0) ? 0 : (anAVal == 255) ? 1 : 2; 25 | 26 | if ((aThisAClass != aLastAClass) || (aRCount == mWidth)) 27 | { 28 | if (aThisAClass == aLastAClass) 29 | aRLCount++; 30 | 31 | for (int i = aRLCount; i > 0; i--) 32 | { 33 | if (i >= 255) 34 | *aWPtr++ = 255; 35 | else 36 | *aWPtr++ = i; 37 | } 38 | 39 | if ((aRCount == mWidth) && (aThisAClass != aLastAClass)) 40 | *aWPtr++ = 1; 41 | 42 | aLastAClass = aThisAClass; 43 | aRLCount = 1; 44 | } 45 | else 46 | { 47 | aRLCount++; 48 | } 49 | } 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /source/SexyAppFramework/SharedImage.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHARED_IMAGE_H__ 2 | #define __SHARED_IMAGE_H__ 3 | 4 | #include "Common.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class Image; 10 | class DDImage; 11 | class MemoryImage; 12 | 13 | class SharedImage 14 | { 15 | public: 16 | DDImage* mImage; 17 | int mRefCount; 18 | 19 | SharedImage(); 20 | }; 21 | 22 | typedef std::map, SharedImage> SharedImageMap; 23 | 24 | class SharedImageRef 25 | { 26 | public: 27 | SharedImage* mSharedImage; 28 | MemoryImage* mUnsharedImage; 29 | bool mOwnsUnshared; 30 | 31 | public: 32 | SharedImageRef(); 33 | SharedImageRef(const SharedImageRef& theSharedImageRef); 34 | SharedImageRef(SharedImage* theSharedImage); 35 | ~SharedImageRef(); 36 | 37 | void Release(); 38 | 39 | SharedImageRef& operator=(const SharedImageRef& theSharedImageRef); 40 | SharedImageRef& operator=(SharedImage* theSharedImage); 41 | SharedImageRef& operator=(MemoryImage* theUnsharedImage); 42 | MemoryImage* operator->(); 43 | operator Image*(); 44 | operator MemoryImage*(); 45 | operator DDImage*(); 46 | }; 47 | 48 | } 49 | 50 | #endif //__SHARED_IMAGE_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/Font.h: -------------------------------------------------------------------------------- 1 | #ifndef __FONT_H__ 2 | #define __FONT_H__ 3 | 4 | #include "Common.h" 5 | #include "Rect.h" 6 | #include "Color.h" 7 | 8 | namespace Sexy 9 | { 10 | 11 | class Graphics; 12 | 13 | class Font 14 | { 15 | public: 16 | int mAscent; 17 | int mAscentPadding; // How much space is above the avg uppercase char 18 | int mHeight; 19 | int mLineSpacingOffset; // This plus height should get added between lines 20 | 21 | public: 22 | Font(); 23 | Font(const Font& theFont); 24 | virtual ~Font(); 25 | 26 | virtual int GetAscent(); 27 | virtual int GetAscentPadding(); 28 | virtual int GetDescent(); 29 | virtual int GetHeight(); 30 | virtual int GetLineSpacingOffset(); 31 | virtual int GetLineSpacing(); 32 | virtual int StringWidth(const SexyString& theString); 33 | virtual int CharWidth(SexyChar theChar); 34 | virtual int CharWidthKern(SexyChar theChar, SexyChar thePrevChar); 35 | 36 | virtual void DrawString(Graphics* g, int theX, int theY, const SexyString& theString, const Color& theColor, const Rect& theClipRect); 37 | 38 | virtual Font* Duplicate() = NULL; 39 | }; 40 | 41 | } 42 | 43 | #endif //__FONT_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/Color.h: -------------------------------------------------------------------------------- 1 | #ifndef __COLOR_H__ 2 | #define __COLOR_H__ 3 | 4 | #include "Common.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | #pragma pack(push,1) 10 | struct SexyRGBA {unsigned char b,g,r,a;}; 11 | #pragma pack(pop) 12 | 13 | class Color 14 | { 15 | public: 16 | int mRed; 17 | int mGreen; 18 | int mBlue; 19 | int mAlpha; 20 | 21 | static Color Black; 22 | static Color White; 23 | 24 | public: 25 | Color(); 26 | Color(int theColor); 27 | Color(int theColor, int theAlpha); 28 | Color(int theRed, int theGreen, int theBlue); 29 | Color(int theRed, int theGreen, int theBlue, int theAlpha); 30 | Color(const SexyRGBA &theColor); 31 | Color(const uchar* theElements); 32 | Color(const int* theElements); 33 | 34 | int GetRed() const; 35 | int GetGreen() const; 36 | int GetBlue() const; 37 | int GetAlpha() const; 38 | ulong ToInt() const; 39 | SexyRGBA ToRGBA() const; 40 | 41 | int& operator[](int theIdx); 42 | int operator[](int theIdx) const; 43 | }; 44 | 45 | bool operator==(const Color& theColor1, const Color& theColor2); 46 | bool operator!=(const Color& theColor1, const Color& theColor2); 47 | 48 | } 49 | 50 | #endif //__COLOR_H__ -------------------------------------------------------------------------------- /source/demos/fonts/supernova20.txt: -------------------------------------------------------------------------------- 1 | Define CharList 2 | ( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '-', ',' , ':'); 3 | 4 | Define WidthList 5 | ( 13, 12, 13, 12, 13, 13, 13, 12, 13, 13, 13, 9, 3 , 3); 6 | 7 | Define RectList 8 | ( ( 0, 0, 12, 28), ( 13, 0, 4, 28), ( 18, 0, 12, 28), ( 31, 0, 12, 28), 9 | ( 44, 0, 12, 28), ( 57, 0, 12, 28), ( 70, 0, 12, 28), ( 83, 0, 11, 28), 10 | ( 95, 0, 12, 28), ( 108, 0, 12, 28), ( 121, 0, 12, 28), ( 134, 0, 9, 28), 11 | ( 144, 0, 3, 28), ( 148, 0, 3, 28)); 12 | 13 | Define OffsetList 14 | ( ( 0, 0), ( 6, 0), ( 0, 0), ( 0, 0), ( 0, 0), ( 0, 0), ( 0, 0), ( 0, 0), 15 | ( 0, 0), ( 0, 0), ( 0, 0), ( 0, 0), ( 0, 0), ( 0, 0)); 16 | 17 | CreateLayer Main; 18 | LayerSetImage Main 'supernova20'; 19 | LayerSetAscent Main 23; 20 | LayerSetCharWidths Main CharList WidthList; 21 | LayerSetCharWidths Main (' ') (8); 22 | LayerSetImageMap Main CharList RectList; 23 | LayerSetCharOffsets Main CharList OffsetList; 24 | LayerSetAscentPadding Main 0; 25 | LayerSetLineSpacingOffset Main 0; 26 | LayerSetPointSize Main 20; 27 | 28 | SetDefaultPointSize 20; 29 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SysFont.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYSFONT_H__ 2 | #define __SYSFONT_H__ 3 | 4 | #include "Font.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class ImageFont; 10 | class SexyAppBase; 11 | 12 | class SysFont : public Font 13 | { 14 | public: 15 | HFONT mHFont; 16 | SexyAppBase* mApp; 17 | bool mDrawShadow; 18 | bool mSimulateBold; 19 | 20 | void Init(SexyAppBase* theApp, const std::string& theFace, int thePointSize, int theScript, bool bold, bool italics, bool underline, bool useDevCaps); 21 | 22 | public: 23 | SysFont(const std::string& theFace, int thePointSize, bool bold = false, bool italics = false, bool underline = false); 24 | SysFont(SexyAppBase* theApp, const std::string& theFace, int thePointSize, int theScript = ANSI_CHARSET, bool bold = false, bool italics = false, bool underline = false); 25 | SysFont(const SysFont& theSysFont); 26 | 27 | virtual ~SysFont(); 28 | 29 | ImageFont* CreateImageFont(); 30 | virtual int StringWidth(const SexyString& theString); 31 | virtual void DrawString(Graphics* g, int theX, int theY, const SexyString& theString, const Color& theColor, const Rect& theClipRect); 32 | 33 | virtual Font* Duplicate(); 34 | }; 35 | 36 | } 37 | 38 | #endif //__SYSFONT_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/MI_GetNativeAlphaData.inc: -------------------------------------------------------------------------------- 1 | { 2 | ulong* anAlphaData = new ulong[mWidth*mHeight]; 3 | 4 | if (theNumBits == 16) 5 | { 6 | for (int i = 0; i < mWidth*mHeight; i++) 7 | { 8 | ulong val = NEXT_SRC_COLOR; 9 | 10 | int anAlpha = val >> 24; 11 | 12 | int r = ((val >> 16) & 0xFF) * anAlpha >> 8; 13 | int g = ((val >> 8 ) & 0xFF) * anAlpha >> 8; 14 | int b = ((val ) & 0xFF) * anAlpha >> 8; 15 | 16 | anAlphaData[i] = 17 | ((((r * theRMask) >> 8) & theRMask) | 18 | (((g * theGMask) >> 8) & theGMask) | 19 | (((b * theBMask) >> 8) & theBMask) | 20 | (anAlpha << 24)); 21 | } 22 | } 23 | else if (theNumBits == 32) 24 | { 25 | for (int i = 0; i < mWidth*mHeight; i++) 26 | { 27 | ulong val = NEXT_SRC_COLOR; 28 | 29 | int anAlpha = val >> 24; 30 | 31 | int r = (((val >> 16) & 0xFF) * anAlpha) >> 8; 32 | int g = (((val >> 8 ) & 0xFF) * anAlpha) >> 8; 33 | int b = (((val ) & 0xFF) * anAlpha) >> 8; 34 | 35 | anAlphaData[i] = 36 | (((r * theRMask) >> 8) & theRMask) | 37 | (((g * theGMask) >> 8) & theGMask) | 38 | (((b * theBMask) >> 8) & theBMask) | 39 | (anAlpha << 24); 40 | } 41 | } 42 | 43 | mNativeAlphaData = anAlphaData; 44 | } -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 15 | 16 | ********************************************************************/ 17 | #ifndef _OS_CVTYPES_H 18 | #define _OS_CVTYPES_H 19 | 20 | typedef long long ogg_int64_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef short ogg_int16_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/window.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: window functions 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _V_WINDOW_ 19 | #define _V_WINDOW_ 20 | 21 | extern const void *_vorbis_window(int type,int left); 22 | extern void _vorbis_apply_window(ogg_int32_t *d,const void *window[2], 23 | long *blocksizes, 24 | int lW,int W,int nW); 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.dj: -------------------------------------------------------------------------------- 1 | /* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #undef TWO_FILE_COMMANDLINE /* optional */ 33 | #define USE_SETMODE /* Needed to make one-file style work in DJGPP */ 34 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 35 | #undef DONT_USE_B_MODE 36 | #undef PROGRESS_REPORT /* optional */ 37 | 38 | #endif /* JPEG_CJPEG_DJPEG */ 39 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.wat: -------------------------------------------------------------------------------- 1 | /* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #define CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #endif /* JPEG_INTERNALS */ 23 | 24 | #ifdef JPEG_CJPEG_DJPEG 25 | 26 | #define BMP_SUPPORTED /* BMP image file format */ 27 | #define GIF_SUPPORTED /* GIF image file format */ 28 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 29 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 30 | #define TARGA_SUPPORTED /* Targa image file format */ 31 | 32 | #undef TWO_FILE_COMMANDLINE /* optional */ 33 | #define USE_SETMODE /* Needed to make one-file style work in Watcom */ 34 | #undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ 35 | #undef DONT_USE_B_MODE 36 | #undef PROGRESS_REPORT /* optional */ 37 | 38 | #endif /* JPEG_CJPEG_DJPEG */ 39 | -------------------------------------------------------------------------------- /source/SexyAppFramework/HyperlinkWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "HyperlinkWidget.h" 2 | #include "Graphics.h" 3 | #include "ImageFont.h" 4 | #include "SysFont.h" 5 | #include "WidgetManager.h" 6 | 7 | using namespace Sexy; 8 | 9 | HyperlinkWidget::HyperlinkWidget(int theId, ButtonListener* theButtonListener) : 10 | ButtonWidget(theId, theButtonListener), 11 | mColor(255, 255, 255), 12 | mOverColor(255, 255, 255) 13 | { 14 | mDoFinger = true; 15 | mUnderlineOffset = 3; 16 | mUnderlineSize = 1; 17 | } 18 | 19 | void HyperlinkWidget::Draw(Graphics* g) 20 | { 21 | if (mFont == NULL) 22 | mFont = new SysFont(mWidgetManager->mApp, "Arial Unicode MS", 10); //baz changed 23 | 24 | int aFontX = (mWidth - mFont->StringWidth(mLabel))/2; 25 | int aFontY = (mHeight + mFont->GetAscent())/2 - 1; 26 | 27 | if (mIsOver) 28 | g->SetColor(mOverColor); 29 | else 30 | g->SetColor(mColor); 31 | 32 | g->SetFont(mFont); 33 | g->DrawString(mLabel, aFontX, aFontY); 34 | 35 | for (int i = 0; i < mUnderlineSize; i++) 36 | g->FillRect(aFontX, aFontY+mUnderlineOffset+i, mFont->StringWidth(mLabel), 1); 37 | } 38 | 39 | void HyperlinkWidget::MouseEnter() 40 | { 41 | ButtonWidget::MouseEnter(); 42 | 43 | MarkDirtyFull(); 44 | } 45 | 46 | void HyperlinkWidget::MouseLeave() 47 | { 48 | ButtonWidget::MouseLeave(); 49 | 50 | MarkDirtyFull(); 51 | } -------------------------------------------------------------------------------- /source/demos/XMLDemo/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // NOTE: You should have read and understood demos 1 and 2 before 9 | // this, as topics that are already covered will be either not commented 10 | // or minimally so. In addition, this demo uses just a couple features from the v.1.2 11 | // release of the framework, so it is beneficial to have read and understood 12 | // V12Demo as well. Though, if you fully understand demos 1 and 2, you'll probably 13 | // be fine enough. 14 | // 15 | // This demo will teach you: 16 | // * How to read in XML files from disk 17 | // * How to sift through the XML data and extract the information you need 18 | ////////////////////////////////////////////////////////////////////////// 19 | 20 | #include "XMLDemoApp.h" 21 | 22 | using namespace Sexy; 23 | 24 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 25 | { 26 | gHInstance = hInstance; 27 | 28 | XMLDemoApp* anApp = new XMLDemoApp(); 29 | anApp->Init(); 30 | anApp->Start(); 31 | delete anApp; 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.sas: -------------------------------------------------------------------------------- 1 | /* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ 23 | 24 | #define NO_MKTEMP /* SAS C doesn't have mktemp() */ 25 | 26 | #define SHORTxSHORT_32 /* produces better DCT code with SAS C */ 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #define TWO_FILE_COMMANDLINE 39 | #define NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.cfg: -------------------------------------------------------------------------------- 1 | /* jconfig.cfg --- source file edited by configure script */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #undef HAVE_PROTOTYPES 5 | #undef HAVE_UNSIGNED_CHAR 6 | #undef HAVE_UNSIGNED_SHORT 7 | #undef void 8 | #undef const 9 | #undef CHAR_IS_UNSIGNED 10 | #undef HAVE_STDDEF_H 11 | #undef HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | /* Define this if you get warnings about undefined structures. */ 17 | #undef INCOMPLETE_TYPES_BROKEN 18 | 19 | #ifdef JPEG_INTERNALS 20 | 21 | #undef RIGHT_SHIFT_IS_UNSIGNED 22 | #undef INLINE 23 | /* These are for configuring the JPEG memory manager. */ 24 | #undef DEFAULT_MAX_MEM 25 | #undef NO_MKTEMP 26 | 27 | #endif /* JPEG_INTERNALS */ 28 | 29 | #ifdef JPEG_CJPEG_DJPEG 30 | 31 | #define BMP_SUPPORTED /* BMP image file format */ 32 | #define GIF_SUPPORTED /* GIF image file format */ 33 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 34 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 35 | #define TARGA_SUPPORTED /* Targa image file format */ 36 | 37 | #undef TWO_FILE_COMMANDLINE 38 | #undef NEED_SIGNAL_CATCHER 39 | #undef DONT_USE_B_MODE 40 | 41 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 42 | #undef PROGRESS_REPORT 43 | 44 | #endif /* JPEG_CJPEG_DJPEG */ 45 | -------------------------------------------------------------------------------- /source/ImageLib/zlib/infblock.h: -------------------------------------------------------------------------------- 1 | /* infblock.h -- header to use infblock.c 2 | * Copyright (C) 1995-1998 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | struct inflate_blocks_state; 12 | typedef struct inflate_blocks_state FAR inflate_blocks_statef; 13 | 14 | extern inflate_blocks_statef * inflate_blocks_new OF(( 15 | z_streamp z, 16 | check_func c, /* check function */ 17 | uInt w)); /* window size */ 18 | 19 | extern int inflate_blocks OF(( 20 | inflate_blocks_statef *, 21 | z_streamp , 22 | int)); /* initial return code */ 23 | 24 | extern void inflate_blocks_reset OF(( 25 | inflate_blocks_statef *, 26 | z_streamp , 27 | uLongf *)); /* check value on output */ 28 | 29 | extern int inflate_blocks_free OF(( 30 | inflate_blocks_statef *, 31 | z_streamp)); 32 | 33 | extern void inflate_set_dictionary OF(( 34 | inflate_blocks_statef *s, 35 | const Bytef *d, /* dictionary */ 36 | uInt n)); /* dictionary length */ 37 | 38 | extern int inflate_blocks_sync_point OF(( 39 | inflate_blocks_statef *s)); 40 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.mac: -------------------------------------------------------------------------------- 1 | /* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ 23 | 24 | #define ALIGN_TYPE long /* Needed for 680x0 Macs */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define USE_CCOMMAND /* Command line reader for Macintosh */ 37 | #define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ 38 | 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | #undef PROGRESS_REPORT /* optional */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.manx: -------------------------------------------------------------------------------- 1 | /* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ 23 | 24 | #define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #define TWO_FILE_COMMANDLINE 37 | #define NEED_SIGNAL_CATCHER 38 | #undef DONT_USE_B_MODE 39 | #undef PROGRESS_REPORT /* optional */ 40 | 41 | #define signal_catcher _abort /* hack for Aztec C naming requirements */ 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SWTri_Loop.cpp: -------------------------------------------------------------------------------- 1 | // This file is included by SWTri.cpp and should not be built directly by the project. 2 | 3 | SWHelper::signed64 subTex = x0 - lx; 4 | unsigned int u, v, r, g, b, a; 5 | 6 | #if defined(MOD_ARGB) 7 | a = la + static_cast((da * subTex)>>16); 8 | r = lr + static_cast((dr * subTex)>>16); 9 | g = lg + static_cast((dg * subTex)>>16); 10 | b = lb + static_cast((db * subTex)>>16); 11 | #endif 12 | 13 | #if defined(TEXTURED) 14 | u = lu + static_cast((du * subTex)>>16); 15 | v = lv + static_cast((dv * subTex)>>16); 16 | #endif 17 | 18 | PTYPE * pix = fb + (x0>>16); 19 | int width = ((x1-x0)>>16); 20 | 21 | while(width-- > 0) 22 | { 23 | #include PIXEL_INCLUDE 24 | // if (bit_format == 0x888) PIXEL888() 25 | // if (bit_format == 0x565) PIXEL565() 26 | // if (bit_format == 0x555) PIXEL555() 27 | // if (bit_format == 0x8888) PIXEL8888() 28 | ++pix; 29 | #if defined(MOD_ARGB) 30 | a += da; 31 | r += dr; 32 | g += dg; 33 | b += db; 34 | #endif 35 | 36 | #if defined(TEXTURED) 37 | u += du; 38 | v += dv; 39 | #endif 40 | } 41 | 42 | lx += ldx; 43 | sx += sdx; 44 | fb += pitch; 45 | 46 | #if defined (MOD_ARGB) 47 | la += lda; 48 | lr += ldr; 49 | lg += ldg; 50 | lb += ldb; 51 | #endif 52 | 53 | #if defined (TEXTURED) 54 | lu += ldu; 55 | lv += ldv; 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated automatically by configure. */ 2 | /* jconfig.cfg --- source file edited by configure script */ 3 | /* see jconfig.doc for explanations */ 4 | 5 | #define HAVE_PROTOTYPES 6 | #define HAVE_UNSIGNED_CHAR 7 | #define HAVE_UNSIGNED_SHORT 8 | #undef CHAR_IS_UNSIGNED 9 | #define HAVE_STDDEF_H 10 | #define HAVE_STDLIB_H 11 | #undef NEED_BSD_STRINGS 12 | #undef NEED_SYS_TYPES_H 13 | #undef NEED_FAR_POINTERS 14 | #undef NEED_SHORT_EXTERNAL_NAMES 15 | /* Define this if you get warnings about undefined structures. */ 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | #define INLINE 22 | /* These are for configuring the JPEG memory manager. */ 23 | #undef DEFAULT_MAX_MEM 24 | #undef NO_MKTEMP 25 | 26 | #endif /* JPEG_INTERNALS */ 27 | 28 | #ifdef JPEG_CJPEG_DJPEG 29 | 30 | #define BMP_SUPPORTED /* BMP image file format */ 31 | #define GIF_SUPPORTED /* GIF image file format */ 32 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 33 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 34 | #define TARGA_SUPPORTED /* Targa image file format */ 35 | 36 | #undef TWO_FILE_COMMANDLINE 37 | #undef NEED_SIGNAL_CATCHER 38 | #undef DONT_USE_B_MODE 39 | 40 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 41 | #undef PROGRESS_REPORT 42 | 43 | #endif /* JPEG_CJPEG_DJPEG */ 44 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/rdgif.c: -------------------------------------------------------------------------------- 1 | /* 2 | * rdgif.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains routines to read input images in GIF format. 9 | * 10 | ***************************************************************************** 11 | * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * 12 | * the ability to read GIF files has been removed from the IJG distribution. * 13 | * Sorry about that. * 14 | ***************************************************************************** 15 | * 16 | * We are required to state that 17 | * "The Graphics Interchange Format(c) is the Copyright property of 18 | * CompuServe Incorporated. GIF(sm) is a Service Mark property of 19 | * CompuServe Incorporated." 20 | */ 21 | 22 | #include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ 23 | 24 | #ifdef GIF_SUPPORTED 25 | 26 | /* 27 | * The module selection routine for GIF format input. 28 | */ 29 | 30 | GLOBAL(cjpeg_source_ptr) 31 | jinit_read_gif (j_compress_ptr cinfo) 32 | { 33 | fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n"); 34 | exit(EXIT_FAILURE); 35 | return NULL; /* keep compiler happy */ 36 | } 37 | 38 | #endif /* GIF_SUPPORTED */ 39 | -------------------------------------------------------------------------------- /source/demos/properties/demo.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | true 14 | 15 | 16 | 17 | 18 | 19 | 20 | 1234 21 | 22 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | Text for Section2/Subsection/Item2 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SWTri_TexelARGB.cpp: -------------------------------------------------------------------------------- 1 | // This file is included by SWTri.cpp and should not be built directly by the project. 2 | { 3 | int premult; 4 | #if defined(MOD_ARGB) && defined(GLOBAL_ARGB) 5 | { 6 | premult = ((globalDiffuse.a*a)>>24); 7 | alpha = (alpha * premult) >> 8; 8 | tex = ((((tex&0xff0000)*((globalDiffuse.r*r)>>24))>>8)&0xff0000)| 9 | ((((tex&0x00ff00)*((globalDiffuse.g*g)>>24))>>8)&0x00ff00)| 10 | ((((tex&0x0000ff)*((globalDiffuse.b*b)>>24))>>8)&0x0000ff); 11 | } 12 | #elif !defined(MOD_ARGB) && defined(GLOBAL_ARGB) 13 | { 14 | premult = globalDiffuse.a; 15 | alpha = (alpha * premult) >> 8; 16 | tex = ((((tex&0xff0000)*globalDiffuse.r)>>8)&0xff0000)| 17 | ((((tex&0x00ff00)*globalDiffuse.g)>>8)&0x00ff00)| 18 | ((((tex&0x0000ff)*globalDiffuse.b)>>8)&0x0000ff); 19 | } 20 | #elif defined(MOD_ARGB) && !defined(GLOBAL_ARGB) 21 | { 22 | premult = a>>16; 23 | alpha = (alpha * premult) >> 8; 24 | tex = ((((tex&0xff0000)*(r>>16))>>8)&0xff0000)| 25 | ((((tex&0x00ff00)*(g>>16))>>8)&0x00ff00)| 26 | ((((tex&0x0000ff)*(b>>16))>>8)&0x0000ff); 27 | } 28 | #endif 29 | 30 | // linear blend expects pixel to already be premultiplied by alpha 31 | #if defined(LINEAR_BLEND) && (defined(MOD_ARGB) || defined(GLOBAL_ARGB)) 32 | { 33 | int r = (((tex&0xff0000)*premult)>>8)&0xff0000; 34 | int g = (((tex&0x00ff00)*premult)>>8)&0x00ff00; 35 | int b = (((tex&0x0000ff)*premult)>>8)&0x0000ff; 36 | tex = r|g|b; 37 | } 38 | #endif 39 | } -------------------------------------------------------------------------------- /source/SexyAppFramework/MusicInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef __MUSICINTERFACE_H__ 2 | #define __MUSICINTERFACE_H__ 3 | 4 | #include "Common.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class MusicInterface 10 | { 11 | public: 12 | 13 | public: 14 | MusicInterface(); 15 | virtual ~MusicInterface(); 16 | 17 | virtual bool LoadMusic(int theSongId, const std::string& theFileName); 18 | virtual void PlayMusic(int theSongId, int theOffset = 0, bool noLoop = false); 19 | virtual void StopMusic(int theSongId); 20 | virtual void PauseMusic(int theSongId); 21 | virtual void ResumeMusic(int theSongId); 22 | virtual void StopAllMusic(); 23 | 24 | virtual void UnloadMusic(int theSongId); 25 | virtual void UnloadAllMusic(); 26 | virtual void PauseAllMusic(); 27 | virtual void ResumeAllMusic(); 28 | 29 | virtual void FadeIn(int theSongId, int theOffset = -1, double theSpeed = 0.002, bool noLoop = false); 30 | virtual void FadeOut(int theSongId, bool stopSong = true, double theSpeed = 0.004); 31 | virtual void FadeOutAll(bool stopSong = true, double theSpeed = 0.004); 32 | virtual void SetSongVolume(int theSongId, double theVolume); 33 | virtual void SetSongMaxVolume(int theSongId, double theMaxVolume); 34 | virtual bool IsPlaying(int theSongId); 35 | 36 | virtual void SetVolume(double theVolume); 37 | virtual void SetMusicAmplify(int theSongId, double theAmp); 38 | virtual void Update(); 39 | }; 40 | 41 | } 42 | 43 | #endif //__MUSICINTERFACE_H__ 44 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/maktjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to jpegtran.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | jpegtran.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h) 30 | libjpeg.lib ; built by libjpeg.prj 31 | pcstdlib.lib ; standard library 32 | pcextlib.lib ; extended library 33 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Font.cpp: -------------------------------------------------------------------------------- 1 | #include "Font.h" 2 | #include "Image.h" 3 | 4 | using namespace Sexy; 5 | 6 | Font::Font() 7 | { 8 | mAscent = 0; 9 | mHeight = 0; 10 | mAscentPadding = 0; 11 | mLineSpacingOffset = 0; 12 | } 13 | 14 | Font::Font(const Font& theFont) : 15 | mAscent(theFont.mAscent), 16 | mHeight(theFont.mHeight), 17 | mAscentPadding(theFont.mAscentPadding), 18 | mLineSpacingOffset(theFont.mLineSpacingOffset) 19 | { 20 | } 21 | 22 | Font::~Font() 23 | { 24 | } 25 | 26 | int Font::GetAscent() 27 | { 28 | return mAscent; 29 | } 30 | 31 | int Font::GetAscentPadding() 32 | { 33 | return mAscentPadding; 34 | } 35 | 36 | int Font::GetDescent() 37 | { 38 | return mHeight - mAscent; 39 | } 40 | 41 | int Font::GetHeight() 42 | { 43 | return mHeight; 44 | } 45 | 46 | int Font::GetLineSpacingOffset() 47 | { 48 | return mLineSpacingOffset; 49 | } 50 | 51 | int Font::GetLineSpacing() 52 | { 53 | return mHeight + mLineSpacingOffset; 54 | } 55 | 56 | int Font::StringWidth(const SexyString& theString) 57 | { 58 | return 0; 59 | } 60 | 61 | int Font::CharWidth(SexyChar theChar) 62 | { 63 | SexyString aString(1, theChar); 64 | return StringWidth(aString); 65 | } 66 | 67 | int Font::CharWidthKern(SexyChar theChar, SexyChar thePrevChar) 68 | { 69 | return CharWidth(theChar); 70 | } 71 | 72 | void Font::DrawString(Graphics* g, int theX, int theY, const SexyString& theString, const Color& theColor, const Rect& theClipRect) 73 | { 74 | } 75 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.st: -------------------------------------------------------------------------------- 1 | /* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define ALIGN_TYPE long /* apparently double is a weird size? */ 23 | 24 | #endif /* JPEG_INTERNALS */ 25 | 26 | #ifdef JPEG_CJPEG_DJPEG 27 | 28 | #define BMP_SUPPORTED /* BMP image file format */ 29 | #define GIF_SUPPORTED /* GIF image file format */ 30 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 31 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 32 | #define TARGA_SUPPORTED /* Targa image file format */ 33 | 34 | #define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ 35 | /* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define 36 | * USE_SETMODE. Some Atari compilers require it, some do not. 37 | */ 38 | #define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ 39 | #undef DONT_USE_B_MODE 40 | #undef PROGRESS_REPORT /* optional */ 41 | 42 | #endif /* JPEG_CJPEG_DJPEG */ 43 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SoundManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __SOUNDMANAGER_H__ 2 | #define __SOUNDMANAGER_H__ 3 | 4 | #include 5 | #include "Common.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class SoundInstance; 11 | 12 | #define MAX_SOURCE_SOUNDS 256 13 | #define MAX_CHANNELS 32 14 | 15 | class SoundManager 16 | { 17 | public: 18 | SoundManager() {} 19 | virtual ~SoundManager() {} 20 | 21 | virtual bool Initialized() = NULL; 22 | 23 | virtual bool LoadSound(unsigned int theSfxID, const std::string& theFilename) = NULL; 24 | virtual int LoadSound(const std::string& theFilename) = NULL; 25 | virtual void ReleaseSound(unsigned int theSfxID) = NULL; 26 | 27 | virtual void SetVolume(double theVolume) = NULL; 28 | virtual bool SetBaseVolume(unsigned int theSfxID, double theBaseVolume) = NULL; 29 | virtual bool SetBasePan(unsigned int theSfxID, int theBasePan) = NULL; 30 | 31 | virtual SoundInstance* GetSoundInstance(unsigned int theSfxID) = NULL; 32 | 33 | virtual void ReleaseSounds() = NULL; 34 | virtual void ReleaseChannels() = NULL; 35 | 36 | virtual double GetMasterVolume() = NULL; 37 | virtual void SetMasterVolume(double theVolume) = NULL; 38 | 39 | virtual void Flush() = NULL; 40 | virtual void SetCooperativeWindow(HWND theHWnd, bool isWindowed) = NULL; 41 | virtual void StopAllSounds() = NULL; 42 | virtual int GetFreeSoundId() = NULL; 43 | virtual int GetNumSounds() = NULL; 44 | 45 | }; 46 | 47 | 48 | } 49 | 50 | #endif //__SOUNDMANAGER_H__ -------------------------------------------------------------------------------- /source/demos/Hun-garr/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // This demo will teach you: 9 | // * Using Hue, Saturation, Luminance values instead of RGB for color 10 | // * Custom cursors 11 | // * Handling loss/gain of application focus 12 | // * Basic particle effects 13 | // * Various programmatic effects/logic 14 | // * Putting most of the knowledge from the previous demos to work in a game 15 | // 16 | // IMPORTANT: Comments for topics covered in the previous demos will 17 | // be kept to a minimum and removed in most cases. You should read through 18 | // the previous demos to familiarize yourself with anything you don't 19 | // understand. All functions, variables, and concepts are explained 20 | // either in this demo, or in previous ones if they've already been covered. 21 | ////////////////////////////////////////////////////////////////////////// 22 | 23 | #include "GameApp.h" 24 | 25 | 26 | using namespace Sexy; 27 | 28 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 29 | { 30 | 31 | 32 | gHInstance = hInstance; 33 | 34 | GameApp* anApp = new GameApp(); 35 | anApp->Init(); 36 | anApp->Start(); 37 | 38 | delete anApp; 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /source/ImageLib/zlib/adler32.c: -------------------------------------------------------------------------------- 1 | /* adler32.c -- compute the Adler-32 checksum of a data stream 2 | * Copyright (C) 1995-1998 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id: adler32.c,v 1.1 2003/04/29 21:57:48 ace Exp $ */ 7 | 8 | #include "zlib.h" 9 | 10 | #define BASE 65521L /* largest prime smaller than 65536 */ 11 | #define NMAX 5552 12 | /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ 13 | 14 | #define DO1(buf,i) {s1 += buf[i]; s2 += s1;} 15 | #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); 16 | #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); 17 | #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); 18 | #define DO16(buf) DO8(buf,0); DO8(buf,8); 19 | 20 | /* ========================================================================= */ 21 | uLong ZEXPORT adler32(adler, buf, len) 22 | uLong adler; 23 | const Bytef *buf; 24 | uInt len; 25 | { 26 | unsigned long s1 = adler & 0xffff; 27 | unsigned long s2 = (adler >> 16) & 0xffff; 28 | int k; 29 | 30 | if (buf == Z_NULL) return 1L; 31 | 32 | while (len > 0) { 33 | k = len < NMAX ? len : NMAX; 34 | len -= k; 35 | while (k >= 16) { 36 | DO16(buf); 37 | buf += 16; 38 | k -= 16; 39 | } 40 | if (k != 0) do { 41 | s1 += *buf++; 42 | s2 += s1; 43 | } while (--k); 44 | s1 %= BASE; 45 | s2 %= BASE; 46 | } 47 | return (s2 << 16) | s1; 48 | } 49 | -------------------------------------------------------------------------------- /source/SexyAppFramework/DSoundInstance.h: -------------------------------------------------------------------------------- 1 | #ifndef __DSOUNDINSTANCE_H__ 2 | #define __DSOUNDINSTANCE_H__ 3 | 4 | #include "SoundInstance.h" 5 | #include "dsoundversion.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class DSoundManager; 11 | 12 | class DSoundInstance : public SoundInstance 13 | { 14 | friend class DSoundManager; 15 | 16 | protected: 17 | DSoundManager* mSoundManagerP; 18 | LPDIRECTSOUNDBUFFER mSourceSoundBuffer; 19 | LPDIRECTSOUNDBUFFER mSoundBuffer; 20 | bool mAutoRelease; 21 | bool mHasPlayed; 22 | bool mReleased; 23 | 24 | int mBasePan; 25 | double mBaseVolume; 26 | 27 | int mPan; 28 | double mVolume; 29 | 30 | DWORD mDefaultFrequency; 31 | 32 | protected: 33 | void RehupVolume(); 34 | void RehupPan(); 35 | 36 | public: 37 | DSoundInstance(DSoundManager* theSoundManager, LPDIRECTSOUNDBUFFER theSourceSound); 38 | virtual ~DSoundInstance(); 39 | virtual void Release(); 40 | 41 | virtual void SetBaseVolume(double theBaseVolume); 42 | virtual void SetBasePan(int theBasePan); 43 | 44 | virtual void SetVolume(double theVolume); 45 | virtual void SetPan(int thePosition); //-hundredth db to +hundredth db = left to right 46 | virtual void AdjustPitch(double theNumSteps); 47 | 48 | virtual bool Play(bool looping, bool autoRelease); 49 | virtual void Stop(); 50 | virtual bool IsPlaying(); 51 | virtual bool IsReleased(); 52 | virtual double GetVolume(); 53 | 54 | }; 55 | 56 | } 57 | 58 | #endif //__DSOUNDINSTANCE_H__ -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.vc: -------------------------------------------------------------------------------- 1 | /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | /* Define "boolean" as unsigned char, not int, per Windows custom */ 19 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ 20 | typedef unsigned char boolean; 21 | #endif 22 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ 23 | 24 | 25 | #ifdef JPEG_INTERNALS 26 | 27 | #undef RIGHT_SHIFT_IS_UNSIGNED 28 | 29 | #endif /* JPEG_INTERNALS */ 30 | 31 | #ifdef JPEG_CJPEG_DJPEG 32 | 33 | #define BMP_SUPPORTED /* BMP image file format */ 34 | #define GIF_SUPPORTED /* GIF image file format */ 35 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 36 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 37 | #define TARGA_SUPPORTED /* Targa image file format */ 38 | 39 | #define TWO_FILE_COMMANDLINE /* optional */ 40 | #define USE_SETMODE /* Microsoft has setmode() */ 41 | #undef NEED_SIGNAL_CATCHER 42 | #undef DONT_USE_B_MODE 43 | #undef PROGRESS_REPORT /* optional */ 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002, Xiph.org Foundation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | - Neither the name of the Xiph.org Foundation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 22 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Point.h: -------------------------------------------------------------------------------- 1 | #ifndef __POINT_H__ 2 | #define __POINT_H__ 3 | 4 | #include "Common.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | template class TPoint 10 | { 11 | public: 12 | _T mX; 13 | _T mY; 14 | 15 | public: 16 | TPoint(_T theX, _T theY) : 17 | mX(theX), 18 | mY(theY) 19 | { 20 | } 21 | 22 | TPoint(const TPoint<_T>& theTPoint) : 23 | mX(theTPoint.mX), 24 | mY(theTPoint.mY) 25 | { 26 | } 27 | 28 | TPoint() : 29 | mX(0), 30 | mY(0) 31 | { 32 | } 33 | 34 | inline bool operator==(const TPoint& p) 35 | { 36 | return ((p.mX == mX) && (p.mY == mY)); 37 | } 38 | 39 | inline bool operator!=(const TPoint& p) 40 | { 41 | return ((p.mX != mX) || (p.mY != mY)); 42 | } 43 | 44 | TPoint operator+(const TPoint& p) const {return TPoint(mX+p.mX, mY+p.mY);} 45 | TPoint operator-(const TPoint& p) const {return TPoint(mX-p.mX, mY-p.mY);} 46 | TPoint operator*(const TPoint& p) const {return TPoint(mX*p.mX, mY*p.mY);} 47 | TPoint operator/(const TPoint& p) const {return TPoint(mX/p.mX, mY/p.mY);} 48 | TPoint& operator+=(const TPoint& p) {mX+=p.mX; mY+=p.mY; return *this;} 49 | TPoint& operator-=(const TPoint& p) {mX-=p.mX; mY-=p.mY; return *this;} 50 | TPoint& operator*=(const TPoint& p) {mX*=p.mX; mY*=p.mY; return *this;} 51 | TPoint& operator/=(const TPoint& p) {mX/=p.mX; mY/=p.mY; return *this;} 52 | TPoint operator*(_T s) const {return TPoint(mX*s, mY*s);} 53 | TPoint operator/(_T s) const {return TPoint(mX/s, mY/s);} 54 | }; 55 | 56 | typedef TPoint Point; 57 | typedef TPoint FPoint; 58 | 59 | }; 60 | 61 | #endif //__POINT_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/registry.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: registry for time, floor, res backends and channel mappings 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _V_REG_H_ 19 | #define _V_REG_H_ 20 | 21 | #define VI_TRANSFORMB 1 22 | #define VI_WINDOWB 1 23 | #define VI_TIMEB 1 24 | #define VI_FLOORB 2 25 | #define VI_RESB 3 26 | #define VI_MAPB 1 27 | 28 | #include "backends.h" 29 | 30 | #if defined(_WIN32) && defined(VORBISDLL_IMPORT) 31 | # define EXTERN __declspec(dllimport) extern 32 | #else 33 | # define EXTERN extern 34 | #endif 35 | 36 | EXTERN vorbis_func_floor *_floor_P[]; 37 | EXTERN vorbis_func_residue *_residue_P[]; 38 | EXTERN vorbis_func_mapping *_mapping_P[]; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.bcc: -------------------------------------------------------------------------------- 1 | /* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #ifdef __MSDOS__ 15 | #define NEED_FAR_POINTERS /* for small or medium memory model */ 16 | #endif 17 | #undef NEED_SHORT_EXTERNAL_NAMES 18 | #undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | 24 | #ifdef __MSDOS__ 25 | #define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ 26 | #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ 27 | #define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ 28 | #endif 29 | 30 | #endif /* JPEG_INTERNALS */ 31 | 32 | #ifdef JPEG_CJPEG_DJPEG 33 | 34 | #define BMP_SUPPORTED /* BMP image file format */ 35 | #define GIF_SUPPORTED /* GIF image file format */ 36 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 37 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 38 | #define TARGA_SUPPORTED /* Targa image file format */ 39 | 40 | #define TWO_FILE_COMMANDLINE 41 | #define USE_SETMODE /* Borland has setmode() */ 42 | #ifdef __MSDOS__ 43 | #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ 44 | #endif 45 | #undef DONT_USE_B_MODE 46 | #undef PROGRESS_REPORT /* optional */ 47 | 48 | #endif /* JPEG_CJPEG_DJPEG */ 49 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Ratio.h: -------------------------------------------------------------------------------- 1 | #ifndef __RATIO_H__ 2 | #define __RATIO_H__ 3 | 4 | namespace Sexy 5 | { 6 | struct Ratio 7 | { 8 | Ratio(); 9 | Ratio(int theNumerator, int theDenominator); 10 | void Set(int theNumerator, int theDenominator); 11 | bool operator==(const Ratio& theRatio) const; 12 | bool operator!=(const Ratio& theRatio) const; 13 | bool operator<(const Ratio& theRatio) const; 14 | int operator*(int theInt) const; 15 | int operator/(int theInt) const; 16 | int mNumerator; 17 | int mDenominator; 18 | }; 19 | 20 | inline bool Ratio::operator==(const Ratio& theRatio) const 21 | { 22 | return mNumerator == theRatio.mNumerator && mDenominator == theRatio.mDenominator; 23 | } 24 | 25 | inline bool Ratio::operator!=(const Ratio& theRatio) const 26 | { 27 | return ! (*this == theRatio); 28 | } 29 | 30 | inline bool Ratio::operator<(const Ratio& theRatio) const 31 | { 32 | return (mNumerator*theRatio.mDenominator/mDenominator < theRatio.mNumerator) 33 | || (mNumerator < theRatio.mNumerator*mDenominator/theRatio.mDenominator); 34 | } 35 | 36 | inline int Ratio::operator*(int theInt) const 37 | { 38 | return theInt * mNumerator / mDenominator; 39 | } 40 | 41 | inline int Ratio::operator/(int theInt) const 42 | { 43 | return theInt * mDenominator / mNumerator; 44 | } 45 | 46 | inline int operator*(int theInt, const Ratio& theRatio) 47 | { 48 | return theInt * theRatio.mNumerator / theRatio.mDenominator; 49 | } 50 | 51 | inline int operator/(int theInt, const Ratio& theRatio) 52 | { 53 | return theInt * theRatio.mDenominator / theRatio.mNumerator; 54 | } 55 | 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/ansi2knr.1: -------------------------------------------------------------------------------- 1 | .TH ANSI2KNR 1 "19 Jan 1996" 2 | .SH NAME 3 | ansi2knr \- convert ANSI C to Kernighan & Ritchie C 4 | .SH SYNOPSIS 5 | .I ansi2knr 6 | [--varargs] input_file [output_file] 7 | .SH DESCRIPTION 8 | If no output_file is supplied, output goes to stdout. 9 | .br 10 | There are no error messages. 11 | .sp 12 | .I ansi2knr 13 | recognizes function definitions by seeing a non-keyword identifier at the left 14 | margin, followed by a left parenthesis, with a right parenthesis as the last 15 | character on the line, and with a left brace as the first token on the 16 | following line (ignoring possible intervening comments). It will recognize a 17 | multi-line header provided that no intervening line ends with a left or right 18 | brace or a semicolon. These algorithms ignore whitespace and comments, except 19 | that the function name must be the first thing on the line. 20 | .sp 21 | The following constructs will confuse it: 22 | .br 23 | - Any other construct that starts at the left margin and follows the 24 | above syntax (such as a macro or function call). 25 | .br 26 | - Some macros that tinker with the syntax of the function header. 27 | .sp 28 | The --varargs switch is obsolete, and is recognized only for 29 | backwards compatibility. The present version of 30 | .I ansi2knr 31 | will always attempt to convert a ... argument to va_alist and va_dcl. 32 | .SH AUTHOR 33 | L. Peter Deutsch wrote the original ansi2knr and 34 | continues to maintain the current version; most of the code in the current 35 | version is his work. ansi2knr also includes contributions by Francois 36 | Pinard and Jim Avera . 37 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Flags.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLAGS_H__ 2 | #define __FLAGS_H__ 3 | 4 | namespace Sexy 5 | { 6 | 7 | class FlagsMod 8 | { 9 | public: 10 | int mAddFlags; 11 | int mRemoveFlags; 12 | 13 | public: 14 | FlagsMod() 15 | { 16 | mAddFlags = 0; 17 | mRemoveFlags = 0; 18 | } 19 | }; 20 | 21 | inline void ModFlags(int& theFlags, const FlagsMod& theFlagMod) 22 | { 23 | theFlags = (theFlags | theFlagMod.mAddFlags) & ~theFlagMod.mRemoveFlags; 24 | } 25 | 26 | inline int GetModFlags(int theFlags, const FlagsMod& theFlagMod) 27 | { 28 | return (theFlags | theFlagMod.mAddFlags) & ~theFlagMod.mRemoveFlags; 29 | } 30 | 31 | class ModalFlags 32 | { 33 | public: 34 | int mOverFlags; 35 | int mUnderFlags; 36 | bool mIsOver; 37 | 38 | public: 39 | void ModFlags(const FlagsMod& theFlagsMod) 40 | { 41 | Sexy::ModFlags(mOverFlags, theFlagsMod); 42 | Sexy::ModFlags(mUnderFlags, theFlagsMod); 43 | } 44 | 45 | int GetFlags() 46 | { 47 | return mIsOver ? mOverFlags : mUnderFlags; 48 | } 49 | }; 50 | 51 | class AutoModalFlags 52 | { 53 | public: 54 | ModalFlags* mModalFlags; 55 | int mOldOverFlags; 56 | int mOldUnderFlags; 57 | 58 | public: 59 | AutoModalFlags(ModalFlags* theModalFlags, const FlagsMod& theFlagMod) 60 | { 61 | mModalFlags = theModalFlags; 62 | mOldOverFlags = theModalFlags->mOverFlags; 63 | mOldUnderFlags = theModalFlags->mUnderFlags; 64 | theModalFlags->ModFlags(theFlagMod); 65 | } 66 | 67 | ~AutoModalFlags() 68 | { 69 | mModalFlags->mOverFlags = mOldOverFlags; 70 | mModalFlags->mUnderFlags = mOldUnderFlags; 71 | } 72 | }; 73 | 74 | } 75 | 76 | #endif //__FLAGS_H__ 77 | -------------------------------------------------------------------------------- /source/demos/Demo3/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // This demo will teach you: 9 | // * Automatically detecting and enabling 3D mode 10 | // * Modifying image data/bits 11 | // * Stretching images 12 | // * Mirroring/flipping images 13 | // * Animation using image strips 14 | // * Widgets: buttons, listeners, basic events, mouse move/down/up/drag 15 | ////////////////////////////////////////////////////////////////////////// 16 | 17 | #include "GameApp.h" 18 | 19 | // The SexyAppFramework resides in the "Sexy" namespace. As a convenience, 20 | // you'll see in all the .cpp files "using namespace Sexy" to avoid 21 | // having to prefix everything with Sexy:: 22 | using namespace Sexy; 23 | 24 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 25 | { 26 | 27 | // Make sure to set this. Some classes, like the exception handler and custom cursors 28 | // will need to use it. 29 | gHInstance = hInstance; 30 | 31 | // Create and initialize our game application. 32 | GameApp* anApp = new GameApp(); 33 | anApp->Init(); 34 | 35 | // Starts the entire application: sets up the resource loading thread and 36 | // custom cursor thread, and enters the game loop where the application 37 | // will remain until it is shut down. You will most likely not need to 38 | // override this function. 39 | anApp->Start(); 40 | 41 | 42 | delete anApp; 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/mdct.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: modified discrete cosine transform prototypes 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _OGG_mdct_H_ 19 | #define _OGG_mdct_H_ 20 | 21 | #include "ivorbiscodec.h" 22 | #include "misc.h" 23 | 24 | #define DATA_TYPE ogg_int32_t 25 | #define REG_TYPE register ogg_int32_t 26 | 27 | #ifdef _LOW_ACCURACY_ 28 | #define cPI3_8 (0x0062) 29 | #define cPI2_8 (0x00b5) 30 | #define cPI1_8 (0x00ed) 31 | #else 32 | #define cPI3_8 (0x30fbc54d) 33 | #define cPI2_8 (0x5a82799a) 34 | #define cPI1_8 (0x7641af3d) 35 | #endif 36 | 37 | extern void mdct_forward(int n, DATA_TYPE *in, DATA_TYPE *out); 38 | extern void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out); 39 | 40 | #endif 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /source/demos/Demo2/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // This demo will teach you: 9 | // * Loading and displaying fonts 10 | // * Loading and displaying images 11 | // * Colorizing images 12 | // * Additive drawing 13 | // * Palletizing images to use less RAM (when possible) 14 | // * Loading/playing sounds 15 | // * Widget introduction: buttons, listeners, events, adding/removing 16 | ////////////////////////////////////////////////////////////////////////// 17 | 18 | #include "GameApp.h" 19 | 20 | // The SexyAppFramework resides in the "Sexy" namespace. As a convenience, 21 | // you'll see in all the .cpp files "using namespace Sexy" to avoid 22 | // having to prefix everything with Sexy:: 23 | using namespace Sexy; 24 | 25 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 26 | { 27 | 28 | // Make sure to set this. Some classes, like the exception handler and custom cursors 29 | // will need to use it. 30 | gHInstance = hInstance; 31 | 32 | // Create and initialize our game application. 33 | GameApp* anApp = new GameApp(); 34 | anApp->Init(); 35 | 36 | // Starts the entire application: sets up the resource loading thread and 37 | // custom cursor thread, and enters the game loop where the application 38 | // will remain until it is shut down. You will most likely not need to 39 | // override this function. 40 | anApp->Start(); 41 | 42 | 43 | delete anApp; 44 | 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /source/demos/Demo1/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // This demo will teach you: 9 | // * Setting app width/height 10 | // * Drawing primitives 11 | // * Changing colors 12 | // * Widget basics: Adding, removing, drawing, updating 13 | // * Standardized game logic frame rate 14 | // * Intro to the Init and resource loading methods 15 | // * Introduction to the structure and organization of a SexyAppBase game 16 | ////////////////////////////////////////////////////////////////////////// 17 | 18 | #include "GameApp.h" 19 | 20 | // The SexyAppFramework resides in the "Sexy" namespace. As a convenience, 21 | // you'll see in all the .cpp files "using namespace Sexy" to avoid 22 | // having to prefix everything with Sexy:: 23 | using namespace Sexy; 24 | 25 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 26 | { 27 | 28 | // Make sure to set this. Some classes, like the exception handler and custom cursors 29 | // will need to use it. 30 | gHInstance = hInstance; 31 | 32 | // Create and initialize our game application. 33 | GameApp* anApp = new GameApp(); 34 | anApp->Init(); 35 | 36 | // Starts the entire application: sets up the resource loading thread and 37 | // custom cursor thread, and enters the game loop where the application 38 | // will remain until it is shut down. You will most likely not need to 39 | // override this function. 40 | anApp->Start(); 41 | 42 | 43 | delete anApp; 44 | 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /Framework 1.21 Changes.md: -------------------------------------------------------------------------------- 1 | Framework 1.21 changes: 2 | 3 | Widgets are no longer removed from their container in WidgeContainer::RemovedFromManager. 4 | It's your responsibility to remove all widgets from a container before deleting the container. 5 | Widgets will assert if they have a parent or if they have haven children in their destructor. 6 | To assist you, there's a helper method WidgetContainer::RemoveAllWidgets(). 7 | 8 | Added LinearBlending for DrawImageMatrix/DrawImageTransform. 9 | Call Graphics::SetLinearBlend to enable/disable linear blending. 10 | 11 | Added good default faststretch and linear blend settings to WidgetManager drawing: 12 | aClipG.SetFastStretch(!is3D); 13 | aClipG.SetLinearBlend(is3D); 14 | 15 | Changed 3d test to not require "nvidia", "ati", or "radeon" in the name of the driver 16 | for recommending the video card if the video card driver's year is >= 2002. 17 | 18 | Changed Dialog::mYesButton and Dialog::mNoButton to Dialog::ID_YES and Dialog::ID_NO 19 | (1000 and 1001) to avoid conflict with user defined buttons. 20 | 21 | Various bug fixes 22 | 23 | ------------------------------------------------------------------------------------ 24 | Debug key (ctrl-alt-d) changes: 25 | F2 - Start/Stop Perf Timing 26 | 27 | F3 - toggle framerate display 28 | Shift F3 - toggle framerate/mouse coord display 29 | 30 | F8 - Show current Video Stats (mostly used to see if 3d is currently on) 31 | Shift F8 - Toggle 3d mode 32 | 33 | F10 - Single Step Program (show one frame at a time) 34 | Shift F10 - Stop single steping 35 | Ctrl F10 - Toggle Slow Motion 36 | 37 | F11 - Take Screenshot (goes into the _screenshots) directory 38 | Shift F11 - Dump all program images in memory to the _dump directory 39 | ------------------------------------------------------------------------------------ 40 | 41 | -------------------------------------------------------------------------------- /source/ImageLib/zlib/descrip.mms: -------------------------------------------------------------------------------- 1 | # descrip.mms: MMS description file for building zlib on VMS 2 | # written by Martin P.J. Zinser 3 | 4 | cc_defs = 5 | c_deb = 6 | 7 | .ifdef __DECC__ 8 | pref = /prefix=all 9 | .endif 10 | 11 | OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ 12 | deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ 13 | inftrees.obj, infcodes.obj, infutil.obj, inffast.obj 14 | 15 | CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) 16 | 17 | all : example.exe minigzip.exe 18 | @ write sys$output " Example applications available" 19 | libz.olb : libz.olb($(OBJS)) 20 | @ write sys$output " libz available" 21 | 22 | example.exe : example.obj libz.olb 23 | link example,libz.olb/lib 24 | 25 | minigzip.exe : minigzip.obj libz.olb 26 | link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib 27 | 28 | clean : 29 | delete *.obj;*,libz.olb;* 30 | 31 | 32 | # Other dependencies. 33 | adler32.obj : zutil.h zlib.h zconf.h 34 | compress.obj : zlib.h zconf.h 35 | crc32.obj : zutil.h zlib.h zconf.h 36 | deflate.obj : deflate.h zutil.h zlib.h zconf.h 37 | example.obj : zlib.h zconf.h 38 | gzio.obj : zutil.h zlib.h zconf.h 39 | infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h 40 | infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h 41 | inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h 42 | inflate.obj : zutil.h zlib.h zconf.h infblock.h 43 | inftrees.obj : zutil.h zlib.h zconf.h inftrees.h 44 | infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h 45 | minigzip.obj : zlib.h zconf.h 46 | trees.obj : deflate.h zutil.h zlib.h zconf.h 47 | uncompr.obj : zlib.h zconf.h 48 | zutil.obj : zutil.h zlib.h zconf.h 49 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jchuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jchuff.h 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for Huffman entropy encoding routines 9 | * that are shared between the sequential encoder (jchuff.c) and the 10 | * progressive encoder (jcphuff.c). No other modules need to see these. 11 | */ 12 | 13 | /* The legal range of a DCT coefficient is 14 | * -1024 .. +1023 for 8-bit data; 15 | * -16384 .. +16383 for 12-bit data. 16 | * Hence the magnitude should always fit in 10 or 14 bits respectively. 17 | */ 18 | 19 | #if BITS_IN_JSAMPLE == 8 20 | #define MAX_COEF_BITS 10 21 | #else 22 | #define MAX_COEF_BITS 14 23 | #endif 24 | 25 | /* Derived data constructed for each Huffman table */ 26 | 27 | typedef struct { 28 | unsigned int ehufco[256]; /* code for each symbol */ 29 | char ehufsi[256]; /* length of code for each symbol */ 30 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ 31 | } c_derived_tbl; 32 | 33 | /* Short forms of external names for systems with brain-damaged linkers. */ 34 | 35 | #ifdef NEED_SHORT_EXTERNAL_NAMES 36 | #define jpeg_make_c_derived_tbl jMkCDerived 37 | #define jpeg_gen_optimal_table jGenOptTbl 38 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 39 | 40 | /* Expand a Huffman table definition into the derived format */ 41 | EXTERN(void) jpeg_make_c_derived_tbl 42 | JPP((j_compress_ptr cinfo, boolean isDC, int tblno, 43 | c_derived_tbl ** pdtbl)); 44 | 45 | /* Generate an optimal table definition given the specified counts */ 46 | EXTERN(void) jpeg_gen_optimal_table 47 | JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); 48 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/rdjpgcom.1: -------------------------------------------------------------------------------- 1 | .TH RDJPGCOM 1 "11 October 1997" 2 | .SH NAME 3 | rdjpgcom \- display text comments from a JPEG file 4 | .SH SYNOPSIS 5 | .B rdjpgcom 6 | [ 7 | .B \-verbose 8 | ] 9 | [ 10 | .I filename 11 | ] 12 | .LP 13 | .SH DESCRIPTION 14 | .LP 15 | .B rdjpgcom 16 | reads the named JPEG/JFIF file, or the standard input if no file is named, 17 | and prints any text comments found in the file on the standard output. 18 | .PP 19 | The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. 20 | Although the standard doesn't actually define what COM blocks are for, they 21 | are widely used to hold user-supplied text strings. This lets you add 22 | annotations, titles, index terms, etc to your JPEG files, and later retrieve 23 | them as text. COM blocks do not interfere with the image stored in the JPEG 24 | file. The maximum size of a COM block is 64K, but you can have as many of 25 | them as you like in one JPEG file. 26 | .SH OPTIONS 27 | .TP 28 | .B \-verbose 29 | Causes 30 | .B rdjpgcom 31 | to also display the JPEG image dimensions. 32 | .PP 33 | Switch names may be abbreviated, and are not case sensitive. 34 | .SH HINTS 35 | .B rdjpgcom 36 | does not depend on the IJG JPEG library. Its source code is intended as an 37 | illustration of the minimum amount of code required to parse a JPEG file 38 | header correctly. 39 | .PP 40 | In 41 | .B \-verbose 42 | mode, 43 | .B rdjpgcom 44 | will also attempt to print the contents of any "APP12" markers as text. 45 | Some digital cameras produce APP12 markers containing useful textual 46 | information. If you like, you can modify the source code to print 47 | other APPn marker types as well. 48 | .SH SEE ALSO 49 | .BR cjpeg (1), 50 | .BR djpeg (1), 51 | .BR jpegtran (1), 52 | .BR wrjpgcom (1) 53 | .SH AUTHOR 54 | Independent JPEG Group 55 | -------------------------------------------------------------------------------- /source/SexyAppFramework/MusicInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "MusicInterface.h" 2 | #include "SexyAppBase.h" 3 | 4 | using namespace Sexy; 5 | 6 | MusicInterface::MusicInterface() 7 | { 8 | } 9 | 10 | MusicInterface::~MusicInterface() 11 | { 12 | } 13 | 14 | bool MusicInterface::LoadMusic(int theSongId, const std::string& theFileName) 15 | { 16 | return false; 17 | } 18 | 19 | void MusicInterface::PlayMusic(int theSongId, int theOffset, bool noLoop) 20 | { 21 | } 22 | 23 | void MusicInterface::StopMusic(int theSongId) 24 | { 25 | } 26 | 27 | void MusicInterface::PauseMusic(int theSongId) 28 | { 29 | } 30 | 31 | void MusicInterface::ResumeMusic(int theSongId) 32 | { 33 | } 34 | 35 | void MusicInterface::StopAllMusic() 36 | { 37 | } 38 | 39 | void MusicInterface::UnloadMusic(int theSongId) 40 | { 41 | } 42 | 43 | void MusicInterface::UnloadAllMusic() 44 | { 45 | } 46 | 47 | void MusicInterface::PauseAllMusic() 48 | { 49 | } 50 | 51 | void MusicInterface::ResumeAllMusic() 52 | { 53 | } 54 | 55 | void MusicInterface::FadeIn(int theSongId, int theOffset, double theSpeed, bool noLoop) 56 | { 57 | } 58 | 59 | void MusicInterface::FadeOut(int theSongId, bool stopSong, double theSpeed) 60 | { 61 | } 62 | 63 | void MusicInterface::FadeOutAll(bool stopSong, double theSpeed) 64 | { 65 | } 66 | 67 | void MusicInterface::SetSongVolume(int theSongId, double theVolume) 68 | { 69 | } 70 | 71 | void MusicInterface::SetSongMaxVolume(int theSongId, double theMaxVolume) 72 | { 73 | } 74 | 75 | bool MusicInterface::IsPlaying(int theSongId) 76 | { 77 | return false; 78 | } 79 | 80 | void MusicInterface::SetVolume(double theVolume) 81 | { 82 | } 83 | 84 | void MusicInterface::SetMusicAmplify(int theSongId, double theAmp) 85 | { 86 | } 87 | 88 | void MusicInterface::Update() 89 | { 90 | } 91 | -------------------------------------------------------------------------------- /source/demos/Demo4/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // This demo will teach you: 9 | // * Using the resource manager 10 | // * Title screen with progress bar 11 | // * Loading/playing music 12 | // * Playing sounds with pitch and panning values changed 13 | // * smooth motion with UpdateF 14 | // * Reading/writing to files/registry 15 | // * Getting command line switches 16 | // * Widgets: Hyperlink widget, edit widget, checkbox, list, scrollbars, safedeletewidget 17 | ////////////////////////////////////////////////////////////////////////// 18 | 19 | #include "GameApp.h" 20 | 21 | // The SexyAppFramework resides in the "Sexy" namespace. As a convenience, 22 | // you'll see in all the .cpp files "using namespace Sexy" to avoid 23 | // having to prefix everything with Sexy:: 24 | using namespace Sexy; 25 | 26 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 27 | { 28 | 29 | // Make sure to set this. Some classes, like the exception handler and custom cursors 30 | // will need to use it. 31 | gHInstance = hInstance; 32 | 33 | // Create and initialize our game application. 34 | GameApp* anApp = new GameApp(); 35 | anApp->Init(); 36 | 37 | // Starts the entire application: sets up the resource loading thread and 38 | // custom cursor thread, and enters the game loop where the application 39 | // will remain until it is shut down. You will most likely not need to 40 | // override this function. 41 | anApp->Start(); 42 | 43 | 44 | delete anApp; 45 | 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SWTri_Pixel888.cpp: -------------------------------------------------------------------------------- 1 | // This file is included by SWTri.cpp and should not be built directly by the project. 2 | 3 | #if defined(TEXTURED) 4 | { 5 | #include "SWTri_GetTexel.cpp" 6 | 7 | if (alpha > 0x08) 8 | { 9 | #include "SWTri_TexelARGB.cpp" 10 | 11 | #if defined(GLOBAL_ARGB) || defined (TEX_ALPHA) || defined(MOD_ARGB) 12 | { 13 | if (alpha < 0xf0) 14 | { 15 | unsigned int trb, tg; 16 | #if !defined(LINEAR_BLEND) 17 | { 18 | trb = (((tex&0xff00ff) * alpha) >> 8) & 0xff00ff; 19 | tg = (((tex&0x00ff00) * alpha) >> 8) & 0x00ff00; 20 | } 21 | #else 22 | { 23 | trb = tex&0xff00ff; 24 | tg = tex&0x00ff00; 25 | } 26 | #endif 27 | 28 | tex = *pix; 29 | alpha = 0xff - alpha; 30 | unsigned int prb = (((tex&0xff00ff) * alpha) >> 8) & 0xff00ff; 31 | unsigned int pg = (((tex&0x00ff00) * alpha) >> 8) & 0x00ff00; 32 | *pix = 0xFF000000 | ((trb|tg) + (prb|pg)); 33 | } 34 | else 35 | { 36 | *pix = 0xFF000000 | tex; 37 | } 38 | } 39 | #else 40 | { 41 | *pix = 0xFF000000 | tex; 42 | } 43 | #endif 44 | } 45 | } 46 | #elif defined(MOD_ARGB) 47 | { 48 | if (a > 0xf00000) 49 | { 50 | *pix = 0xFF000000 | ((r)&0xff0000)|((g>>8)&0xff00)|((b>>16)&0xff); 51 | } 52 | else if (a > 0x080000) 53 | { 54 | unsigned int alpha = a >> 16; 55 | unsigned int _rb = ((((r&0xff0000) | (b>>16)) * alpha)>> 8)&0xff00ff; 56 | unsigned int _g = (((g&0xff0000) * alpha)>>16)&0x00ff00; 57 | unsigned int p = *pix; 58 | alpha = 0xff - alpha; 59 | unsigned int prb = (((p&0xff00ff) * alpha) >> 8) & 0xff00ff; 60 | unsigned int pg = (((p&0x00ff00) * alpha) >> 8) & 0x00ff00; 61 | *pix = 0xFF000000 | (_rb|_g)+(prb|pg); 62 | } 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /INSTALLATION NOTES.md: -------------------------------------------------------------------------------- 1 | The most common reason why the demos and source fail to build are due to the lack 2 | of required software to build them. Ensure that you have the following before building: 3 | 4 | * The microsoft DirectX SDK (not just the runtime). 5 | http://www.microsoft.com/directx 6 | 7 | * The Windows Platform SDK (VS2005 Express does NOT include this by default but Pro does). 8 | http://www.microsoft.com/downloads/details.aspx?FamilyId=484269E2-3B89-47E3-8EB7-1F2BE6D7123A&displaylang=en 9 | Do not be alarmed by the title "Windows Server 2003 SP1 Platform SDK Web Install". 10 | This allows you to develop for not just Windows Server 2003 but Windows XP/x64/etc. 11 | 12 | You will then need to manually add the paths for the Platform SDK to your search paths in 13 | Visual Studio: 14 | 15 | Go to Tools->Options->Projects And Solutions->VC++ Directories 16 | Add the paths to the appropriate subsection: 17 | 18 | Executable files - C:\Program Files\Microsoft SDK\Bin 19 | Include files - C:\Program Files\Microsoft SDK\include 20 | Library files - C:\Program Files\Microsoft SDK\lib 21 | 22 | 23 | * If you are using Visual Studio 2005 Express, make sure you add these additional libraries to your 24 | Linker's include settings: gdi32.lib advapi32.lib shell32.lib 25 | 26 | * If you are making your own projects and are getting errors that look something like this: 27 | Linking... 28 | LIBCMTD.lib(tolower.obj) : error LNK2005: __tolower already defined in LIBCD.lib(tolower.obj) 29 | LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in LIBCD.lib(tolower.obj) 30 | LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library 31 | Debug/Temp.exe : fatal error LNK1169: one or more multiply defined symbols found 32 | Error executing link.exe. 33 | 34 | then you need to add LIBCD to the ignored default libraries for debug mode and LIBC for release. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PopCap Games Framework 2 | 3 | ![PopCap Trademark](./popcap.jpg) 4 | 5 | ## Where am I 6 | 7 | This is an archive of PopCap's framework, internally named SexyApp Framework. 8 | 9 | Branch `main` has the version that seems to be the closest to what was used for developing Peggle Deluxe and Peggle Nights. 10 | 11 | Branch `1.34` has the most up-to-date known version, taken from https://github.com/LolHacksRule/sexy. 12 | 13 | ## What is this 14 | 15 | **PopCap Games Framework** (officially named **SexyApp Framework**) is the name of a computer game development kit for **C++**, released by PopCap Games. It is designed to let programmers easily and quickly create "PopCap-style" games, and is part of their developer program that encourages game creators to distribute their finished games through PopCap Games. The PopCap Games Framework is licensed under a proprietary free license. The PopCap framework powers casual games such as PopCap's own *Bejeweled* and Sandlot Games' *Cake Mania*. The framework only officially runs on Microsoft Windows, although some games have been ported to Mac using proprietary conversions of the framework. 16 | 17 | - [Wikipedia](https://en.wikipedia.org/w/index.php?title=PopCap_Games&oldid=866697177) 18 | 19 | The name comes from the company's history. PopCap Games was founded by John Vechey, Brian Fiete and Jason Kapalka in 2000. They originally incorporated as 'Sexy Action Cool', a phrase taken from a poster of Desperado. Their first title was a strip poker game called 'Foxy Poker' and was supposed to serve as a revenue stream for their future titles. 20 | 21 | - [Wikipedia](https://en.wikipedia.org/wiki/PopCap_Games) 22 | 23 | ## What is happening 24 | 25 | This repo is used as reference material for modding Peggle. 26 | 27 | ## Aaaaa 28 | 29 | For original licensing information, see PopCap Framework License and Other Licenses. 30 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/jconfig.mc6: -------------------------------------------------------------------------------- 1 | /* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #define NEED_FAR_POINTERS /* for small or medium memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | #ifdef JPEG_INTERNALS 19 | 20 | #undef RIGHT_SHIFT_IS_UNSIGNED 21 | 22 | #define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ 23 | 24 | #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ 25 | 26 | #define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ 27 | 28 | #define NEED_FHEAPMIN /* far heap management routines are broken */ 29 | 30 | #define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ 31 | /* Note: the above define is known to improve the code with Microsoft C 6.00A. 32 | * I do not know whether it is good for later compiler versions. 33 | * Please report any info on this point to jpeg-info@uunet.uu.net. 34 | */ 35 | 36 | #endif /* JPEG_INTERNALS */ 37 | 38 | #ifdef JPEG_CJPEG_DJPEG 39 | 40 | #define BMP_SUPPORTED /* BMP image file format */ 41 | #define GIF_SUPPORTED /* GIF image file format */ 42 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 43 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 44 | #define TARGA_SUPPORTED /* Targa image file format */ 45 | 46 | #define TWO_FILE_COMMANDLINE 47 | #define USE_SETMODE /* Microsoft has setmode() */ 48 | #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ 49 | #undef DONT_USE_B_MODE 50 | #undef PROGRESS_REPORT /* optional */ 51 | 52 | #endif /* JPEG_CJPEG_DJPEG */ 53 | -------------------------------------------------------------------------------- /source/demos/Demo5/main.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // main.cpp 3 | // 4 | // This is the starting point for all new projects. This file's purpose is 5 | // pretty small, but important. In here we create our application, initialize 6 | // it, and begin processing all the game code. 7 | // 8 | // This demo will teach you: 9 | // * Drawing differently if 3D or 2D 10 | // * Using Translate instead of using XYs 11 | // * Keyboard input, setting focus 12 | // * Widgets: Dialog box, sliders, an options dialog box 13 | // * Advanced widget topics: mClip, using Layout_ flags, using images 14 | // * Making an options dialog box and controlling fullscreen, volumes, 15 | // 3D settings. 16 | // * Parallax scrolling 17 | // * Random numbers 18 | // * Catching memory leaks 19 | // * Profiling 20 | ////////////////////////////////////////////////////////////////////////// 21 | 22 | #include "GameApp.h" 23 | 24 | // The SexyAppFramework resides in the "Sexy" namespace. As a convenience, 25 | // you'll see in all the .cpp files "using namespace Sexy" to avoid 26 | // having to prefix everything with Sexy:: 27 | using namespace Sexy; 28 | 29 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 30 | { 31 | 32 | // Make sure to set this. Some classes, like the exception handler and custom cursors 33 | // will need to use it. 34 | gHInstance = hInstance; 35 | 36 | // Create and initialize our game application. 37 | GameApp* anApp = new GameApp(); 38 | anApp->Init(); 39 | 40 | // Starts the entire application: sets up the resource loading thread and 41 | // custom cursor thread, and enters the game loop where the application 42 | // will remain until it is shut down. You will most likely not need to 43 | // override this function. 44 | anApp->Start(); 45 | 46 | 47 | delete anApp; 48 | 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/makcjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to cjpeg.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | cjpeg.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 30 | rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 31 | rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 32 | rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 33 | rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 34 | libjpeg.lib ; built by libjpeg.prj 35 | pcfltlib.lib ; floating point library 36 | ; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED 37 | pcstdlib.lib ; standard library 38 | pcextlib.lib ; extended library 39 | -------------------------------------------------------------------------------- /source/ImageLib/jpeg/makdjpeg.st: -------------------------------------------------------------------------------- 1 | ; Project file for Independent JPEG Group's software 2 | ; 3 | ; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. 4 | ; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), 5 | ; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), 6 | ; and Guido Vollbeding (guivol@esc.de). 7 | ; 8 | ; To use this file, rename it to djpeg.prj. 9 | ; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." 10 | ; Read installation instructions before trying to make the program! 11 | ; 12 | ; 13 | ; * * * Output file * * * 14 | djpeg.ttp 15 | ; 16 | ; * * * COMPILER OPTIONS * * * 17 | .C[-P] ; absolute calls 18 | .C[-M] ; and no string merging, folks 19 | .C[-w-cln] ; no "constant is long" warnings 20 | .C[-w-par] ; no "parameter xxxx unused" 21 | .C[-w-rch] ; no "unreachable code" 22 | .C[-wsig] ; warn if significant digits may be lost 23 | = 24 | ; * * * * List of modules * * * * 25 | pcstart.o 26 | djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) 27 | cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 28 | rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 29 | wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 30 | wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 31 | wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 32 | wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 33 | wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) 34 | libjpeg.lib ; built by libjpeg.prj 35 | pcfltlib.lib ; floating point library 36 | ; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED 37 | pcstdlib.lib ; standard library 38 | pcextlib.lib ; extended library 39 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/registry.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: registry for floor, res backends and channel mappings 15 | 16 | ********************************************************************/ 17 | 18 | #include "ivorbiscodec.h" 19 | #include "codec_internal.h" 20 | #include "registry.h" 21 | #include "misc.h" 22 | 23 | 24 | /* seems like major overkill now; the backend numbers will grow into 25 | the infrastructure soon enough */ 26 | 27 | extern vorbis_func_floor floor0_exportbundle; 28 | extern vorbis_func_floor floor1_exportbundle; 29 | extern vorbis_func_residue residue0_exportbundle; 30 | extern vorbis_func_residue residue1_exportbundle; 31 | extern vorbis_func_residue residue2_exportbundle; 32 | extern vorbis_func_mapping mapping0_exportbundle; 33 | 34 | vorbis_func_floor *_floor_P[]={ 35 | &floor0_exportbundle, 36 | &floor1_exportbundle, 37 | }; 38 | 39 | vorbis_func_residue *_residue_P[]={ 40 | &residue0_exportbundle, 41 | &residue1_exportbundle, 42 | &residue2_exportbundle, 43 | }; 44 | 45 | vorbis_func_mapping *_mapping_P[]={ 46 | &mapping0_exportbundle, 47 | }; 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SWTri_Pixel565.cpp: -------------------------------------------------------------------------------- 1 | // This file is included by SWTri.cpp and should not be built directly by the project. 2 | 3 | #if defined(TEXTURED) 4 | { 5 | #include "SWTri_GetTexel.cpp" 6 | 7 | if (alpha > 0x08) 8 | { 9 | #include "SWTri_TexelARGB.cpp" 10 | 11 | #if defined(GLOBAL_ARGB) || defined (TEX_ALPHA) || defined(MOD_ARGB) 12 | { 13 | if (alpha < 0xf0) 14 | { 15 | unsigned int trb, tg; 16 | #if !defined(LINEAR_BLEND) 17 | { 18 | trb = (((tex&0xff00ff) * alpha) >> 8) & 0xff00ff; 19 | tg = (((tex&0x00ff00) * alpha) >> 8) & 0x00ff00; 20 | } 21 | #else 22 | { 23 | trb = tex&0xff00ff; 24 | tg = tex&0x00ff00; 25 | } 26 | #endif 27 | 28 | trb = ((trb>>8)&0xf800)|((trb>>3)&0x001f); 29 | tg = ((tg>>5)&0x07e0); 30 | tex = *pix; 31 | alpha = (0xff - alpha)>>3; 32 | unsigned int prb = (((tex&0xf81f) * alpha) >> 5) & 0xf81f; 33 | unsigned int pg = (((tex&0x07e0) * alpha) >> 5) & 0x07e0; 34 | *pix = (trb|tg) + (prb|pg); 35 | } 36 | else 37 | { 38 | *pix = ((tex>>8)&0xf800)|((tex>>5)&0x07e0)|((tex>>3)&0x001f); 39 | } 40 | } 41 | #else 42 | { 43 | *pix = ((tex>>8)&0xf800)|((tex>>5)&0x07e0)|((tex>>3)&0x001f); 44 | } 45 | #endif 46 | } 47 | } 48 | #elif defined(MOD_ARGB) 49 | { 50 | if (a > 0xf00000) 51 | { 52 | *pix = ((r>>8)&0xf800)|((g>>13)&0x07e0)|((b>>19)&0x001f); 53 | } 54 | else if (a > 0x080000) 55 | { 56 | unsigned int alpha = a >> 16; 57 | unsigned int _rb = ((((r&0xff0000) | (b>>16)) * alpha)>> 8)&0xff00ff; 58 | unsigned int _g = (((g&0xff0000) * alpha)>>16)&0x00ff00; 59 | _rb = ((_rb>>8)&0xf800)|((_rb>>3)&0x001f); 60 | _g = ((_g>>5)&0x07e0); 61 | unsigned int p = *pix; 62 | alpha = (0xff - alpha)>>3; 63 | unsigned int prb = (((p&0xf81f) * alpha) >> 5) & 0xf81f; 64 | unsigned int pg = (((p&0x07e0) * alpha) >> 5) & 0x07e0; 65 | *pix = (_rb|_g)+(prb|pg); 66 | } 67 | } 68 | #endif 69 | -------------------------------------------------------------------------------- /source/SexyAppFramework/SWTri_Pixel555.cpp: -------------------------------------------------------------------------------- 1 | // This file is included by SWTri.cpp and should not be built directly by the project. 2 | 3 | #if defined(TEXTURED) 4 | { 5 | #include "SWTri_GetTexel.cpp" 6 | 7 | if (alpha > 0x08) 8 | { 9 | #include "SWTri_TexelARGB.cpp" 10 | 11 | #if defined(GLOBAL_ARGB) || defined (TEX_ALPHA) || defined(MOD_ARGB) 12 | { 13 | if (alpha < 0xf0) 14 | { 15 | unsigned int trb, tg; 16 | #if !defined(LINEAR_BLEND) 17 | { 18 | trb = (((tex&0xff00ff) * alpha) >> 8) & 0xff00ff; 19 | tg = (((tex&0x00ff00) * alpha) >> 8) & 0x00ff00; 20 | } 21 | #else 22 | { 23 | trb = tex&0xff00ff; 24 | tg = tex&0x00ff00; 25 | } 26 | #endif 27 | 28 | trb = ((trb>>9)&0x7c00)|((trb>>3)&0x001f); 29 | tg = ((tg>>6)&0x03e0); 30 | tex = *pix; 31 | alpha = (0xff - alpha)>>3; 32 | unsigned int prb = (((tex&0x7c1f) * alpha) >> 5) & 0x7c1f; 33 | unsigned int pg = (((tex&0x03e0) * alpha) >> 5) & 0x03e0; 34 | *pix = (trb|tg) + (prb|pg); 35 | } 36 | else 37 | { 38 | *pix = ((tex>>9)&0x7c00)|((tex>>6)&0x03e0)|((tex>>3)&0x001f); 39 | } 40 | } 41 | #else 42 | { 43 | *pix = ((tex>>9)&0x7c00)|((tex>>6)&0x03e0)|((tex>>3)&0x001f); 44 | } 45 | #endif 46 | } 47 | } 48 | #elif defined(MOD_ARGB) 49 | { 50 | if (a > 0xf00000) 51 | { 52 | *pix = ((r>>9)&0x7c00)|((g>>14)&0x03e0)|((b>>19)&0x001f); 53 | } 54 | else if (a > 0x080000) 55 | { 56 | unsigned int alpha = a >> 16; 57 | unsigned int _rb = ((((r&0xff0000) | (b>>16)) * alpha)>> 8)&0xff00ff; 58 | unsigned int _g = (((g&0xff0000) * alpha)>>16)&0x00ff00; 59 | _rb = ((_rb>>9)&0x7c00)|((_rb>>3)&0x001f); 60 | _g = ((_g>>6)&0x03e0); 61 | unsigned int p = *pix; 62 | alpha = (0xff - alpha)>>3; 63 | unsigned int prb = (((p&0x7c1f) * alpha) >> 5) & 0x7c1f; 64 | unsigned int pg = (((p&0x03e0) * alpha) >> 5) & 0x03e0; 65 | *pix = (_rb|_g)+(prb|pg); 66 | } 67 | } 68 | #endif 69 | 70 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Buffer.h: -------------------------------------------------------------------------------- 1 | #ifndef __BUFFER_H__ 2 | #define __BUFFER_H__ 3 | 4 | #include 5 | #include "Common.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | typedef std::vector ByteVector; 11 | 12 | class Buffer 13 | { 14 | public: 15 | ByteVector mData; 16 | int mDataBitSize; 17 | mutable int mReadBitPos; 18 | mutable int mWriteBitPos; 19 | 20 | public: 21 | Buffer(); 22 | virtual ~Buffer(); 23 | 24 | void SeekFront() const; 25 | void Clear(); 26 | 27 | void FromWebString(const std::string& theString); 28 | void WriteByte(uchar theByte); 29 | void WriteNumBits(int theNum, int theBits); 30 | static int GetBitsRequired(int theNum, bool isSigned); 31 | void WriteBoolean(bool theBool); 32 | void WriteShort(short theShort); 33 | void WriteLong(long theLong); 34 | void WriteString(const std::string& theString); 35 | void WriteUTF8String(const std::wstring& theString); 36 | void WriteLine(const std::string& theString); 37 | void WriteBuffer(const ByteVector& theBuffer); 38 | void WriteBytes(const uchar* theByte, int theCount); 39 | void SetData(const ByteVector& theBuffer); 40 | void SetData(uchar* thePtr, int theCount); 41 | 42 | std::string ToWebString() const; 43 | std::wstring UTF8ToWideString() const; 44 | uchar ReadByte() const; 45 | int ReadNumBits(int theBits, bool isSigned) const; 46 | bool ReadBoolean() const; 47 | short ReadShort() const; 48 | long ReadLong() const; 49 | std::string ReadString() const; 50 | std::wstring ReadUTF8String() const; 51 | std::string ReadLine() const; 52 | void ReadBytes(uchar* theData, int theLen) const; 53 | void ReadBuffer(ByteVector* theByteVector) const; 54 | 55 | const uchar* GetDataPtr() const; 56 | int GetDataLen() const; 57 | int GetDataLenBits() const; 58 | ulong GetCRC32(ulong theSeed = 0) const; 59 | 60 | bool AtEnd() const; 61 | bool PastEnd() const; 62 | }; 63 | 64 | } 65 | 66 | #endif //__BUFFER_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/SWTri_GetTexel.cpp: -------------------------------------------------------------------------------- 1 | // This file is included by SWTri.cpp and should not be built directly by the project. 2 | 3 | unsigned int tex; 4 | #if !defined(LINEAR_BLEND) 5 | { 6 | unsigned int t_pos = ((v)>>16)*tex_pitch + ((u)>>16); 7 | tex = t_pos>16)*tex_pitch + (umidfloor>>16); 17 | 18 | unsigned int t00 = t_pos> 24) * ((ulong) ((0x10000 - aUFactor) * (0x10000 - aVFactor)) >> 16)) >> 16; 26 | int a10 = ((t10 >> 24) * ((ulong) (( aUFactor) * (0x10000 - aVFactor)) >> 16)) >> 16; 27 | int a01 = ((t01 >> 24) * ((ulong) ((0x10000 - aUFactor) * ( aVFactor)) >> 16)) >> 16; 28 | int a11 = ((t11 >> 24) * ((ulong) (( aUFactor) * ( aVFactor)) >> 16)) >> 16; 29 | unsigned int r = (((t00&0x00FF0000)*a00 + (t10&0x00FF0000)*a10 + (t01&0x00FF0000)*a01 + (t11&0x00FF0000)*a11)>>8)&0xFF0000; 30 | unsigned int g = (((t00&0x0000FF00)*a00 + (t10&0x0000FF00)*a10 + (t01&0x0000FF00)*a01 + (t11&0x0000FF00)*a11)>>8)&0x00FF00; 31 | unsigned int b = (((t00&0x000000FF)*a00 + (t10&0x000000FF)*a10 + (t01&0x000000FF)*a01 + (t11&0x000000FF)*a11)>>8)&0x0000FF; 32 | unsigned int a = ((a00 + a10 + a01 + a11)<<24)&0xFF000000; 33 | 34 | tex = a|r|g|b; 35 | } 36 | #endif 37 | 38 | unsigned int alpha; 39 | #if defined (TEX_ALPHA) 40 | alpha = tex>>24; 41 | #else 42 | alpha = 0xFF; 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ogg/os.h: -------------------------------------------------------------------------------- 1 | #ifndef _OS_H 2 | #define _OS_H 3 | /******************************************************************** 4 | * * 5 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 6 | * * 7 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 8 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 9 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 10 | * * 11 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 12 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 13 | * * 14 | ******************************************************************** 15 | 16 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 17 | 18 | ********************************************************************/ 19 | 20 | #include 21 | #define __i386__ 22 | #include "os_types.h" 23 | 24 | #ifndef _V_IFDEFJAIL_H_ 25 | # define _V_IFDEFJAIL_H_ 26 | 27 | # ifdef __GNUC__ 28 | # define STIN static __inline__ 29 | # elif _WIN32 30 | # pragma warning(disable:4267 4244) 31 | # define STIN static __inline 32 | # endif 33 | #else 34 | # define STIN static 35 | #endif 36 | 37 | #ifndef M_PI 38 | # define M_PI (3.1415926536f) 39 | #endif 40 | 41 | #ifdef _WIN32 42 | # include 43 | # define rint(x) (floor((x)+0.5f)) 44 | # define NO_FLOAT_MATH_LIB 45 | # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) 46 | #endif 47 | 48 | #ifdef HAVE_ALLOCA_H 49 | # include 50 | #endif 51 | 52 | #ifdef USE_MEMORY_H 53 | # include 54 | #endif 55 | 56 | #ifndef min 57 | # define min(x,y) ((x)>(y)?(y):(x)) 58 | #endif 59 | 60 | #ifndef max 61 | # define max(x,y) ((x)<(y)?(y):(x)) 62 | #endif 63 | 64 | #endif /* _OS_H */ 65 | -------------------------------------------------------------------------------- /source/ImageLib/png/png.5: -------------------------------------------------------------------------------- 1 | .TH PNG 5 "October 15, 1999" 2 | .SH NAME 3 | png \- Portable Network Graphics (PNG) format 4 | .SH DESCRIPTION 5 | PNG (Portable Network Graphics) is an extensible file format for the 6 | lossless, portable, well-compressed storage of raster images. PNG provides 7 | a patent-free replacement for GIF and can also replace many 8 | common uses of TIFF. Indexed-color, grayscale, and truecolor images are 9 | supported, plus an optional alpha channel. Sample depths range from 10 | 1 to 16 bits. 11 | .br 12 | 13 | PNG is designed to work well in online viewing applications, such as the 14 | World Wide Web, so it is fully streamable with a progressive display 15 | option. PNG is robust, providing both full file integrity checking and 16 | fast, simple detection of common transmission errors. Also, PNG can store 17 | gamma and chromaticity data for improved color matching on heterogeneous 18 | platforms. 19 | 20 | .SH "SEE ALSO" 21 | .IR libpng(3), zlib(3), deflate(5), and zlib(5) 22 | .LP 23 | PNG 1.1 specification, January 1999: 24 | .IP 25 | .br 26 | http://www.cdrom.com/pub/png 27 | .LP 28 | PNG 1.0 specification, October 1996: 29 | .IP 30 | .br 31 | RFC 2083 32 | .IP 33 | .br 34 | ftp://ds.internic.net/rfc/rfc2083.txt 35 | .br 36 | or (as a W3C Recommendation) at 37 | .br 38 | http://www.w3.org/TR/REC-png.html 39 | .SH AUTHORS 40 | This man page: Glenn Randers-Pehrson 41 | .LP 42 | Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999): 43 | Glenn Randers-Pehrson and others (png-list@ccrc.wustl.edu). 44 | .LP 45 | Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996): 46 | Thomas Boutell and others (png-list@ccrc.wustl.edu). 47 | .LP 48 | 49 | 50 | .SH COPYRIGHT NOTICE 51 | The PNG-1.2 specification is copyright (c) 1999 Glenn Randers-Pehrson. 52 | See the specification for conditions of use and distribution. 53 | .LP 54 | The PNG-1.0 specification is copyright (c) 1996 Massachussets Institute of 55 | Technology. See the specification for conditions of use and distribution. 56 | .LP 57 | .\" end of man page 58 | 59 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ScrollbuttonWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "ScrollbuttonWidget.h" 2 | #include "ButtonListener.h" 3 | #include "Graphics.h" 4 | 5 | using namespace Sexy; 6 | 7 | ScrollbuttonWidget::ScrollbuttonWidget(int theId, ButtonListener *theButtonListener, int theType) : ButtonWidget(theId, theButtonListener) 8 | { 9 | mHorizontal = false; 10 | mType = theType; 11 | } 12 | 13 | ScrollbuttonWidget::~ScrollbuttonWidget() 14 | { 15 | } 16 | 17 | void ScrollbuttonWidget::Draw(Graphics *g) 18 | { 19 | int anArrowOffset = 0; 20 | 21 | g->SetColor(Color(212, 212, 212)); 22 | g->FillRect(0, 0, mWidth, mHeight); 23 | 24 | if (mIsDown && mIsOver && !mDisabled) 25 | { 26 | anArrowOffset = 1; 27 | g->SetColor(Color(132, 132, 132)); 28 | g->DrawRect(0, 0, mWidth-1, mHeight-1); 29 | } 30 | else 31 | { 32 | g->SetColor(Color(255, 255, 255)); 33 | g->FillRect(1, 1, mWidth-2, 1); 34 | g->FillRect(1, 1, 1, mHeight-2); 35 | 36 | g->SetColor(Color::Black); 37 | g->FillRect(0, mHeight - 1, mWidth, 1); 38 | g->FillRect(mWidth - 1, 0, 1, mHeight); 39 | 40 | g->SetColor(Color(132, 132, 132)); 41 | g->FillRect(1, mHeight - 2, mWidth - 2, 1); 42 | g->FillRect(mWidth - 2, 1, 1, mHeight - 2); 43 | } 44 | 45 | if (!mDisabled) 46 | g->SetColor(Color::Black); 47 | else 48 | g->SetColor(Color(132, 132, 132)); 49 | 50 | if (mHorizontal || (mType==3 || mType==4)) 51 | { 52 | for (int i = 0; i < 4; i++) 53 | { 54 | if (mId == 0 || mType==3) 55 | g->FillRect(i + (mWidth-4)/2 + anArrowOffset, mHeight/2 - i - 1 + anArrowOffset, 1, 1 + i*2); 56 | else 57 | g->FillRect((3 - i) + (mWidth-4)/2 + anArrowOffset, mHeight/2 - i - 1 + anArrowOffset, 1, 1 + i*2); 58 | } 59 | } 60 | else 61 | { 62 | for (int i = 0; i < 4; i++) 63 | { 64 | if (mId == 0 || mType==1) 65 | g->FillRect(mWidth/2 - i - 1 + anArrowOffset, i + (mHeight-4)/2 + anArrowOffset, 1 + i*2, 1); 66 | else 67 | g->FillRect(mWidth/2 - i - 1 + anArrowOffset, (3 - i) + (mHeight-4)/2 + anArrowOffset, 1 + i*2, 1); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /source/SexyAppFramework/FModMusicInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef __FMODMUSICINTERFACE_H__ 2 | #define __FMODMUSICINTERFACE_H__ 3 | 4 | #include "MusicInterface.h" 5 | #include "fmod.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class SexyAppBase; 11 | 12 | class FModMusicInfo 13 | { 14 | public: 15 | FSOUND_SAMPLE* mHSample; 16 | FMUSIC_MODULE* mHMusic; 17 | double mVolume; 18 | double mVolumeAdd; 19 | double mVolumeCap; 20 | bool mStopOnFade; 21 | bool mRepeats; 22 | 23 | public: 24 | FModMusicInfo(); 25 | }; 26 | 27 | typedef std::map FModMusicMap; 28 | 29 | class FModMusicInterface : public MusicInterface 30 | { 31 | public: 32 | FModMusicMap mMusicMap; 33 | double mMasterVolume; 34 | int mMaxMusicVolume; 35 | int mMaxSampleVolume; 36 | 37 | public: 38 | FSOUND_SAMPLE* LoadFMODSample(const std::string& theFileName); 39 | 40 | public: 41 | FModMusicInterface(HWND theHWnd); 42 | virtual ~FModMusicInterface(); 43 | 44 | virtual bool LoadMusic(int theSongId, const std::string& theFileName); 45 | virtual bool LoadSample(int theSongId, const std::string& theFileName, bool repeat); 46 | virtual bool LoadSample(int theSongId, const std::string& theIntroFileName, const std::string& theRepeatFileName, bool repeat); 47 | virtual void PlayMusic(int theSongId, int theOffset = 0, bool noLoop = false); 48 | virtual void StopMusic(int theSongId); 49 | virtual void PauseMusic(int theSongId); 50 | virtual void ResumeMusic(int theSongId); 51 | virtual void StopAllMusic(); 52 | virtual void FadeIn(int theSongId, int theOffset = -1, double theSpeed = 0.002, bool noLoop = false); 53 | virtual void FadeOut(int theSongId, bool stopSong = true, double theSpeed = 0.004); 54 | virtual void FadeOutAll(bool stopSong = true, double theSpeed = 0.004); 55 | virtual void SetSongVolume(int theSongId, double theVolume); 56 | virtual bool IsPlaying(int theSongId); 57 | 58 | virtual void SetVolume(double theVolume); 59 | virtual void Update(); 60 | }; 61 | 62 | } 63 | 64 | #endif //__FMODMUSICINTERFACE_H__ 65 | -------------------------------------------------------------------------------- /source/SexyAppFramework/TextWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEXTWIDGET_H__ 2 | #define __TEXTWIDGET_H__ 3 | 4 | #include "Widget.h" 5 | #include "ScrollListener.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class ScrollbarWidget; 11 | class Font; 12 | 13 | typedef std::vector SexyStringVector; 14 | typedef std::vector IntVector; 15 | 16 | class TextWidget : public Widget, public ScrollListener 17 | { 18 | public: 19 | Font* mFont; 20 | ScrollbarWidget* mScrollbar; 21 | 22 | SexyStringVector mLogicalLines; 23 | SexyStringVector mPhysicalLines; 24 | IntVector mLineMap; 25 | double mPosition; 26 | double mPageSize; 27 | bool mStickToBottom; 28 | int mHiliteArea[2][2]; 29 | int mMaxLines; 30 | 31 | public: 32 | TextWidget(); 33 | 34 | virtual SexyStringVector GetLines(); 35 | virtual void SetLines(SexyStringVector theNewLines); 36 | virtual void Clear(); 37 | virtual void DrawColorString(Graphics* g, const SexyString& theString, int x, int y, bool useColors); 38 | virtual void DrawColorStringHilited(Graphics* g, const SexyString& theString, int x, int y, int theStartPos, int theEndPos); 39 | virtual int GetStringIndex(const SexyString& theString, int thePixel); 40 | 41 | virtual int GetColorStringWidth(const SexyString& theString); 42 | virtual void Resize(int theX, int theY, int theWidth, int theHeight); 43 | virtual Color GetLastColor(const SexyString& theString); 44 | virtual void AddToPhysicalLines(int theIdx, const SexyString& theLine); 45 | 46 | virtual void AddLine(const SexyString& theString); 47 | virtual bool SelectionReversed(); 48 | virtual void GetSelectedIndices(int theLineIdx, int* theIndices); 49 | virtual void Draw(Graphics* g); 50 | virtual void ScrollPosition(int theId, double thePosition); 51 | virtual void GetTextIndexAt(int x, int y, int* thePosArray); 52 | virtual SexyString GetSelection(); 53 | 54 | virtual void MouseDown(int x, int y, int theClickCount); 55 | virtual void MouseDrag(int x, int y); 56 | 57 | virtual void KeyDown(KeyCode theKey); 58 | }; 59 | 60 | } 61 | 62 | #endif //__TEXTWIDGET_H__ -------------------------------------------------------------------------------- /source/demos/XMLDemo/XMLDemoApp.h: -------------------------------------------------------------------------------- 1 | #ifndef __XMLDEMOAPP_H__ 2 | #define __XMLDEMOAPP_H__ 3 | 4 | #include "SexyAppFramework/SexyAppBase.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class Board; 10 | 11 | // This is the new class we're going to be learning about. 12 | // It'll handle the loading and manipulation of XML files. 13 | class XMLParser; 14 | 15 | // These structs just represent the values from our properties/demo.xml 16 | // file. In a real game, you'd have your own made up config file format. 17 | // The names correspond to the attributes/sections from the XML file. 18 | struct s_Section1 19 | { 20 | SexyString mItem1Text; 21 | 22 | SexyString mBoolParamText; 23 | bool mBoolParamElement; 24 | }; 25 | 26 | struct s_Section2 27 | { 28 | SexyString mSectionAttribText; 29 | 30 | SexyString mIntParamText; 31 | int mIntParamElement; 32 | 33 | SexyString mMultiAttrib1; 34 | SexyString mMultiAttrib2; 35 | SexyString mMultiAttrib3; 36 | 37 | SexyString mSubsectionItem2; 38 | }; 39 | 40 | class XMLDemoApp : public SexyAppBase 41 | { 42 | 43 | public: 44 | 45 | Board* mBoard; 46 | s_Section1 mSection1; 47 | s_Section2 mSection2; 48 | SexyString mInstructionTag; 49 | SexyString mInstruction; 50 | 51 | private: 52 | 53 | // With this class, we'll read in our sample XML file, properties/demo.xml 54 | XMLParser* mParser; 55 | 56 | private: 57 | 58 | ////////////////////////////////////////////////////////////////////////// 59 | // Function: ExtractXMLData 60 | // Parameters: none 61 | // Returns: false on error, otherwise true 62 | // 63 | // Purpose: After opening an XML file via the XMLParser::OpenFile() method, 64 | // this function then extracts out the data it needs from the sample XML file. 65 | // When complete, mSection1 and mSection2 will have their values initialized. 66 | ////////////////////////////////////////////////////////////////////////// 67 | bool ExtractXMLData(); 68 | 69 | public: 70 | 71 | XMLDemoApp(); 72 | 73 | virtual ~XMLDemoApp(); 74 | 75 | virtual void ShutdownHook(); 76 | virtual void InitHook(); 77 | 78 | 79 | 80 | }; 81 | 82 | } 83 | #endif //__XMLDEMOAPP_H__ 84 | -------------------------------------------------------------------------------- /source/SexyAppFramework/BassMusicInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef __BASSMUSICINTERFACE_H__ 2 | #define __BASSMUSICINTERFACE_H__ 3 | 4 | #include "MusicInterface.h" 5 | #include "bass.h" 6 | 7 | namespace Sexy 8 | { 9 | 10 | class SexyAppBase; 11 | 12 | class BassMusicInfo 13 | { 14 | public: 15 | HMUSIC mHMusic; 16 | HSTREAM mHStream; 17 | double mVolume; 18 | double mVolumeAdd; 19 | double mVolumeCap; 20 | bool mStopOnFade; 21 | 22 | public: 23 | BassMusicInfo(); 24 | 25 | DWORD GetHandle() { return mHMusic?mHMusic:mHStream; } 26 | }; 27 | 28 | typedef std::map BassMusicMap; 29 | 30 | class BassMusicInterface : public MusicInterface 31 | { 32 | public: 33 | BassMusicMap mMusicMap; 34 | int mMaxMusicVolume; 35 | int mMusicLoadFlags; 36 | 37 | public: 38 | BassMusicInterface(HWND theHWnd); 39 | virtual ~BassMusicInterface(); 40 | 41 | virtual bool LoadMusic(int theSongId, const std::string& theFileName); 42 | virtual void PlayMusic(int theSongId, int theOffset = 0, bool noLoop = false); 43 | virtual void StopMusic(int theSongId); 44 | virtual void StopAllMusic(); 45 | virtual void UnloadMusic(int theSongId); 46 | virtual void UnloadAllMusic(); 47 | virtual void PauseAllMusic(); 48 | virtual void ResumeAllMusic(); 49 | virtual void PauseMusic(int theSongId); 50 | virtual void ResumeMusic(int theSongId); 51 | virtual void FadeIn(int theSongId, int theOffset = -1, double theSpeed = 0.002, bool noLoop = false); 52 | virtual void FadeOut(int theSongId, bool stopSong = true, double theSpeed = 0.004); 53 | virtual void FadeOutAll(bool stopSong = true, double theSpeed = 0.004); 54 | virtual void SetSongVolume(int theSongId, double theVolume); 55 | virtual void SetSongMaxVolume(int theSongId, double theMaxVolume); 56 | virtual bool IsPlaying(int theSongId); 57 | 58 | virtual void SetVolume(double theVolume); 59 | virtual void SetMusicAmplify(int theSongId, double theAmp); // default is 0.50 60 | virtual void Update(); 61 | 62 | // functions for dealing with MODs 63 | int GetMusicOrder(int theSongId); 64 | }; 65 | 66 | } 67 | 68 | #endif //__BASSMUSICINTERFACE_H__ 69 | -------------------------------------------------------------------------------- /source/SexyAppFramework/Quantize.cpp: -------------------------------------------------------------------------------- 1 | #include "Quantize.h" 2 | #include 3 | #include 4 | 5 | using namespace Sexy; 6 | 7 | bool Sexy::Quantize8Bit(const ulong* theSrcBits, int theWidth, int theHeight, uchar* theDestColorIndices, ulong* theDestColorTable) 8 | { 9 | int aSize = theWidth*theHeight; 10 | 11 | int aColorTableSize = 0; 12 | 13 | ulong aSearchTable[256]; 14 | uchar aTranslationTable[256]; // From search table to color table 15 | 16 | if (aSize > 0) 17 | { 18 | aSearchTable[0] = theSrcBits[0]; 19 | theDestColorTable[0] = theSrcBits[0]; 20 | aTranslationTable[0] = 0; 21 | theDestColorIndices[0] = 0; 22 | aColorTableSize++; 23 | } 24 | 25 | for (int anIdx = 1; anIdx < aSize; anIdx++) 26 | { 27 | ulong aColor = theSrcBits[anIdx]; 28 | 29 | int aLeftPos = 0; 30 | int aRightPos = aColorTableSize-1; 31 | int aMiddlePos = (aLeftPos+aRightPos)/2; 32 | 33 | for (;;) 34 | { 35 | ulong aCheckColor = aSearchTable[aMiddlePos]; 36 | 37 | if (aColor < aCheckColor) 38 | aRightPos = aMiddlePos - 1; 39 | else if (aColor > aCheckColor) 40 | aLeftPos = aMiddlePos + 1; 41 | else 42 | { 43 | theDestColorIndices[anIdx] = aTranslationTable[aMiddlePos]; 44 | break; 45 | } 46 | 47 | if (aLeftPos > aRightPos) 48 | { 49 | if (aColorTableSize >= 256) 50 | return false; 51 | 52 | int anInsertPos = aLeftPos; 53 | if ((anInsertPos < aColorTableSize) && (aColor > aSearchTable[anInsertPos])) 54 | anInsertPos++; 55 | 56 | // Insert color into the table 57 | memmove(aSearchTable+anInsertPos+1, aSearchTable+anInsertPos, (aColorTableSize-anInsertPos) * sizeof(ulong)); 58 | aSearchTable[anInsertPos] = aColor; 59 | 60 | memmove(aTranslationTable+anInsertPos+1, aTranslationTable+anInsertPos, (aColorTableSize-anInsertPos) * sizeof(uchar)); 61 | aTranslationTable[anInsertPos] = aColorTableSize; 62 | 63 | theDestColorTable[aColorTableSize] = aColor; 64 | 65 | theDestColorIndices[anIdx] = aColorTableSize; 66 | 67 | aColorTableSize++; 68 | 69 | break; 70 | } 71 | 72 | aMiddlePos = (aLeftPos+aRightPos)/2; 73 | } 74 | } 75 | 76 | return true; 77 | } 78 | 79 | -------------------------------------------------------------------------------- /source/ImageLib/zlib/uncompr.c: -------------------------------------------------------------------------------- 1 | /* uncompr.c -- decompress a memory buffer 2 | * Copyright (C) 1995-1998 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id: uncompr.c,v 1.1 2003/04/29 21:57:48 ace Exp $ */ 7 | 8 | #include "zlib.h" 9 | 10 | /* =========================================================================== 11 | Decompresses the source buffer into the destination buffer. sourceLen is 12 | the byte length of the source buffer. Upon entry, destLen is the total 13 | size of the destination buffer, which must be large enough to hold the 14 | entire uncompressed data. (The size of the uncompressed data must have 15 | been saved previously by the compressor and transmitted to the decompressor 16 | by some mechanism outside the scope of this compression library.) 17 | Upon exit, destLen is the actual size of the compressed buffer. 18 | This function can be used to decompress a whole file at once if the 19 | input file is mmap'ed. 20 | 21 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not 22 | enough memory, Z_BUF_ERROR if there was not enough room in the output 23 | buffer, or Z_DATA_ERROR if the input data was corrupted. 24 | */ 25 | int ZEXPORT uncompress (dest, destLen, source, sourceLen) 26 | Bytef *dest; 27 | uLongf *destLen; 28 | const Bytef *source; 29 | uLong sourceLen; 30 | { 31 | z_stream stream; 32 | int err; 33 | 34 | stream.next_in = (Bytef*)source; 35 | stream.avail_in = (uInt)sourceLen; 36 | /* Check for source > 64K on 16-bit machine: */ 37 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 38 | 39 | stream.next_out = dest; 40 | stream.avail_out = (uInt)*destLen; 41 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 42 | 43 | stream.zalloc = (alloc_func)0; 44 | stream.zfree = (free_func)0; 45 | 46 | err = inflateInit(&stream); 47 | if (err != Z_OK) return err; 48 | 49 | err = inflate(&stream, Z_FINISH); 50 | if (err != Z_STREAM_END) { 51 | inflateEnd(&stream); 52 | return err == Z_OK ? Z_BUF_ERROR : err; 53 | } 54 | *destLen = stream.total_out; 55 | 56 | err = inflateEnd(&stream); 57 | return err; 58 | } 59 | -------------------------------------------------------------------------------- /source/ImageLib/j2k-codec/J2K_Control.idl: -------------------------------------------------------------------------------- 1 | // J2K_Control.idl : IDL source for J2K-Control.dll 2 | // 3 | 4 | // This file will be processed by the MIDL tool to 5 | // produce the type library (J2K_Control.tlb) and marshalling code. 6 | 7 | import "oaidl.idl"; 8 | import "ocidl.idl"; 9 | #include "olectl.h" 10 | 11 | 12 | [ 13 | object, 14 | uuid(BE29213A-CFA5-453D-B243-5F8ABE6A8BB3), 15 | dual, 16 | helpstring("IJ2K_Codec Interface"), 17 | pointer_default(unique) 18 | ] 19 | interface IJ2K_Codec : IDispatch 20 | { 21 | [id(1), helpstring("open JPEG2000 file")] HRESULT OpenFile(BSTR filename, [optional] BSTR options); 22 | [id(2), helpstring("open JPEG2000 file from memory buffer")] HRESULT OpenMemory(unsigned char *src_buffer, int src_size, [optional] BSTR options); 23 | [id(3), helpstring("Create log-file and start logging")] HRESULT StartLogging(int level, int append); 24 | [id(4), helpstring("Stop logging")] HRESULT StopLogging(); 25 | [propget, id(5), helpstring("Width of JPEG2000 image")] HRESULT ImageWidth([out, retval] long *pVal); 26 | [propget, id(6), helpstring("Height of JPEG2000 image")] HRESULT ImageHeight([out, retval] long *pVal); 27 | [propput, id(7), helpstring("Personal Registration Key")] HRESULT Key([in] BSTR newVal); 28 | [propget, id(8), helpstring("The number of components in the JPEG2000 image")] HRESULT ImageComponents([out, retval] long *pVal); 29 | [propget, id(9), helpstring("Resize image if true")] HRESULT DoScale([out, retval] BOOL *pVal); 30 | [propput, id(9), helpstring("Resize image if true")] HRESULT DoScale([in] BOOL newVal); 31 | }; 32 | 33 | [ 34 | uuid(2A471E92-469E-469E-BC45-A3485F3911AB), 35 | version(1.0), 36 | helpstring("J2K_Control 1.0 Type Library") 37 | ] 38 | library J2K_CONTROLLib 39 | { 40 | importlib("stdole32.tlb"); 41 | importlib("stdole2.tlb"); 42 | 43 | [ 44 | uuid(DEE0B9C2-D2E6-44FC-A6F6-4C5A3DC2F56D), 45 | helpstring("_IJ2K_CodecEvents Interface") 46 | ] 47 | dispinterface _IJ2K_CodecEvents 48 | { 49 | properties: 50 | methods: 51 | }; 52 | 53 | [ 54 | uuid(48AFF452-8543-4538-90FE-E541ECF19BA5), 55 | helpstring("J2K_Codec Class") 56 | ] 57 | coclass J2K_Codec 58 | { 59 | [default] interface IJ2K_Codec; 60 | [default, source] dispinterface _IJ2K_CodecEvents; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ButtonWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __BUTTONWIDGET_H__ 2 | #define __BUTTONWIDGET_H__ 3 | 4 | #include "Widget.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class Image; 10 | class ButtonListener; 11 | 12 | class ButtonWidget : public Widget 13 | { 14 | public: 15 | enum { 16 | BUTTON_LABEL_LEFT = -1, 17 | BUTTON_LABEL_CENTER, 18 | BUTTON_LABEL_RIGHT 19 | }; 20 | enum 21 | { 22 | COLOR_LABEL, 23 | COLOR_LABEL_HILITE, 24 | COLOR_DARK_OUTLINE, 25 | COLOR_LIGHT_OUTLINE, 26 | COLOR_MEDIUM_OUTLINE, 27 | COLOR_BKG, 28 | NUM_COLORS 29 | }; 30 | 31 | int mId; 32 | SexyString mLabel; 33 | int mLabelJustify; 34 | Font* mFont; 35 | Image* mButtonImage; 36 | Image* mOverImage; 37 | Image* mDownImage; 38 | Image* mDisabledImage; 39 | Rect mNormalRect; 40 | Rect mOverRect; 41 | Rect mDownRect; 42 | Rect mDisabledRect; 43 | 44 | bool mInverted; 45 | bool mBtnNoDraw; 46 | bool mFrameNoDraw; 47 | ButtonListener* mButtonListener; 48 | 49 | double mOverAlpha; 50 | double mOverAlphaSpeed; 51 | double mOverAlphaFadeInSpeed; 52 | 53 | bool HaveButtonImage(Image *theImage, const Rect &theRect); 54 | virtual void DrawButtonImage(Graphics *g, Image *theImage, const Rect &theRect, int x, int y); 55 | 56 | 57 | public: 58 | ButtonWidget(int theId, ButtonListener* theButtonListener); 59 | virtual ~ButtonWidget(); 60 | 61 | virtual void SetFont(Font* theFont); 62 | virtual bool IsButtonDown(); 63 | virtual void Draw(Graphics* g); 64 | virtual void SetDisabled(bool isDisabled); 65 | virtual void MouseEnter(); 66 | virtual void MouseLeave(); 67 | virtual void MouseMove(int theX, int theY); 68 | virtual void MouseDown(int theX, int theY, int theClickCount) { Widget::MouseDown(theX, theY, theClickCount); } 69 | virtual void MouseDown(int theX, int theY, int theBtnNum, int theClickCount); 70 | virtual void MouseUp(int theX, int theY) { Widget::MouseUp(theX, theY); } 71 | virtual void MouseUp(int theX, int theY, int theClickCount) { Widget::MouseUp(theX, theY, theClickCount); } 72 | virtual void MouseUp(int theX, int theY, int theBtnNum, int theClickCount); 73 | virtual void Update(); 74 | }; 75 | 76 | } 77 | 78 | #endif //__BUTTONWIDGET_H__ -------------------------------------------------------------------------------- /source/demos/XMLDemo/Board.cpp: -------------------------------------------------------------------------------- 1 | #include "Board.h" 2 | #include "XMLDemoApp.h" 3 | #include "..\SexyAppFramework\Graphics.h" 4 | #include "Res.h" 5 | 6 | using namespace Sexy; 7 | 8 | Board::Board(XMLDemoApp* theApp) 9 | { 10 | mApp = theApp; 11 | } 12 | 13 | ////////////////////////////////////////////////////////////////////////// 14 | ////////////////////////////////////////////////////////////////////////// 15 | Board::~Board() 16 | { 17 | } 18 | 19 | ////////////////////////////////////////////////////////////////////////// 20 | ////////////////////////////////////////////////////////////////////////// 21 | void Board::Update() 22 | { 23 | Widget::Update(); 24 | } 25 | 26 | ////////////////////////////////////////////////////////////////////////// 27 | ////////////////////////////////////////////////////////////////////////// 28 | void Board::Draw(Graphics* g) 29 | { 30 | g->SetColor(Color::Black); 31 | g->FillRect(0, 0, mWidth, mHeight); 32 | 33 | g->SetFont(FONT_DEFAULT); 34 | g->SetColor(Color::White); 35 | 36 | // Just to verify things, print out the values of everything we cared to read in from demo.xml: 37 | 38 | g->DrawString(StrFormat(_S("Section 1/Item1 text: %s"), mApp->mSection1.mItem1Text.c_str()), 10, 20); 39 | g->DrawString(StrFormat(_S("Section 1/BoolParam text: %s"), mApp->mSection1.mBoolParamText.c_str()), 10, 40); 40 | g->DrawString(StrFormat(_S("Section 1/BoolParam value: %s"), mApp->mSection1.mBoolParamElement ? _S("true") : _S("false")), 10, 60); 41 | 42 | g->DrawString(StrFormat(_S("Section 2's s2attrib = %s"), mApp->mSection2.mSectionAttribText.c_str()), 10, 90); 43 | g->DrawString(StrFormat(_S("Section 2/IntParam text: %s"), mApp->mSection2.mIntParamText.c_str()), 10, 110); 44 | g->DrawString(StrFormat(_S("Section 2/IntParam value: %d"), mApp->mSection2.mIntParamElement), 10, 130); 45 | g->DrawString(StrFormat(_S("Section 2/MultiAttrib/attrib1 = %s"), mApp->mSection2.mMultiAttrib1.c_str()), 10, 150); 46 | g->DrawString(StrFormat(_S("Section 2/MultiAttrib/attrib2 = %s"), mApp->mSection2.mMultiAttrib2.c_str()), 10, 170); 47 | g->DrawString(StrFormat(_S("Section 2/MultiAttrib/attrib3 = %s"), mApp->mSection2.mMultiAttrib3.c_str()), 10, 190); 48 | g->DrawString(StrFormat(_S("Section 2/Subsection/Item2 value: %s"), mApp->mSection2.mSubsectionItem2.c_str()), 10, 210); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /source/SexyAppFramework/HTTPTransfer.h: -------------------------------------------------------------------------------- 1 | #ifndef __HTTPTRANSFER_H__ 2 | #define __HTTPTRANSFER_H__ 3 | 4 | #include "Common.h" 5 | 6 | namespace Sexy 7 | { 8 | 9 | class HTTPTransfer 10 | { 11 | public: 12 | enum 13 | { 14 | RESULT_DONE, 15 | RESULT_NOT_STARTED, 16 | RESULT_NOT_COMPLETED, 17 | RESULT_NOT_FOUND, 18 | RESULT_HTTP_ERROR, 19 | RESULT_ABORTED, 20 | RESULT_SOCKET_ERROR, 21 | RESULT_INVALID_ADDR, 22 | RESULT_CONNECT_FAIL, 23 | RESULT_DISCONNECTED 24 | }; 25 | 26 | int mTransferId; 27 | int mSocket; 28 | std::string mSendStr; 29 | std::string mSpecifiedBaseURL; 30 | std::string mSpecifiedRelURL; 31 | std::string mURL; 32 | std::string mProto; 33 | std::string mHost; 34 | int mPort; 35 | std::string mPath; 36 | 37 | int mContentLength; 38 | std::string mContent; 39 | 40 | bool mTransferPending; 41 | bool mThreadRunning; 42 | bool mExiting; 43 | bool mAborted; 44 | int mResult; 45 | 46 | int mDemoLastKnownResult; 47 | 48 | protected: 49 | void PrepareTransfer(const std::string& theURL); 50 | void StartTransfer(); 51 | void GetHelper(const std::string& theURL); 52 | 53 | void PostHelper(const std::string& theURL, const std::string& theParams); 54 | 55 | void Fail(int theResult); 56 | void GetThreadProc(); 57 | static void GetThreadProcStub(void *theArg); 58 | static std::string GetAbsURL(const std::string& theBaseURL, const std::string& theRelURL); 59 | 60 | void UpdateStatus(); 61 | bool SocketWait(bool checkRead, bool checkWrite); 62 | 63 | public: 64 | HTTPTransfer(); 65 | virtual ~HTTPTransfer(); 66 | 67 | void Get(const std::string& theURL); 68 | void Get(const std::string& theBaseURL, const std::string& theRelURL); 69 | 70 | void Post(const std::string& theURL, const std::string& theParams); 71 | void Post(const std::string& theBaseURL, const std::string& theRelURL, const std::string& theParams); 72 | 73 | void SendRequestString(const std::string& theHost, const std::string& theSendString); 74 | 75 | void Reset(); 76 | void Abort(); 77 | void WaitFor(); 78 | int GetResultCode(); 79 | std::string GetContent(); 80 | }; 81 | 82 | }; 83 | 84 | #endif //__HTTPTRANSFER_H__ -------------------------------------------------------------------------------- /source/SexyAppFramework/Checkbox.cpp: -------------------------------------------------------------------------------- 1 | #include "Checkbox.h" 2 | #include "CheckboxListener.h" 3 | #include "Graphics.h" 4 | 5 | using namespace Sexy; 6 | 7 | Checkbox::Checkbox(Image* theUncheckedImage, Image* theCheckedImage, int theId, CheckboxListener* theCheckboxListener) : 8 | mUncheckedImage(theUncheckedImage), 9 | mCheckedImage(theCheckedImage), 10 | mId(theId), 11 | mListener(theCheckboxListener), 12 | mChecked(false) , 13 | mOutlineColor(Color::White), 14 | mBkgColor(Color(80, 80, 80)), 15 | mCheckColor(Color(255, 255, 0)) 16 | { 17 | mDoFinger = true; 18 | } 19 | 20 | void Checkbox::SetChecked(bool checked, bool tellListener) 21 | { 22 | mChecked = checked; 23 | if (tellListener && mListener) 24 | mListener->CheckboxChecked(mId, mChecked); 25 | MarkDirty(); 26 | } 27 | 28 | bool Checkbox::IsChecked() 29 | { 30 | return mChecked; 31 | } 32 | 33 | void Checkbox::Draw(Graphics* g) 34 | { 35 | Widget::Draw(g); 36 | 37 | /*if (mChecked) 38 | g->DrawImage(mApp->mImages[IMAGE_CHECKBOX], 0, 0, Rect(0, 0, 31, 32)); 39 | else 40 | g->DrawImage(mApp->mImages[IMAGE_CHECKBOX], 0, 0, Rect(31, 0, 31, 32));*/ 41 | 42 | if ((mCheckedRect.mWidth == 0) && (mCheckedImage != NULL) && (mUncheckedImage != NULL)) 43 | { 44 | if (mChecked) 45 | g->DrawImage(mCheckedImage, 0, 0); 46 | else 47 | g->DrawImage(mUncheckedImage, 0, 0); 48 | } 49 | else if ((mCheckedRect.mWidth != 0) && (mUncheckedImage != NULL)) 50 | { 51 | if (mChecked) 52 | g->DrawImage(mUncheckedImage, 0, 0, mCheckedRect); 53 | else 54 | g->DrawImage(mUncheckedImage, 0, 0, mUncheckedRect); 55 | } 56 | else if ((mUncheckedImage == NULL) && (mCheckedImage == NULL)) 57 | { 58 | // No image, default draw method 59 | g->SetColor(mOutlineColor); 60 | g->FillRect(0, 0, mWidth, mHeight); 61 | g->SetColor(mBkgColor); 62 | g->FillRect(1, 1, mWidth - 2, mHeight - 2); 63 | 64 | if (mChecked) 65 | { 66 | g->SetColor(mCheckColor); 67 | g->DrawLine(1, 1, mWidth - 2, mHeight - 2); 68 | g->DrawLine(mWidth - 1, 1, 1, mHeight - 2); 69 | } 70 | } 71 | } 72 | 73 | void Checkbox::MouseDown(int x, int y, int theBtnNum, int theClickCount) 74 | { 75 | Widget::MouseDown(x, y, theBtnNum, theClickCount); 76 | 77 | mChecked = !mChecked; 78 | if (mListener) 79 | mListener->CheckboxChecked(mId, mChecked); 80 | MarkDirty(); 81 | } 82 | -------------------------------------------------------------------------------- /source/ImageLib/zlib/infutil.c: -------------------------------------------------------------------------------- 1 | /* inflate_util.c -- data and routines common to blocks and codes 2 | * Copyright (C) 1995-1998 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "zutil.h" 7 | #include "infblock.h" 8 | #include "inftrees.h" 9 | #include "infcodes.h" 10 | #include "infutil.h" 11 | 12 | struct inflate_codes_state {int dummy;}; /* for buggy compilers */ 13 | 14 | /* And'ing with mask[n] masks the lower n bits */ 15 | uInt inflate_mask[17] = { 16 | 0x0000, 17 | 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 18 | 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff 19 | }; 20 | 21 | 22 | /* copy as much as possible from the sliding window to the output area */ 23 | int inflate_flush(s, z, r) 24 | inflate_blocks_statef *s; 25 | z_streamp z; 26 | int r; 27 | { 28 | uInt n; 29 | Bytef *p; 30 | Bytef *q; 31 | 32 | /* local copies of source and destination pointers */ 33 | p = z->next_out; 34 | q = s->read; 35 | 36 | /* compute number of bytes to copy as far as end of window */ 37 | n = (uInt)((q <= s->write ? s->write : s->end) - q); 38 | if (n > z->avail_out) n = z->avail_out; 39 | if (n && r == Z_BUF_ERROR) r = Z_OK; 40 | 41 | /* update counters */ 42 | z->avail_out -= n; 43 | z->total_out += n; 44 | 45 | /* update check information */ 46 | if (s->checkfn != Z_NULL) 47 | z->adler = s->check = (*s->checkfn)(s->check, q, n); 48 | 49 | /* copy as far as end of window */ 50 | zmemcpy(p, q, n); 51 | p += n; 52 | q += n; 53 | 54 | /* see if more to copy at beginning of window */ 55 | if (q == s->end) 56 | { 57 | /* wrap pointers */ 58 | q = s->window; 59 | if (s->write == s->end) 60 | s->write = s->window; 61 | 62 | /* compute bytes to copy */ 63 | n = (uInt)(s->write - q); 64 | if (n > z->avail_out) n = z->avail_out; 65 | if (n && r == Z_BUF_ERROR) r = Z_OK; 66 | 67 | /* update counters */ 68 | z->avail_out -= n; 69 | z->total_out += n; 70 | 71 | /* update check information */ 72 | if (s->checkfn != Z_NULL) 73 | z->adler = s->check = (*s->checkfn)(s->check, q, n); 74 | 75 | /* copy */ 76 | zmemcpy(p, q, n); 77 | p += n; 78 | q += n; 79 | } 80 | 81 | /* update pointers */ 82 | z->next_out = p; 83 | s->read = q; 84 | 85 | /* done */ 86 | return r; 87 | } 88 | -------------------------------------------------------------------------------- /source/ImageLib/png/knownbug: -------------------------------------------------------------------------------- 1 | 2 | Known bugs and suggested enhancements in libpng-1.0.4 3 | 4 | 5 | 1. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey 6 | 7 | Loops need to be optimized everywhere 8 | 9 | Make them count down instead of up -- Kevin Bracey 10 | 11 | Optimizing compilers don't need this, and making 12 | the change would be error prone -- Tom Lane, Glenn R-P 13 | 14 | Question whether i-- or --i is better. 15 | 16 | STATUS: Under investigation, postponed until after 17 | libpng-1.0.5. About 160 loops will be turned around 18 | in libpng-1.0.Nn, for testing. 19 | 20 | 2. July 4, 1998 -- ENHANCEMENT -- Glenn R-P 21 | 22 | libpng-1.0.5 and earlier transform colors to gamma=1.0 space for 23 | merging with background, and then back to the image's gamma. The 24 | bit_depth of the intermediate (gamma=1.0) representation is probably 25 | not sufficient. In the typical gamma=1/2.2 situation, the linear 26 | pixels need about 4 more bits than the gamma-encoded ones, to avoid 27 | loss of precision. A similar situation exists with the rgb_to_gray 28 | operation. 29 | 30 | STATUS: under development. 31 | 32 | 3. September 1999 -- ENHANCEMENT -- 33 | 34 | It should be possible to use libpng without floating-point aritmetic. 35 | 36 | STATUS: Under investigation, implementation postponed until after 37 | libpng-1.0.5. The application interface will change because replacements 38 | for the png_set_gAMA(), png_set_cHRM(), and corresponding png_get_() 39 | functions will be needed. 40 | 41 | 4. September 1999 -- BUG [FIXED] -- 42 | 43 | Portions of the new MMX code in pngvcrd.c were ifdef'd out because they 44 | didn't work properly, but the bug appears to have been found and fixed. 45 | As a result, all parts of the code are once again enabled. If you think 46 | there's still a problem, you can recompile with one of the following two 47 | macros defined and see if the problem goes away: 48 | 49 | DISABLE_PNGVCRD_COMBINE 50 | DISABLE_PNGVCRD_INTERLACE 51 | 52 | The second one is in the function where the bug was; as far as we are 53 | aware, there was never any bug in the other function. Please notify us 54 | if you find any problems in libpng, regardless of whether the two macros 55 | make any difference: png-implement@ccrc.wustl.edu 56 | 57 | Again, we believe the MMX code in pngvcrd.c is 100% correct, but it has 58 | not yet been tested extensively. 59 | -------------------------------------------------------------------------------- /source/SexyAppFramework/DDI_FastBlt_NoAlpha.inc: -------------------------------------------------------------------------------- 1 | { 2 | if (mLockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount == 16) 3 | { 4 | ushort* aDestPixelsRow = ((ushort*) mLockedSurfaceDesc.lpSurface) + (theY * mLockedSurfaceDesc.lPitch/2) + theX; 5 | 6 | if (aMemoryImage->mHasTrans) 7 | { 8 | for (int y = 0; y < theSrcRect.mHeight; y++) 9 | { 10 | ushort* aDestPixels = aDestPixelsRow; 11 | 12 | aSrcPixels = aSrcPixelsRow; 13 | 14 | for (int x = 0; x < theSrcRect.mWidth; x++) 15 | { 16 | ulong aSrc = NEXT_SRC_COLOR; 17 | 18 | if (aSrc>>24 != 0) 19 | *(aDestPixels++) = (ushort) aSrc; 20 | else 21 | aDestPixels++; 22 | } 23 | 24 | aDestPixelsRow += mLockedSurfaceDesc.lPitch/2; 25 | aSrcPixelsRow += theImage->mWidth; 26 | } 27 | } 28 | else 29 | { 30 | for (int y = 0; y < theSrcRect.mHeight; y++) 31 | { 32 | ushort* aDestPixels = aDestPixelsRow; 33 | 34 | aSrcPixels = aSrcPixelsRow; 35 | 36 | for (int x = 0; x < theSrcRect.mWidth; x++) 37 | { 38 | *(aDestPixels++) = (ushort) NEXT_SRC_COLOR; 39 | } 40 | 41 | aDestPixelsRow += mLockedSurfaceDesc.lPitch/2; 42 | aSrcPixelsRow += theImage->mWidth; 43 | } 44 | } 45 | } 46 | else if (mLockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount == 32) 47 | { 48 | ulong* aDestPixelsRow = ((ulong*) mLockedSurfaceDesc.lpSurface) + (theY * mLockedSurfaceDesc.lPitch/4) + theX; 49 | 50 | if (aMemoryImage->mHasTrans) 51 | { 52 | for (int y = 0; y < theSrcRect.mHeight; y++) 53 | { 54 | ulong* aDestPixels = aDestPixelsRow; 55 | 56 | aSrcPixels = aSrcPixelsRow; 57 | 58 | for (int x = 0; x < theSrcRect.mWidth; x++) 59 | { 60 | ulong aSrc = NEXT_SRC_COLOR; 61 | 62 | if (aSrc>>24 != 0) 63 | *(aDestPixels++) = aSrc; 64 | else 65 | aDestPixels++; 66 | } 67 | 68 | aDestPixelsRow += mLockedSurfaceDesc.lPitch/4; 69 | aSrcPixelsRow += theImage->mWidth; 70 | } 71 | } 72 | else 73 | { 74 | for (int y = 0; y < theSrcRect.mHeight; y++) 75 | { 76 | ulong* aDestPixels = aDestPixelsRow; 77 | 78 | aSrcPixels = aSrcPixelsRow; 79 | 80 | for (int x = 0; x < theSrcRect.mWidth; x++) 81 | { 82 | *(aDestPixels++) = NEXT_SRC_COLOR; 83 | } 84 | 85 | aDestPixelsRow += mLockedSurfaceDesc.lPitch/4; 86 | aSrcPixelsRow += theImage->mWidth; 87 | } 88 | } 89 | } 90 | 91 | UnlockSurface(); 92 | } -------------------------------------------------------------------------------- /source/ImageLib/zlib/compress.c: -------------------------------------------------------------------------------- 1 | /* compress.c -- compress a memory buffer 2 | * Copyright (C) 1995-1998 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id: compress.c,v 1.1 2003/04/29 21:57:48 ace Exp $ */ 7 | 8 | #include "zlib.h" 9 | 10 | /* =========================================================================== 11 | Compresses the source buffer into the destination buffer. The level 12 | parameter has the same meaning as in deflateInit. sourceLen is the byte 13 | length of the source buffer. Upon entry, destLen is the total size of the 14 | destination buffer, which must be at least 0.1% larger than sourceLen plus 15 | 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 16 | 17 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 18 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, 19 | Z_STREAM_ERROR if the level parameter is invalid. 20 | */ 21 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) 22 | Bytef *dest; 23 | uLongf *destLen; 24 | const Bytef *source; 25 | uLong sourceLen; 26 | int level; 27 | { 28 | z_stream stream; 29 | int err; 30 | 31 | stream.next_in = (Bytef*)source; 32 | stream.avail_in = (uInt)sourceLen; 33 | #ifdef MAXSEG_64K 34 | /* Check for source > 64K on 16-bit machine: */ 35 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 36 | #endif 37 | stream.next_out = dest; 38 | stream.avail_out = (uInt)*destLen; 39 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 40 | 41 | stream.zalloc = (alloc_func)0; 42 | stream.zfree = (free_func)0; 43 | stream.opaque = (voidpf)0; 44 | 45 | err = deflateInit(&stream, level); 46 | if (err != Z_OK) return err; 47 | 48 | err = deflate(&stream, Z_FINISH); 49 | if (err != Z_STREAM_END) { 50 | deflateEnd(&stream); 51 | return err == Z_OK ? Z_BUF_ERROR : err; 52 | } 53 | *destLen = stream.total_out; 54 | 55 | err = deflateEnd(&stream); 56 | return err; 57 | } 58 | 59 | /* =========================================================================== 60 | */ 61 | int ZEXPORT compress (dest, destLen, source, sourceLen) 62 | Bytef *dest; 63 | uLongf *destLen; 64 | const Bytef *source; 65 | uLong sourceLen; 66 | { 67 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 68 | } 69 | -------------------------------------------------------------------------------- /source/SexyAppFramework/ModVal.h: -------------------------------------------------------------------------------- 1 | #ifndef __MODVAL_H__ 2 | #define __MODVAL_H__ 3 | 4 | #include 5 | 6 | /* 7 | This module allows for dynamic modification of integer and floating-point 8 | constants at run-time. 9 | 10 | Place the M() around values you want to allow to be changed at run-time. 11 | When you want to modify a value, simply change the value in the source 12 | code file and call ReparseModValues() within your program to re-read the 13 | source files, checking for changes in constants. Your program will need 14 | to contain some trigger such as a key combination to trigger the 15 | ReparseModValues() call. 16 | 17 | Example: 18 | x = x + M(2.1); 19 | 20 | Caveats: 21 | This module determines which files to parse through (during 22 | ReparseModValues()) at run-time, so if a M() macro has not yet been 23 | executed within a particular source file, its value will not be 24 | updated. 25 | 26 | Performance: 27 | There a small setup cost the first time each M() value is accessed 28 | after program startup and reparsing, but after that there is just the 29 | tiny overhead of a function call and a few vector dereferences. 30 | 31 | */ 32 | 33 | namespace Sexy 34 | { 35 | 36 | #if defined(SEXY_DISABLE_MODVAL) || defined(RELEASEFINAL) 37 | #define M(val) (val) 38 | #define M1(val) (val) 39 | #define M2(val) (val) 40 | #define M3(val) (val) 41 | #define M4(val) (val) 42 | #define M5(val) (val) 43 | #define M6(val) (val) 44 | #define M7(val) (val) 45 | #define M8(val) (val) 46 | #define M9(val) (val) 47 | #else 48 | #define MODVAL_STR_COUNTER2(x,y,z) x#y","#z 49 | #define MODVAL_STR_COUNTER1(x,y,z) MODVAL_STR_COUNTER2(x,y,z) 50 | #define MODVAL_STR_COUNTER(x) MODVAL_STR_COUNTER1(x,__COUNTER__,__LINE__) 51 | #define M(val) ModVal(0, MODVAL_STR_COUNTER("SEXY_SEXYMODVAL"__FILE__), (val)) 52 | #define M1(val) M(val) 53 | #define M2(val) M(val) 54 | #define M3(val) M(val) 55 | #define M4(val) M(val) 56 | #define M5(val) M(val) 57 | #define M6(val) M(val) 58 | #define M7(val) M(val) 59 | #define M8(val) M(val) 60 | #define M9(val) M(val) 61 | #endif 62 | 63 | int ModVal(int theAreaNum, const char* theFileName, int theInt); 64 | double ModVal(int theAreaNum, const char* theFileName, double theDouble); 65 | float ModVal(int theAreaNum, const char* theFileName, float theFloat); 66 | const char* ModVal(int theAreaNum, const char* theFileName, const char *theStr); 67 | bool ReparseModValues(); 68 | void AddModValEnum(const std::string &theEnumName, int theVal); 69 | 70 | } 71 | 72 | #endif //__MODVAL_H__ --------------------------------------------------------------------------------