2023年4月27日 星期四

LAD Week11_滑鼠、轉動

 keybord

keyboard函式<點擊ESC(27)可關閉程式

音樂

音樂前面要有#include <windows.h>再加入PlaySound("C:\\檔案位置do.wav",NULL,SND_ASYNC);即可撥放老師給的音檔

第二

使其自動撥放後顯示hello world,開啟一般cpp即可不需使用glut專案
Linker settings:winmm

目錄的斜線可用兩個反斜線//或著一個斜線\

第三

#include "CMP3_MCI.h"使用外掛
#include "CMP3_MCI.h"
CMP3_MCI myMP3;
int main(int argc, char *argv[])
{
    char filename[]="C:/Users/Administrator/Desktop/suzume.mp3";
    myMP3.Load(filename);
    myMP3.Play();
Load讀檔,Play播放mp3檔

四 修改目錄

Build targets-working dir中目錄改成小數點(.),接著把按(freeglut.all,suzume.mp3))都丟進同一資料夾中,即可解決資料夾很亂的問題

處理.dll無法上傳github問題

下載所有專案後,把.gitignore用notepad++凱起在.dll前加上註解


沒有留言:

張貼留言