Permalink
Browse files

checked int the entire source-tree from repressed childhood memories,…

… including all data.
  • Loading branch information...
0 parents commit ae5ea96972cb287c6c70bd4886121db9d8d7f919 @kusma committed Dec 14, 2005
Showing with 165,333 additions and 0 deletions.
  1. +20 −0 very_last_engine_ever.sln
  2. BIN very_last_engine_ever/bass.dll
  3. +32 −0 very_last_engine_ever/config.h
  4. +203 −0 very_last_engine_ever/configdialog.cpp
  5. +53 −0 very_last_engine_ever/configdialog.h
  6. BIN very_last_engine_ever/data/__data_cam_dist.sync
  7. BIN very_last_engine_ever/data/__data_cam_fov.sync
  8. BIN very_last_engine_ever/data/__data_dist_cam.sync
  9. BIN very_last_engine_ever/data/__data_fjall_cam.sync
  10. BIN very_last_engine_ever/data/__data_global_fade.sync
  11. BIN very_last_engine_ever/data/__data_global_feedback.sync
  12. BIN very_last_engine_ever/data/__data_global_glowfade.sync
  13. BIN very_last_engine_ever/data/__data_global_objfade.sync
  14. BIN very_last_engine_ever/data/__data_global_ovalaifade.sync
  15. BIN very_last_engine_ever/data/__data_global_time bias.sync
  16. BIN very_last_engine_ever/data/__data_global_zoom.sync
  17. BIN very_last_engine_ever/data/__data_global_zoom2.sync
  18. BIN very_last_engine_ever/data/__data_value_my.sync
  19. +58 −0 very_last_engine_ever/data/blur.fx
  20. +160,650 −0 very_last_engine_ever/data/fjallblob2k2.x
  21. BIN very_last_engine_ever/data/irvin_-_phyllis_still_craves_for_it.ogg
  22. BIN very_last_engine_ever/data/kjossmae.png
  23. BIN very_last_engine_ever/data/kjossmae2.png
  24. BIN very_last_engine_ever/data/kjossmae3.png
  25. BIN very_last_engine_ever/data/kjossmae4.png
  26. BIN very_last_engine_ever/data/logo.png
  27. BIN very_last_engine_ever/data/pattern_order.sync
  28. +76 −0 very_last_engine_ever/data/prpixel_env.fx
  29. BIN very_last_engine_ever/data/stpeters_cross2.dds
  30. BIN very_last_engine_ever/data/stpeters_cross3.dds
  31. +71 −0 very_last_engine_ever/data/test.fx
  32. +49 −0 very_last_engine_ever/data/test2.fx
  33. +56 −0 very_last_engine_ever/data/tex.fx
  34. +60 −0 very_last_engine_ever/data/tex_blend.fx
  35. BIN very_last_engine_ever/dialog.bmp
  36. +16 −0 very_last_engine_ever/engine/core/core.h
  37. +7 −0 very_last_engine_ever/engine/core/err.h
  38. +16 −0 very_last_engine_ever/engine/core/fatalexception.h
  39. +38 −0 very_last_engine_ever/engine/core/log.cpp
  40. +7 −0 very_last_engine_ever/engine/core/log.h
  41. +23 −0 very_last_engine_ever/engine/core/stateblock.h
  42. +69 −0 very_last_engine_ever/engine/core/surface.h
  43. +42 −0 very_last_engine_ever/engine/core/texture.h
  44. +54 −0 very_last_engine_ever/engine/core/texturesampler.h
  45. +35 −0 very_last_engine_ever/engine/core/vertexbuffer.h
  46. +25 −0 very_last_engine_ever/engine/core/vertexdeclaration.h
  47. +7 −0 very_last_engine_ever/engine/drawable.h
  48. +49 −0 very_last_engine_ever/engine/effect.h
  49. +19 −0 very_last_engine_ever/engine/engine.h
  50. +9 −0 very_last_engine_ever/engine/mesh.h
  51. +51 −0 very_last_engine_ever/engine/resourceproxy.h
  52. +5 −0 very_last_engine_ever/engine/scenegraph/camera.h
  53. +18 −0 very_last_engine_ever/engine/scenegraph/node.cpp
  54. +19 −0 very_last_engine_ever/engine/scenegraph/node.h
  55. +5 −0 very_last_engine_ever/engine/scenegraph/scene.h
  56. +12 −0 very_last_engine_ever/engine/scenegraph/scenegraph.h
  57. +9 −0 very_last_engine_ever/engine/scenerender.cpp
  58. +14 −0 very_last_engine_ever/engine/scenerender.h
  59. +24 −0 very_last_engine_ever/engine/textureproxy.cpp
  60. +9 −0 very_last_engine_ever/engine/textureproxy.h
  61. +82 −0 very_last_engine_ever/engine/vertexstreamer.h
  62. +774 −0 very_last_engine_ever/include/bass.h
  63. +106 −0 very_last_engine_ever/init.cpp
  64. +6 −0 very_last_engine_ever/init.h
  65. BIN very_last_engine_ever/lib/bass.lib
  66. +30 −0 very_last_engine_ever/resource.h
  67. +8 −0 very_last_engine_ever/stdafx.cpp
  68. +54 −0 very_last_engine_ever/stdafx.h
  69. +32 −0 very_last_engine_ever/sync/Sync.cpp
  70. +50 −0 very_last_engine_ever/sync/Sync.h
  71. +143 −0 very_last_engine_ever/sync/SyncConsole.cpp
  72. +34 −0 very_last_engine_ever/sync/SyncConsole.h
  73. +617 −0 very_last_engine_ever/sync/SyncEditor.cpp
  74. +52 −0 very_last_engine_ever/sync/SyncEditor.h
  75. +42 −0 very_last_engine_ever/sync/SyncTimer.h
  76. +217 −0 very_last_engine_ever/sync/SyncTrack.cpp
  77. +82 −0 very_last_engine_ever/sync/synctrack.h
  78. +5 −0 very_last_engine_ever/sync/uglyswitchhack.h
  79. +485 −0 very_last_engine_ever/very_last_engine_ever.cpp
  80. BIN very_last_engine_ever/very_last_engine_ever.exe
  81. +126 −0 very_last_engine_ever/very_last_engine_ever.rc
  82. +478 −0 very_last_engine_ever/very_last_engine_ever.vcproj
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "very_last_engine_ever", "very_last_engine_ever\very_last_engine_ever.vcproj", "{CD862F66-C73B-4E6B-87DE-FB5519A91A5D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD862F66-C73B-4E6B-87DE-FB5519A91A5D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CD862F66-C73B-4E6B-87DE-FB5519A91A5D}.Debug|Win32.Build.0 = Debug|Win32
+ {CD862F66-C73B-4E6B-87DE-FB5519A91A5D}.Release|Win32.ActiveCfg = Release|Win32
+ {CD862F66-C73B-4E6B-87DE-FB5519A91A5D}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Binary file not shown.
@@ -0,0 +1,32 @@
+#pragma once
+
+// #define VJSYS
+
+#define DEFAULT_WIDTH 800
+#define DEFAULT_HEIGHT 600
+#define DEFAULT_FORMAT D3DFMT_X8R8G8B8;
+#define DEFAULT_VSYNC TRUE
+#define DEFAULT_MULTISAMPLE D3DMULTISAMPLE_NONE
+
+#define NEED_STENCIL TRUE
+#define MIN_VS_VERSION D3DVS_VERSION(0, 0)
+// #define MIN_VS_VERSION D3DVS_VERSION(1, 1)
+
+#ifdef NDEBUG
+#define WINDOWED 0
+#else
+#define WINDOWED 1
+#endif
+
+// #undef WINDOWED
+// #define WINDOWED 0
+
+#ifdef VJSYS
+#define DEFAULT_SOUNDCARD 0
+#else
+#define DEFAULT_SOUNDCARD 1
+#endif
+
+// HACK
+// #undef DEFAULT_SOUNDCARD
+// #define DEFAULT_SOUNDCARD 0
@@ -0,0 +1,203 @@
+#include "stdafx.h"
+#include "configdialog.h"
+#include "config.h"
+#include "init.h"
+
+#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0]))
+
+ConfigDialog::ConfigDialog(IDirect3D9 *direct3d) : direct3d(direct3d) {
+ assert(0 != direct3d);
+ reset();
+}
+
+void ConfigDialog::reset() {
+ mode.Width = DEFAULT_WIDTH;
+ mode.Height = DEFAULT_HEIGHT;
+ mode.Format = DEFAULT_FORMAT;
+ mode.RefreshRate = D3DPRESENT_RATE_DEFAULT;
+ vsync = DEFAULT_VSYNC;
+ adapter = D3DADAPTER_DEFAULT;
+ multisample = DEFAULT_MULTISAMPLE;
+ soundcard = DEFAULT_SOUNDCARD;
+}
+
+LRESULT ConfigDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
+
+ // add adapters to list
+ unsigned adapter_count = direct3d->GetAdapterCount();
+ for (unsigned i = 0; i < adapter_count; ++i) {
+ D3DADAPTER_IDENTIFIER9 identifier;
+ memset(&identifier, 0, sizeof(D3DADAPTER_IDENTIFIER9));
+ direct3d->GetAdapterIdentifier(i, 0, &identifier);
+ static char temp[256];
+ sprintf_s(temp, 256, "%s on %s", identifier.DeviceName, identifier.Description);
+ SendMessage(GetDlgItem(IDC_DEVICE), CB_ADDSTRING, 0, (LPARAM)temp);
+ }
+
+ // select first adapter by default
+ SendMessage(GetDlgItem(IDC_DEVICE), (UINT)CB_SETCURSEL, (WPARAM)adapter, 0);
+ refresh_formats();
+ refresh_modes();
+ refresh_multisample_types();
+
+ // set vsync checkbutton to the default setting
+ CheckDlgButton(IDC_VSYNC, DEFAULT_VSYNC);
+
+ // select medium by default
+// CheckDlgButton(IDC_MEDIUM, true);
+// SendMessage(GetDlgItem(IDC_MEDIUM), (UINT)BN_CLICKED, (WPARAM)1, 0);
+// ::PostMessage(GetDlgItem(IDC_MEDIUM), (UINT)BN_CLICKED, (WPARAM)0, 0);
+
+#ifndef VJSYS
+ // playback device
+ for (unsigned i = 0; 0 != BASS_GetDeviceDescription(i); ++i) {
+ SendMessage(GetDlgItem(IDC_SOUNDCARD), CB_ADDSTRING, 0, (LPARAM)BASS_GetDeviceDescription(i));
+ }
+#else
+ // record device
+ for (unsigned i = 0; 0 != BASS_RecordGetDeviceDescription(i); ++i) {
+ SendMessage(GetDlgItem(IDC_SOUNDCARD), CB_ADDSTRING, 0, (LPARAM)BASS_RecordGetDeviceDescription(i));
+ }
+#endif
+
+ // select default soundcard
+ SendMessage(GetDlgItem(IDC_SOUNDCARD), (UINT)CB_SETCURSEL, (WPARAM)DEFAULT_SOUNDCARD, 0);
+
+ return (LRESULT)TRUE;
+}
+
+LRESULT ConfigDialog::OnDeviceChange(WORD wNotifyCode, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
+ adapter = (unsigned)SendMessage(GetDlgItem(IDC_DEVICE), (UINT)CB_GETCURSEL, (WPARAM)0, 0);
+ refresh_formats();
+ refresh_modes();
+ refresh_multisample_types();
+ return (LRESULT)TRUE;
+}
+
+LRESULT ConfigDialog::OnFormatChange(WORD wNotifyCode, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
+ format = (D3DFORMAT)SendMessage(GetDlgItem(IDC_FORMAT), (UINT)CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(IDC_FORMAT), (UINT)CB_GETCURSEL, (WPARAM)0, 0), 0);
+ refresh_modes();
+ refresh_multisample_types();
+ return (LRESULT)TRUE;
+}
+
+LRESULT ConfigDialog::OnResolutionChange(WORD wNotifyCode, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
+ direct3d->EnumAdapterModes(adapter, format, (UINT)SendMessage(GetDlgItem(IDC_RESOLUTION), (UINT)CB_GETCURSEL, (WPARAM)0, 0), &mode);
+ refresh_multisample_types();
+ return (LRESULT)TRUE;
+}
+
+LRESULT ConfigDialog::OnMultisampleChange(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
+{
+ multisample = (D3DMULTISAMPLE_TYPE)SendMessage(GetDlgItem(IDC_MULTISAMPLE), (UINT)CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(IDC_MULTISAMPLE), (UINT)CB_GETCURSEL, (WPARAM)0, 0), 0);
+ // throw FatalException("mordi");
+ return 0;
+}
+
+LRESULT ConfigDialog::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
+ if (IDOK == wID) {
+ vsync = (BST_CHECKED == IsDlgButtonChecked(IDC_VSYNC));
+ soundcard = (unsigned)SendMessage(GetDlgItem(IDC_SOUNDCARD), (UINT)CB_GETCURSEL, (WPARAM)0, 0);
+ }
+ EndDialog(wID);
+ return 0;
+}
+
+void ConfigDialog::refresh_modes() {
+ unsigned mode_count = direct3d->GetAdapterModeCount(adapter, format);
+ unsigned best_mode = 0;
+ unsigned best_mode_refresh_rate = 0;
+
+ SendMessage(GetDlgItem(IDC_RESOLUTION), (UINT)CB_RESETCONTENT, (WPARAM)0, 0);
+
+ for (unsigned i = 0; i < mode_count; ++i) {
+ D3DDISPLAYMODE mode;
+ direct3d->EnumAdapterModes(adapter, format, i, &mode);
+
+ char temp[256];
+ sprintf_s(temp, 256, "%ux%u %uhz", mode.Width, mode.Height, mode.RefreshRate);
+ SendMessage(GetDlgItem(IDC_RESOLUTION), CB_ADDSTRING, 0, (LPARAM)temp);
+
+ if ((this->mode.Width == mode.Width) && (this->mode.Height == mode.Height)) {
+ if (this->mode.RefreshRate == D3DPRESENT_RATE_DEFAULT) {
+ if (best_mode_refresh_rate < mode.RefreshRate) {
+ best_mode = i;
+ best_mode_refresh_rate = mode.RefreshRate;
+ }
+ } else if (this->mode.RefreshRate == mode.RefreshRate) {
+ best_mode = i;
+ }
+ }
+ }
+
+ SendMessage(GetDlgItem(IDC_RESOLUTION), (UINT)CB_SETCURSEL, (WPARAM)best_mode, 0);
+}
+
+static bool is_multisample_type_ok(IDirect3D9 *direct3d, UINT Adapter, D3DFORMAT DepthBufferFormat, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, D3DMULTISAMPLE_TYPE multisample_type) {
+ if (SUCCEEDED(direct3d->CheckDeviceMultiSampleType(Adapter, D3DDEVTYPE_HAL, BackBufferFormat, FALSE, multisample_type, NULL)) &&
+ SUCCEEDED(direct3d->CheckDeviceMultiSampleType(Adapter, D3DDEVTYPE_HAL, DepthBufferFormat, FALSE, multisample_type, NULL)))
+ {
+ return true;
+ }
+ return false;
+}
+
+void ConfigDialog::refresh_multisample_types() {
+ SendMessage(GetDlgItem(IDC_MULTISAMPLE), (UINT)CB_RESETCONTENT, (WPARAM)0, 0);
+
+ static const D3DMULTISAMPLE_TYPE types[] = { D3DMULTISAMPLE_NONE, /* D3DMULTISAMPLE_NONMASKABLE, */ D3DMULTISAMPLE_2_SAMPLES, D3DMULTISAMPLE_3_SAMPLES, D3DMULTISAMPLE_4_SAMPLES, D3DMULTISAMPLE_5_SAMPLES, D3DMULTISAMPLE_6_SAMPLES, D3DMULTISAMPLE_7_SAMPLES, D3DMULTISAMPLE_8_SAMPLES, D3DMULTISAMPLE_9_SAMPLES, D3DMULTISAMPLE_10_SAMPLES, D3DMULTISAMPLE_11_SAMPLES, D3DMULTISAMPLE_12_SAMPLES, D3DMULTISAMPLE_13_SAMPLES, D3DMULTISAMPLE_14_SAMPLES, D3DMULTISAMPLE_15_SAMPLES, D3DMULTISAMPLE_16_SAMPLES };
+// static const char *type_strings[] = { "MULTISAMPLE NONE", /* "MULTISAMPLE NONMASKABLE", */ "MULTISAMPLE 2 SAMPLES", "MULTISAMPLE 3 SAMPLES", "MULTISAMPLE 4 SAMPLES", "MULTISAMPLE 5 SAMPLES", "MULTISAMPLE 6 SAMPLES", "MULTISAMPLE 7 SAMPLES", "MULTISAMPLE 8 SAMPLES", "MULTISAMPLE 9 SAMPLES", "MULTISAMPLE 10 SAMPLES", "MULTISAMPLE 11 SAMPLES", "MULTISAMPLE 12 SAMPLES", "MULTISAMPLE 13 SAMPLES", "MULTISAMPLE 14 SAMPLES", "MULTISAMPLE 15 SAMPLES", "MULTISAMPLE 16 SAMPLES" };
+ static const char *type_strings[] = { "no multisample", /* "MULTISAMPLE NONMASKABLE", */ "2x multisample", "3x multisample", "4x multisample", "5x multisample", "6x multisample", "7x multisample", "8x multisample", "9x multisample", "10x multisample", "11x multisample", "12x multisample", "13x multisample", "14x multisample", "15x multisample", "16x multisample" };
+ assert(ARRAY_SIZE(types) == ARRAY_SIZE(type_strings));
+
+ unsigned best_hit = 0;
+ unsigned item = 0;
+ for (unsigned i = 0; i < ARRAY_SIZE(types); ++i) {
+ if (true == is_multisample_type_ok(direct3d, adapter, format, format, get_best_depth_stencil_format(direct3d, adapter, format), types[i]))
+ {
+ SendMessage(GetDlgItem(IDC_MULTISAMPLE), CB_ADDSTRING, 0, (LPARAM)type_strings[i]);
+ SendMessage(GetDlgItem(IDC_MULTISAMPLE), CB_SETITEMDATA, item, (UINT)types[i]);
+ if (this->multisample == types[i]) best_hit = item;
+ item++;
+ }
+ }
+
+ // select previous selected mode (if found)
+ SendMessage(GetDlgItem(IDC_MULTISAMPLE), (UINT)CB_SETCURSEL, (WPARAM)best_hit, 0);
+}
+
+void ConfigDialog::refresh_formats() {
+ unsigned item = 0;
+
+ SendMessage(GetDlgItem(IDC_FORMAT), (UINT)CB_RESETCONTENT, (WPARAM)0, 0);
+
+ static const D3DFORMAT formats[] = { D3DFMT_A8R8G8B8, D3DFMT_X8R8G8B8, D3DFMT_A2R10G10B10, D3DFMT_R5G6B5, D3DFMT_X1R5G5B5, D3DFMT_A1R5G5B5 };
+ static const char *format_strings[] = { "A8R8G8B8", "X8R8G8B8", "A2R10G10B10", "R5G6B5", "X1R5G5B5", "A1R5G5B5" };
+ assert(ARRAY_SIZE(formats) == ARRAY_SIZE(format_strings));
+
+ unsigned best_hit = 0;
+
+ for (unsigned i = 0; i < (sizeof(formats) / sizeof(formats[0])); ++i) {
+ D3DDISPLAYMODE mode;
+ if (SUCCEEDED(direct3d->EnumAdapterModes(adapter, formats[i], 0, &mode))) {
+ SendMessage(GetDlgItem(IDC_FORMAT), CB_ADDSTRING, 0, (LPARAM)format_strings[i]);
+ SendMessage(GetDlgItem(IDC_FORMAT), CB_SETITEMDATA, item, formats[i]);
+
+ if (this->format == formats[i]) best_hit = item;
+ item++;
+ }
+ }
+
+ SendMessage(GetDlgItem(IDC_FORMAT), (UINT)CB_SETCURSEL, (WPARAM)0, 0);
+ format = (D3DFORMAT)SendMessage(GetDlgItem(IDC_FORMAT), (UINT)CB_GETITEMDATA, (WPARAM)best_hit, 0);
+}
+
+void ConfigDialog::enable_config(bool enable) {
+// ::ShowWindow(GetDlgItem(IDC_FORMAT), SW_HIDE);
+ ::EnableWindow(GetDlgItem(IDC_DEVICE), enable);
+ ::EnableWindow(GetDlgItem(IDC_FORMAT), enable);
+ ::EnableWindow(GetDlgItem(IDC_RESOLUTION), enable);
+ ::EnableWindow(GetDlgItem(IDC_MULTISAMPLE), enable);
+ ::EnableWindow(GetDlgItem(IDC_VSYNC), enable);
+ ::EnableWindow(GetDlgItem(IDC_SOUNDCARD), enable);
+}
@@ -0,0 +1,53 @@
+#pragma once
+
+#include "resource.h"
+
+class ConfigDialog : public CDialogImpl<ConfigDialog> {
+public:
+ enum { IDD = IDD_CONFIG };
+
+ BEGIN_MSG_MAP(CAboutDlg)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
+ COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
+ COMMAND_HANDLER(IDC_DEVICE, CBN_SELCHANGE, OnDeviceChange)
+ COMMAND_HANDLER(IDC_FORMAT, CBN_SELCHANGE, OnFormatChange)
+ COMMAND_HANDLER(IDC_RESOLUTION, CBN_SELCHANGE, OnResolutionChange)
+ COMMAND_HANDLER(IDC_MULTISAMPLE, CBN_SELCHANGE, OnMultisampleChange)
+ END_MSG_MAP()
+
+ ConfigDialog(IDirect3D9 *direct3d);
+ void reset();
+
+ LRESULT OnInitDialog(UINT Msg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+
+ LRESULT OnDeviceChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+ LRESULT OnFormatChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+ LRESULT OnResolutionChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+ LRESULT OnMultisampleChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+ LRESULT OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+
+ UINT get_adapter() const { return adapter; }
+ D3DDISPLAYMODE get_mode() const { return mode; }
+ D3DMULTISAMPLE_TYPE get_multisample() const { return multisample; }
+
+ bool get_vsync() const { return vsync; }
+ unsigned get_soundcard() const { return soundcard; }
+
+protected:
+
+ void refresh_formats();
+ void refresh_modes();
+ void refresh_multisample_types();
+
+ void enable_config(bool enable);
+
+ IDirect3D9 *direct3d;
+ UINT adapter;
+ D3DDISPLAYMODE mode;
+ D3DFORMAT format;
+ D3DMULTISAMPLE_TYPE multisample;
+
+ bool vsync;
+ unsigned soundcard;
+};
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,58 @@
+string XFile = "misc\\teapot.x";
+int BCLR = 0xff202060;
+
+float2 dir = {0.0, 0.0};
+float alpha[8];
+
+// textures
+texture blur_tex;
+
+sampler blur_sampler = sampler_state
+{
+ Texture = (blur_tex);
+ MipFilter = POINT;
+ MinFilter = POINT;
+ MagFilter = POINT;
+
+ AddressU = CLAMP;
+ AddressV = CLAMP;
+};
+
+struct VS_OUTPUT
+{
+ float4 pos : POSITION;
+ float2 tex : TEXCOORD1;
+};
+
+VS_OUTPUT vertex(float4 ipos : POSITION)
+{
+ VS_OUTPUT Out;
+ Out.pos = ipos;
+ Out.tex = float2(Out.pos.x * 0.5 + 0.5f + (0.5f / 256) - 4 * dir.x, -Out.pos.y * 0.5 + 0.5f + (0.5f / 256) - 4 * dir.y);
+// Out.tex = float2(Out.pos.x * 0.5 + 0.5f - (0.5f / 256), -Out.pos.y * 0.5 + 0.5f - (0.5f / 256));
+ return Out;
+}
+
+float4 pixel(VS_OUTPUT In) : COLOR
+{
+// float4 color = tex2D(blur_sampler, In.tex1);
+// color += tex2D(blur_sampler, In.tex2);
+
+ float4 color = 0;
+ float2 tex = In.tex;
+ for (int i = 0; i < 8; i++)
+ {
+ color += tex2D(blur_sampler, tex) * alpha[i];
+ tex += dir;
+ }
+ return color;
+}
+
+technique blur_ps_vs_2_0
+{
+ pass P0
+ {
+ VertexShader = compile vs_2_0 vertex();
+ PixelShader = compile ps_2_0 pixel();
+ }
+}
Oops, something went wrong.

0 comments on commit ae5ea96

Please sign in to comment.