Skip to content

Commit

Permalink
Magnetic 2.2 Windows r10
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kinder committed Feb 25, 2007
1 parent 4a9a3d4 commit 5230b04
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Amiga/amiga.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Magnetic - Magnetic Scrolls Interpreter.
*
* Written by Niclas Karlsson <[email protected]>,
* David Kinder <d.kinder@btinternet.com>,
* David Kinder <davidk.kinder@virgin.net>,
* Stefan Meier <[email protected]> and
* Paul David Doherty <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion Dos/maindos.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Magnetic - Magnetic Scrolls Interpreter.
*
* Written by Niclas Karlsson <[email protected]>,
* David Kinder <d.kinder@btinternet.com>,
* David Kinder <davidk.kinder@virgin.net>,
* Stefan Meier <[email protected]> and
* Paul David Doherty <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion Dos32/allegro.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Magnetic - Magnetic Scrolls Interpreter.
*
* Written by Niclas Karlsson <[email protected]>,
* David Kinder <d.kinder@btinternet.com>,
* David Kinder <davidk.kinder@virgin.net>,
* Stefan Meier <[email protected]> and
* Paul David Doherty <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion Generic/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Magnetic - Magnetic Scrolls Interpreter.
*
* Written by Niclas Karlsson <[email protected]>,
* David Kinder <d.kinder@btinternet.com>,
* David Kinder <davidk.kinder@virgin.net>,
* Stefan Meier <[email protected]> and
* Paul David Doherty <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion Generic/emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Magnetic - Magnetic Scrolls Interpreter.
*
* Written by Niclas Karlsson <[email protected]>,
* David Kinder <d.kinder@btinternet.com>,
* David Kinder <davidk.kinder@virgin.net>,
* Stefan Meier <[email protected]> and
* Paul David Doherty <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion Generic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Magnetic - Magnetic Scrolls Interpreter.
*
* Written by Niclas Karlsson <[email protected]>,
* David Kinder <d.kinder@btinternet.com>,
* David Kinder <davidk.kinder@virgin.net>,
* Stefan Meier <[email protected]> and
* Paul David Doherty <[email protected]>
*
Expand Down
22 changes: 11 additions & 11 deletions MakeDist.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
@echo off

"\Program Files\Info-ZIP\Zip\zip" -j \Temp\MagneticDOS.zip COPYING Dos\*.exe Dos\*.fnt Dos\magnetic.txt
"\Program Files\Zip\zip" -j \Temp\MagneticDOS.zip COPYING Dos\*.exe Dos\*.fnt Dos\magnetic.txt

"\Program Files\Info-ZIP\Zip\zip" -j \Temp\MagneticDOS32.zip COPYING Dos32\magnetic.exe Dos32\*.fnt
"\Program Files\Info-ZIP\Zip\zip" -j \Temp\MagneticDOS32.zip Dos32\allegro.cfg Dos32\keyboard.dat Dos32\magnetic.txt
"\Program Files\Zip\zip" -j \Temp\MagneticDOS32.zip COPYING Dos32\magnetic.exe Dos32\*.fnt
"\Program Files\Zip\zip" -j \Temp\MagneticDOS32.zip Dos32\allegro.cfg Dos32\keyboard.dat Dos32\magnetic.txt

"\Program Files\Info-ZIP\Zip\zip" -j \Temp\MagneticWin.zip COPYING Win\Release\*.exe Win\Release\*.chm
"\Program Files\Zip\zip" -j \Temp\MagneticWin.zip COPYING Win\Release\*.exe Win\Release\*.chm

