Commit 189c0df6 authored by yui's avatar yui
Browse files

scciwrap を修正

 - HINSTANCE -> HMODULE
 - 前方参照
parent e56b3370
#include "compiler.h"
#include "scciwrap.h"
#include "scci.h"
#include "SCCIDefines.h"
SoundChip* scciwrap::m_pOpm = NULL;
SoundChip* scciwrap::m_pPsg = NULL;
HINSTANCE scciwrap::m_hScci = NULL;
HMODULE scciwrap::m_hScci = NULL;
SoundInterfaceManager *scciwrap::m_pManager = NULL;
// コンストラクタ
......@@ -15,7 +18,6 @@ scciwrap::~scciwrap(){
// 初期化
BOOL scciwrap::initialize(){
SCCIFUNC getSoundInterfaceManager = NULL;
// 多重呼び出しチェック
if(m_pManager != NULL || m_hScci != NULL){
return FALSE;
......@@ -23,11 +25,10 @@ BOOL scciwrap::initialize(){
// load scci
m_hScci = ::LoadLibrary(TEXT("scci"));
if(m_hScci == NULL){
m_hScci = NULL;
return FALSE;
}
// マネージャーを取得する
getSoundInterfaceManager = (SCCIFUNC)(::GetProcAddress(m_hScci, "getSoundInterfaceManager"));
SCCIFUNC getSoundInterfaceManager = reinterpret_cast<SCCIFUNC>(::GetProcAddress(m_hScci, "getSoundInterfaceManager"));
// マネージャーが取得できない場合は戻る
if(getSoundInterfaceManager == NULL){
::FreeLibrary(m_hScci);
......@@ -35,7 +36,7 @@ BOOL scciwrap::initialize(){
return FALSE;
}
// マネージャーを取得する
m_pManager = getSoundInterfaceManager();
m_pManager = (*getSoundInterfaceManager)();
if(m_pManager == NULL){
::FreeLibrary(m_hScci);
m_hScci = NULL;
......
#pragma once
#include "scci.h"
#include "SCCIDefines.h"
class SoundInterfaceManager;
class SoundChip;
class scciwrap{
private:
static SoundChip *m_pOpm;
static SoundChip *m_pPsg;
static HINSTANCE m_hScci;
static HMODULE m_hScci;
static SoundInterfaceManager *m_pManager;
public:
// コンストラクタ
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment