Skip to content

Commit

Permalink
1.0.01.000
Browse files Browse the repository at this point in the history
Add Scallop Phase property; modulating it produces wavy scallops.
Add Load Texture command to File menu, so it's more obvious how to load
texture.
Allow texture file to be loaded via drag and drop from Explorer.
Add check for updates feature.
Optimize texture mapping, by copying texture from outer to inner wall.
Add option to continuously update view during spline dragging.
  • Loading branch information
victimofleisure committed Sep 6, 2017
1 parent d82fe51 commit 9c79f9d
Show file tree
Hide file tree
Showing 28 changed files with 1,001 additions and 574 deletions.
Binary file modified PotterDraw.chm
Binary file not shown.
58 changes: 58 additions & 0 deletions PotterDraw/DLLWrap.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyleft 2013 Chris Korda
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
/*
chris korda
revision history:
rev date comments
00 30jan13 initial version
wrap transient DLL instance to avoid leaks
*/

#include "stdafx.h"
#include "DLLWrap.h"
#include "atlconv.h" // for ATL string conversion macros

CDLLWrap::CDLLWrap()
{
m_hInst = NULL;
}

CDLLWrap::~CDLLWrap()
{
FreeLibrary();
}

bool CDLLWrap::LoadLibrary(LPCTSTR lpLibFileName)
{
FreeLibrary(); // allow reuse of instance
m_hInst = ::LoadLibrary(lpLibFileName);
return(IsLoaded());
}

bool CDLLWrap::LoadLibraryEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
FreeLibrary(); // allow reuse of instance
m_hInst = ::LoadLibraryEx(lpLibFileName, hFile, dwFlags);
return(IsLoaded());
}

bool CDLLWrap::FreeLibrary()
{
if (!IsLoaded()) // if library not loaded
return(FALSE);
if (!::FreeLibrary(m_hInst)) // if free fails
return(FALSE);
m_hInst = NULL; // invalidate handle
return(TRUE);
}

FARPROC CDLLWrap::GetProcAddress(LPCTSTR lpProcName)
{
USES_CONVERSION; // for ATL string conversion macros
return(::GetProcAddress(m_hInst, T2CA(lpProcName)));
}
44 changes: 44 additions & 0 deletions PotterDraw/DLLWrap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyleft 2013 Chris Korda
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
/*
chris korda
revision history:
rev date comments
00 30jan13 initial version
wrap transient DLL instance to avoid leaks
*/

#ifndef CDLLWRAP_INCLUDED
#define CDLLWRAP_INCLUDED