"\Program Files\Info-ZIP\Zip\zip" \Temp\MagneticSrc.zip COPYING MakeDist.bat Generic\* Scripts\* Amiga\*
"\Program Files\Info-ZIP\Zip\zip" \Temp\MagneticSrc.zip Dos\*.c Dos\makefile Dos\bcc.cfg Dos\build.txt
"\Program Files\Info-ZIP\Zip\zip" \Temp\MagneticSrc.zip Dos32\allegro.c Dos32\makefile
"\Program Files\Info-ZIP\Zip\zip" -r \Temp\MagneticSrc.zip Win\* -x Win\Release\*
"\Program Files\Zip\zip" \Temp\MagneticSrc.zip COPYING MakeDist.bat Generic\* Scripts\* Amiga\*
"\Program Files\Zip\zip" \Temp\MagneticSrc.zip Dos\*.c Dos\makefile Dos\bcc.cfg Dos\build.txt
"\Program Files\Zip\zip" \Temp\MagneticSrc.zip Dos32\allegro.c Dos32\makefile
"\Program Files\Zip\zip" -r \Temp\MagneticSrc.zip Win\* -x Win\Release\*
pushd \Programs
"\Program Files\Info-ZIP\Zip\zip" \Temp\MagneticSrc.zip Libraries\mfc\BCMenu.*
"\Program Files\Info-ZIP\Zip\zip" \Temp\MagneticSrc.zip Libraries\mfc\ColourButton.*
"\Program Files\Zip\zip" \Temp\MagneticSrc.zip Libraries\mfc\BCMenu.*
"\Program Files\Zip\zip" \Temp\MagneticSrc.zip Libraries\mfc\ColourButton.*
popd

"\Program Files\Info-ZIP\Zip\zip" \Temp\MagneticSrc.zip Glk\* Gtk\*
"\Program Files\Zip\zip" \Temp\MagneticSrc.zip Glk\* Gtk\*

32 changes: 29 additions & 3 deletions Win/Magnetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "StdAfx.h"
#include <string.h>
#include <stdlib.h>
#include <memory>

#include "Magnetic.h"
#include "MagneticDoc.h"
Expand Down Expand Up @@ -129,8 +130,8 @@ BOOL CMagneticApp::InitInstance()
// Create file dialog for loading games
m_pNewGameDialog = new CFileDialog(TRUE,NULL,
GetProfileString("Settings","Last File",""),
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY,
"Magnetic Files (*.mag)|*.mag|All Files (*.*)|*.*||");
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_ENABLESIZING,
"Magnetic Files (*.mag)|*.mag|All Files (*.*)|*.*||",NULL,0);
if (m_pNewGameDialog == NULL)
return FALSE;
m_pNewGameDialog->m_ofn.lpstrTitle = "Open a Magnetic Scrolls game";
Expand Down Expand Up @@ -491,8 +492,9 @@ class CAboutDlg : public CDialog

// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CAboutDlg)
// No message handlers
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
Expand All @@ -516,6 +518,30 @@ BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Get the static logo bitmap control
CRect logoRect;
CWnd* logoWnd = GetDlgItem(IDC_LOGO);
logoWnd->GetWindowRect(logoRect);
ScreenToClient(logoRect);
double aspect = ((double)logoRect.Width())/logoRect.Height();

// Get the credits group control
CRect creditsRect;
CWnd* creditsWnd = GetDlgItem(IDC_CREDITS);
creditsWnd->GetWindowRect(creditsRect);
ScreenToClient(creditsRect);

// Resize the logo
logoRect.right = creditsRect.left-logoRect.left;
logoRect.bottom = logoRect.top+(int)(logoRect.Width()/aspect);
logoWnd->MoveWindow(logoRect);
return TRUE;
}