class CDLLWrap : public WObject {
public:
// Construction
CDLLWrap();
~CDLLWrap();

// Attributes
bool IsLoaded() const;
FARPROC GetProcAddress(LPCTSTR lpProcName);

// Operations
bool LoadLibrary(LPCTSTR lpLibFileName);
bool LoadLibraryEx(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
bool FreeLibrary();

protected:
// Data members
HINSTANCE m_hInst; // handle to DLL instance
};

inline bool CDLLWrap::IsLoaded() const
{
return(m_hInst != NULL);
}

#endif
2 changes: 1 addition & 1 deletion PotterDraw/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum { // application-wide user window messages, based on WP_APP
UWM_PALETTE_CHANGE, // wParam: iColor or -1 for all, lParam: COLORREF
UWM_PALETTE_SELECTION, // wParam: iColor, lParam: unused
UWM_SET_RECORD, // wParam: bEnable, lParam: none
UWM_PROPERTY_HELP, // wParam: iProp, lParam: CWnd*
UWM_DELAYEDCREATE, // wParam: none, lParam: none
};

// ck: wrapper for formatting system errors
Expand Down
277 changes: 147 additions & 130 deletions PotterDraw/HelpIDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,133 +23,150 @@
#define IDH_Properties_Mesh_Wall_Thickness 23
#define IDH_Properties_Mesh_Scallops 24
#define IDH_Properties_Mesh_Scallop_Depth 25
#define IDH_Properties_Mesh_Scallop_Motif 26
#define IDH_Properties_Mesh_Ripples 27
#define IDH_Properties_Mesh_Ripple_Depth 28
#define IDH_Properties_Mesh_Ripple_Phase 29
#define IDH_Properties_Mesh_Ripple_Motif 30
#define IDH_Properties_Mesh_Twist 31
#define IDH_Properties_Mesh_Bends 32
#define IDH_Properties_Mesh_Bend_Depth 33
#define IDH_Properties_Mesh_Bend_Phase 34
#define IDH_Properties_Mesh_Bend_Motif 35
#define IDH_Properties_Mesh_Bend_Poles 36
#define IDH_Properties_Mesh_Bend_Pole_Phase 37
#define IDH_Properties_Mesh_Bend_Pole_Motif 38
#define IDH_Properties_Mesh_Helix_Frequency 39
#define IDH_Properties_Mesh_Helix_Amplitude 40
#define IDH_Properties_Mesh_Aspect_Ratio 41
#define IDH_Properties_Texture_Texture_Path 42
#define IDH_Properties_Texture_Colors 43
#define IDH_Properties_Texture_Color_Sharpness 44
#define IDH_Properties_Texture_Color_Cycles 45
#define IDH_Properties_Texture_Stripe_Frequency 46
#define IDH_Properties_Texture_Stripe_Amplitude 47
#define IDH_Properties_Texture_Stripe_Phase 48
#define IDH_Properties_Texture_Petals 49
#define IDH_Properties_Texture_Color_Pattern 50
#define IDH_Properties_Texture_Palette_Type 51
#define IDH_Properties_Texture_U_Offset 52
#define IDH_Properties_Texture_V_Offset 53
#define IDH_Properties_Texture_Cycles_V 54
#define IDH_Properties_View_Animation 55
#define IDH_Properties_View_Auto_Rotate_Yaw 56
#define IDH_Properties_View_Auto_Rotate_Pitch 57
#define IDH_Properties_View_Auto_Rotate_Roll 58
#define IDH_Properties_View_Frame_Rate 59
#define IDH_Properties_View_Background_Color 60
#define IDH_Modulation_Modulation 61
#define IDH_Modulation_Modulation_Creating_modulations 62
#define IDH_Modulation_Target 63
#define IDH_Modulation_Waveform 64
#define IDH_Modulation_Operation 65
#define IDH_Modulation_Range 66
#define IDH_Modulation_Motif 67
#define IDH_Modulation_Frequency 68
#define IDH_Modulation_Amplitude 69
#define IDH_Modulation_Phase 70
#define IDH_Modulation_Bias 71
#define IDH_Modulation_Power 72
#define IDH_Modulation_Phase_Speed 73
#define IDH_Oscilloscope_Oscilloscope 74
#define IDH_Palette_Palette 75
#define IDH_Palette_Palette_Editing_a_color 76
#define IDH_Palette_Palette_Standard_color_picker 77
#define IDH_Palette_Palette_Custom_color_picker 78
#define IDH_Palette_Palette_Palette_editing_commands 79
#define IDH_Palette_Texture_synthesis 80
#define IDH_Menus_File_New 81
#define IDH_Menus_File_Open 82
#define IDH_Menus_File_Close 83
#define IDH_Menus_File_Save 84
#define IDH_Menus_File_Save_As 85
#define IDH_Menus_File_Export 86
#define IDH_Menus_File_Export_2D_exports 87
#define IDH_Menus_File_Export_3D_exports 88
#define IDH_Menus_File_Record 89
#define IDH_Menus_File_Print_Setup 90
#define IDH_Menus_File_Print_Setup_Print_Setup_Printer 91
#define IDH_Menus_File_Print_Setup_Print_Setup_Paper 92
#define IDH_Menus_File_Print_Setup_Print_Setup_Orientation 93
#define IDH_Menus_File_Print_Preview 94
#define IDH_Menus_File_Print 95
#define IDH_Menus_File_Exit 96
#define IDH_Menus_Edit_Undo 97
#define IDH_Menus_Edit_Redo 98
#define IDH_Menus_Edit_Cut 99
#define IDH_Menus_Edit_Copy 100
#define IDH_Menus_Edit_Paste 101
#define IDH_Menus_Edit_Delete 102
#define IDH_Menus_Edit_Select_All 103
#define IDH_Menus_View_Toolbars_and_Docking_Windows 104
#define IDH_Menus_View_Status_Bar 105
#define IDH_Menus_View_Record_Status 106
#define IDH_Menus_View_Application_Look 107
#define IDH_Menus_View_Application_Look_Tabs 108
#define IDH_Menus_View_Rotation 109
#define IDH_Menus_View_Rotation_Auto_Rotate 110
#define IDH_Menus_View_Rotation_Zero_Rotation 111
#define IDH_Menus_View_Rotation_Edit_Rotation 112
#define IDH_Menus_View_Pan 113
#define IDH_Menus_View_Pan_Edit_Panning 114
#define IDH_Menus_View_Zoom_In 115
#define IDH_Menus_View_Zoom_Out 116
#define IDH_Menus_View_Zoom_Reset 117
#define IDH_Menus_View_Wireframe 118
#define IDH_Menus_View_Gouraud 119
#define IDH_Menus_View_Highlights 120
#define IDH_Menus_View_Culling 121
#define IDH_Menus_View_Texture 122
#define IDH_Menus_View_Enable_Animation 123
#define IDH_Menus_View_Bounds 124
#define IDH_Menus_Spline_Add_Node 125
#define IDH_Menus_Spline_Delete_Node 126
#define IDH_Menus_Spline_Translate 127
#define IDH_Menus_Spline_Scale 128
#define IDH_Menus_Spline_Rotate 129
#define IDH_Menus_Spline_Flip_Horizontal 130
#define IDH_Menus_Spline_Flip_Vertical 131
#define IDH_Menus_Spline_Show_Grid 132
#define IDH_Menus_Spline_Snap_to_Grid 133
#define IDH_Menus_Spline_Show_Rulers 134
#define IDH_Menus_Spline_Opposite_Wall 135
#define IDH_Menus_Spline_Grid_Setup 136
#define IDH_Menus_Spline_Import_Spline 137
#define IDH_Menus_Spline_Export_Spline 138
#define IDH_Menus_Spline_Node_Type 139
#define IDH_Menus_Spline_Segment_Type 140
#define IDH_Menus_Spline_Zoom 141
#define IDH_Menus_Tools_Options 142
#define IDH_Menus_Tools_Mesh_Information 143
#define IDH_Menus_Window_New_Window 144
#define IDH_Menus_Window_Cascade 145
#define IDH_Menus_Window_Tile_Horizontal 146
#define IDH_Menus_Window_Tile_Vertical 147
#define IDH_Menus_Window_Arrange_Icons 148
#define IDH_Menus_Window_Full_Screen 149
#define IDH_Menus_Help_Help_Topics 150
#define IDH_Menus_Help_About 151
#define IDH_Reference_Normalized_angle 152
#define IDH_Reference_Properties_Summary 153
#define IDH_Reference_Options_Summary 154
#define IDH_Reference_Shortcuts 155
#define IDH_Properties_Mesh_Scallop_Phase 26
#define IDH_Properties_Mesh_Scallop_Motif 27
#define IDH_Properties_Mesh_Ripples 28
#define IDH_Properties_Mesh_Ripple_Depth 29
#define IDH_Properties_Mesh_Ripple_Phase 30
#define IDH_Properties_Mesh_Ripple_Motif 31
#define IDH_Properties_Mesh_Twist 32
#define IDH_Properties_Mesh_Bends 33
#define IDH_Properties_Mesh_Bend_Depth 34
#define IDH_Properties_Mesh_Bend_Phase 35
#define IDH_Properties_Mesh_Bend_Motif 36
#define IDH_Properties_Mesh_Bend_Poles 37
#define IDH_Properties_Mesh_Bend_Pole_Phase 38
#define IDH_Properties_Mesh_Bend_Pole_Motif 39
#define IDH_Properties_Mesh_Helix_Frequency 40
#define IDH_Properties_Mesh_Helix_Amplitude 41
#define IDH_Properties_Mesh_Aspect_Ratio 42
#define IDH_Properties_Texture_Texture_Path 43
#define IDH_Properties_Texture_Colors 44
#define IDH_Properties_Texture_Color_Sharpness 45
#define IDH_Properties_Texture_Color_Cycles 46
#define IDH_Properties_Texture_Stripe_Frequency 47
#define IDH_Properties_Texture_Stripe_Amplitude 48
#define IDH_Properties_Texture_Stripe_Phase 49
#define IDH_Properties_Texture_Petals 50
#define IDH_Properties_Texture_Color_Pattern 51
#define IDH_Properties_Texture_Palette_Type 52
#define IDH_Properties_Texture_U_Offset 53
#define IDH_Properties_Texture_V_Offset 54
#define IDH_Properties_Texture_Cycles_V 55
#define IDH_Properties_View_Animation 56
#define IDH_Properties_View_Auto_Rotate_Yaw 57
#define IDH_Properties_View_Auto_Rotate_Pitch 58
#define IDH_Properties_View_Auto_Rotate_Roll 59
#define IDH_Properties_View_Frame_Rate 60
#define IDH_Properties_View_Background_Color 61
#define IDH_Modulation_Modulation 62
#define IDH_Modulation_Modulation_Creating_modulations 63
#define IDH_Modulation_Target 64
#define IDH_Modulation_Waveform 65
#define IDH_Modulation_Operation 66
#define IDH_Modulation_Range 67
#define IDH_Modulation_Motif 68
#define IDH_Modulation_Frequency 69
#define IDH_Modulation_Amplitude 70
#define IDH_Modulation_Phase 71
#define IDH_Modulation_Bias 72
#define IDH_Modulation_Power 73
#define IDH_Modulation_Phase_Speed 74
#define IDH_Oscilloscope_Oscilloscope 75
#define IDH_Palette_Palette 76
#define IDH_Palette_Palette_Editing_a_color 77
#define IDH_Palette_Palette_Standard_color_picker 78
#define IDH_Palette_Palette_Custom_color_picker 79
#define IDH_Palette_Palette_Palette_editing_commands 80
#define IDH_Palette_Texture_synthesis 81
#define IDH_Menus_File_New 82
#define IDH_Menus_File_Open 83
#define IDH_Menus_File_Close 84
#define IDH_Menus_File_Save 85
#define IDH_Menus_File_Save_As 86
#define IDH_Menus_File_Export 87
#define IDH_Menus_File_Export_2D_exports 88
#define IDH_Menus_File_Export_3D_exports 89
#define IDH_Menus_File_Record 90
#define IDH_Menus_File_Load_Texture 91
#define IDH_Menus_File_Print_Setup 92
#define IDH_Menus_File_Print_Setup_Print_Setup_Printer 93
#define IDH_Menus_File_Print_Setup_Print_Setup_Paper 94
#define IDH_Menus_File_Print_Setup_Print_Setup_Orientation 95
#define IDH_Menus_File_Print_Preview 96
#define IDH_Menus_File_Print 97
#define IDH_Menus_File_Exit 98
#define IDH_Menus_Edit_Undo 99
#define IDH_Menus_Edit_Redo 100
#define IDH_Menus_Edit_Cut 101
#define IDH_Menus_Edit_Copy 102
#define IDH_Menus_Edit_Paste 103
#define IDH_Menus_Edit_Delete 104
#define IDH_Menus_Edit_Select_All 105
#define IDH_Menus_View_Toolbars_and_Docking_Windows 106
#define IDH_Menus_View_Status_Bar 107
#define IDH_Menus_View_Record_Status 108
#define IDH_Menus_View_Application_Look 109
#define IDH_Menus_View_Application_Look_Tabs 110
#define IDH_Menus_View_Rotation 111
#define IDH_Menus_View_Rotation_Auto_Rotate 112
#define IDH_Menus_View_Rotation_Zero_Rotation 113
#define IDH_Menus_View_Rotation_Edit_Rotation 114
#define IDH_Menus_View_Pan 115
#define IDH_Menus_View_Pan_Edit_Panning 116
#define IDH_Menus_View_Zoom_In 117
#define IDH_Menus_View_Zoom_Out 118
#define IDH_Menus_View_Zoom_Reset 119
#define IDH_Menus_View_Wireframe 120
#define IDH_Menus_View_Gouraud 121
#define IDH_Menus_View_Highlights 122
#define IDH_Menus_View_Culling 123
#define IDH_Menus_View_Texture 124
#define IDH_Menus_View_Enable_Animation 125
#define IDH_Menus_View_Bounds 126
#define IDH_Menus_Spline_Add_Node 127
#define IDH_Menus_Spline_Delete_Node 128
#define IDH_Menus_Spline_Translate 129
#define IDH_Menus_Spline_Scale 130
#define IDH_Menus_Spline_Rotate 131
#define IDH_Menus_Spline_Flip_Horizontal 132
#define IDH_Menus_Spline_Flip_Vertical 133
#define IDH_Menus_Spline_Show_Grid 134
#define IDH_Menus_Spline_Snap_to_Grid 135
#define IDH_Menus_Spline_Show_Rulers 136
#define IDH_Menus_Spline_Opposite_Wall 137
#define IDH_Menus_Spline_Grid_Setup 138
#define IDH_Menus_Spline_Import_Spline 139
#define IDH_Menus_Spline_Export_Spline 140
#define IDH_Menus_Spline_Node_Type 141
#define IDH_Menus_Spline_Segment_Type 142
#define IDH_Menus_Spline_Zoom 143
#define IDH_Menus_Tools_Options 144
#define IDH_Menus_Tools_Mesh_Information 145
#define IDH_Menus_Window_New_Window 146
#define IDH_Menus_Window_Cascade 147
#define IDH_Menus_Window_Tile_Horizontal 148
#define IDH_Menus_Window_Tile_Vertical 149
#define IDH_Menus_Window_Arrange_Icons 150
#define IDH_Menus_Window_Full_Screen 151
#define IDH_Menus_Help_Help_Topics 152
#define IDH_Menus_Help_PotterDraw_on_the_Web 153
#define IDH_Menus_Help_Check_for_Updates 154
#define IDH_Menus_Help_About 155
#define IDH_Options_Zoom_Step 156
#define IDH_Options_Pan_Step 157
#define IDH_Options_Drag_Rotate_Step 158
#define IDH_Options_Use_Vertex_Color 159
#define IDH_Options_Use_Custom_Image_Size 160
#define IDH_Options_Custom_Image_Width 161
#define IDH_Options_Custom_Image_Height 162
#define IDH_Options_Floating_Point_Precision 163
#define IDH_Options_Plot_All_Modulations 164
#define IDH_Options_Spline_Zoom_Step 165
#define IDH_Options_Show_Spline_Drag_in_View 166
#define IDH_Options_Show_Property_Descriptions 167
#define IDH_Options_Automatically_check_for_updates 168
#define IDH_Reference_Normalized_angle 169
#define IDH_Reference_Properties_Summary 170
#define IDH_Reference_Options_Summary 171
#define IDH_Reference_Shortcuts 172
Loading

0 comments on commit 9c79f9d

Please sign in to comment.