// App command to run the dialog
void CMagneticApp::OnAppAbout()
{
Expand Down
8 changes: 4 additions & 4 deletions Win/Magnetic.rc
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
CAPTION "About Magnetic"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL 129,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE |
SS_SUNKEN,6,4,81,110,WS_EX_CLIENTEDGE
GROUPBOX "Credits",IDC_STATIC,94,4,178,89
CONTROL 129,IDC_LOGO,"Static",SS_BITMAP |
SS_SUNKEN,6,4,70,88,WS_EX_CLIENTEDGE
GROUPBOX "Credits",IDC_CREDITS,94,4,178,89
LTEXT "Magnetic v2.2, an interpreter for Magnetic Scrolls games. Copyright � 1997-2004 Niclas Karlsson.",
IDC_STATIC,99,16,165,16
LTEXT "Magnetic is released under the terms of the GNU General Public License.",
IDC_STATIC,100,35,160,16
LTEXT "Magnetic was written by Niclas Karlsson,\nDavid Kinder, Stefan Meier and Paul David Doherty.",
IDC_STATIC,99,54,170,16
LTEXT "Magnetic for Windows Release 9.\nWindows version written by David Kinder.",
LTEXT "Magnetic for Windows Release 10.\nWindows version written by David Kinder.",
IDC_STATIC,99,73,141,16
DEFPUSHBUTTON "OK",IDOK,159,98,48,14,WS_GROUP
END
Expand Down
20 changes: 10 additions & 10 deletions Win/MagneticView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ void CMagneticView::OnTimer(UINT nIDEvent)
void CMagneticView::OnRecord()
{
CMagneticApp* pApp = (CMagneticApp*)AfxGetApp();
CFileDialog RecordDlg(FALSE,NULL,m_strRecName,OFN_HIDEREADONLY,
"Record Files (*.rec)|*.rec|All Files (*.*)|*.*||",this);
CFileDialog RecordDlg(FALSE,NULL,m_strRecName,OFN_HIDEREADONLY|OFN_ENABLESIZING,
"Record Files (*.rec)|*.rec|All Files (*.*)|*.*||",this,0);
RecordDlg.m_ofn.lpstrTitle = "Record Input File";

switch (m_Recording)
Expand Down Expand Up @@ -335,8 +335,8 @@ void CMagneticView::OnPlayback()
{
CMagneticApp* pApp = (CMagneticApp*)AfxGetApp();
CFileDialog PlayDlg(TRUE,NULL,m_strRecName,
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY,
"Record Files (*.rec)|*.rec|All Files (*.*)|*.*||",this);
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_ENABLESIZING,
"Record Files (*.rec)|*.rec|All Files (*.*)|*.*||",this,0);
PlayDlg.m_ofn.lpstrTitle = "Play Back a File";

switch (m_Recording)
Expand Down Expand Up @@ -369,8 +369,8 @@ void CMagneticView::OnPlayback()
void CMagneticView::OnScript()
{
CMagneticApp* pApp = (CMagneticApp*)AfxGetApp();
CFileDialog ScriptDlg(FALSE,NULL,m_strScrName,OFN_HIDEREADONLY,
"Script Files (*.scr)|*.scr|All Files (*.*)|*.*||",this);
CFileDialog ScriptDlg(FALSE,NULL,m_strScrName,OFN_HIDEREADONLY|OFN_ENABLESIZING,
"Script Files (*.scr)|*.scr|All Files (*.*)|*.*||",this,0);
ScriptDlg.m_ofn.lpstrTitle = "Scripting";

switch (m_Scripting)
Expand Down Expand Up @@ -1458,8 +1458,8 @@ type8 ms_load_file(type8s *name, type8 *ptr, type16 size)
return 0;

CFileDialog LoadDlg(TRUE,NULL,pView->GetFileName(),
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY,
"Saved Game Files (*.sav)|*.sav|All Files (*.*)|*.*||",pView);
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_ENABLESIZING,
"Saved Game Files (*.sav)|*.sav|All Files (*.*)|*.*||",pView,0);
LoadDlg.m_ofn.lpstrTitle = "Load a Saved Game";

if (ms_is_running())
Expand Down Expand Up @@ -1495,8 +1495,8 @@ type8 ms_save_file(type8s *name, type8 *ptr, type16 size)
if (pView == NULL)
return 0;

CFileDialog SaveDlg(FALSE,NULL,pView->GetFileName(),OFN_HIDEREADONLY,
"Saved Game Files (*.sav)|*.sav|All Files (*.*)|*.*||",pView);
CFileDialog SaveDlg(FALSE,NULL,pView->GetFileName(),OFN_HIDEREADONLY|OFN_ENABLESIZING,
"Saved Game Files (*.sav)|*.sav|All Files (*.*)|*.*||",pView,0);
SaveDlg.m_ofn.lpstrTitle = "Save the Current Game";

if (ms_is_running())
Expand Down
5 changes: 0 additions & 5 deletions Win/README.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

This is the source code for the Windows port of Niclas Karlsson's
Magnetic interpreter. To rebuild, you will need Microsoft Visual C++
7.0 (Visual C++.NET) or newer.

David Kinder
[email protected]
1st August 2002

Binary file modified Win/help/Magnetic.chm
Binary file not shown.
6 changes: 3 additions & 3 deletions Win/help/credits.htm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>Credits</h1>
<strong>Niclas Karlsson</strong> <a href="mailto:[email protected]">[email protected]</a><br>
Development of the Magnetic interpreter.
<p>
<strong>David Kinder</strong> <a href="mailto:d.kinder@btinternet.com">d.kinder@btinternet.com</a><br>
<strong>David Kinder</strong> <a href="mailto:davidk.kinder@virgin.net">davidk.kinder@virgin.net</a><br>
Magnetic 2.x development, Windows, MS-DOS (32-bit) and Amiga ports.
<p>
<strong>Stefan Meier</strong> <a href="mailto:[email protected]">[email protected]</a><br>
Expand All @@ -21,10 +21,10 @@ <h1>Credits</h1>
<strong>Stefan Jokisch</strong><br>
MS-DOS (16-bit) port.
<p>
<strong>Torbj&#246rn Andersson</strong> <a href="mailto:[email protected]">[email protected]</a><br>
<strong>Torbj&#246rn Andersson</strong><br>
Unix/Gtk port.
<p>
<strong>Simon Baldwin</strong> <a href="mailto:[email protected]">[email protected]</a><br>
<strong>Simon Baldwin</strong><br>
Glk port.
<p>
<strong>Rochus Boerner</strong><br>
Expand Down
2 changes: 1 addition & 1 deletion Win/help/overview.htm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 style="margin-bottom:1">Windows Magnetic</h1>
<h2 style="font-size:14;margin-top:1">An interpreter for Magnetic Scrolls adventures</h2>
Magnetic 2.2 by Niclas Karlsson, David Kinder, Stefan Meier and Paul David Doherty.<br>
Windows Magnetic by David Kinder <a href="mailto:d.kinder@btinternet.com">d.kinder@btinternet.com</a><br>
Windows Magnetic by David Kinder <a href="mailto:davidk.kinder@virgin.net">davidk.kinder@virgin.net</a><br>
<p>
Magnetic is an interpreter for the games written between 1985 and 1991 by Magnetic Scrolls, a text
adventure producer based in London, England. Although they only produced seven games they have acquired
Expand Down
5 changes: 5 additions & 0 deletions Win/help/revision.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<body>
<h1>Revision History</h1>

<b>Magnetic 2.2, Windows release 10</b>
<ul>
<li>Corrected the file dialogs to use the Windows 2000/XP look.
</ul>

<b>Magnetic 2.2, Windows release 9</b>
<ul>
<li>Corrected dialog problems with large fonts.
Expand Down
4 changes: 3 additions & 1 deletion Win/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#define IDC_TOPICS 1025
#define IDC_PREVIOUS 1026
#define IDC_HINTLIST 1027
#define IDC_LOGO 1028
#define IDC_CREDITS 1029
#define ID_VIEW_FONT 32770
#define ID_HELP_TOPICS 32771
#define ID_FILE_RECORD 32772
Expand All @@ -55,7 +57,7 @@
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 135
#define _APS_NEXT_COMMAND_VALUE 32801
#define _APS_NEXT_CONTROL_VALUE 1028
#define _APS_NEXT_CONTROL_VALUE 1030
#define _APS_NEXT_SYMED_VALUE 100
#endif
#endif

0 comments on commit 5230b04

Please sign in to comment.