Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cheatsheet/cheatsheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
</div>
<br>
<p>Chinese Translation: <a href="cheatsheet_zh.html">以下为raylib所有API接口中文释义</a></p>
<p>Korean Translation: <a href="cheatsheet_kr.html">raylib API 레퍼런스 한국어 번역본</a></p>
<div id="fulldata">
<p id="pcore">module: rcore <a href="#pcore">→</a></p>
<div id="core"><pre><code class="cpp"></code></pre></div>
Expand Down
205 changes: 205 additions & 0 deletions cheatsheet/cheatsheet_kr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>raylib - cheatsheet</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta name="title" content="raylib - cheatsheet">
<meta name="description" content="raylib is a simple and easy-to-use library to enjoy videogames programming. Don't miss latest functions added to raylib... check raylib cheatsheet">
<meta name="keywords" content="raylib, videogames, programming, C, C++, library, learn, study, simple, easy, free, open source, raysan">
<meta name="viewport" content="width=device-width">

<!-- Open Graph metatags for sharing -->
<meta property="og:title" content="raylib - cheatsheet"/>
<meta property="og:image" content="https://www.raylib.com/common/img/raylib_logo_card.png"/>
<meta property="og:url" content="https://www.raylib.com" />
<meta property="og:site_name" content="raylib"/>
<meta property="og:description" content="Don't miss latest functions added to raylib... check raylib cheatsheet"/>

<!-- hightlight.js - Syntax highlighting for the Web -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/docco.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>

<style type="text/css">
@font-face {
font-family: 'grixel_acme_7_wide_xtnd';
src: url('../common/font/acme_7_wide_xtnd.eot');
src: url('../common/font/acme_7_wide_xtnd.eot?#iefix') format('embedded-opentype'),
url('../common/font/acme_7_wide_xtnd.woff') format('woff'),
url('../common/font/acme_7_wide_xtnd.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-size-adjust:0.49;
}

/* 둥근모꼴+ Fixedsys, Public Domain License (https://cactus.tistory.com/193) */
@font-face {
font-family: 'DungGeunMo';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff') format('woff');
font-weight: normal;
font-style: normal;
size-adjust: 125%
}

body{background-color:#f5f5f5;}

.eximage img{margin: 0 auto; border: 1px solid; border-color: black; width:770px; height:auto;}
p{font-family: grixel_acme_7_wide_xtnd, DungGeunMo, Courier New, Verdana, Arial; font-size:13px; line-height:24px;}
a{font-family: grixel_acme_7_wide_xtnd, DungGeunMo, Courier New, Verdana, Arial; font-size:13px; line-height:24px;}
pre code{font-family: Courier New, DungGeunMo; font-size:12px; width: auto!important; border: 1px solid; border-color:#b0b0b0; width:758px; height:auto; }
.exdownbtn{
width:250px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px;
line-height:30px; text-align: center; border-width:5px; background-color:#e1e1e1; color:#5c5a5a;
border:4px solid #898888; font-family: grixel_acme_7_wide_xtnd, DungGeunMo, Courier New, Verdana, Arial;
}
.exdownbtn:hover{background-color:#f0d6d6; color:#c55757; border:4px solid #e66666;}
#core pre code{border:10px solid; border-color:#888888; background-color:#dbdbe1; }
#shapes pre code{border:10px solid; border-color:#e66666; background-color:#e9d0d6; }
#textures pre code{border:10px solid; border-color:#75a06d; background-color:#c3e4bf; }
#text pre code{border:10px solid; border-color:#52b296; background-color:#b9e9dd; }
#models pre code{border:10px solid; border-color:#5d9cbd; background-color:#b9d6e8; }
#audio pre code{border:10px solid; border-color:#d3b157; background-color:#e5d7ae; }
#structs pre code{border:10px solid; border-color:#d2c9c6; background-color:#f8f8ff;}
#colors pre code{border:10px solid; border-color:#c6d2c6; background-color:#e9f1f2;}

#logo{width:128px; height:128px; float:left; position:relative; background-image:url(../common/img/raylib_logo.png);}
#header{position:relative; height:110px; max-width: 1000px;}
#title, #plinks, #version{position:relative; float:left; margin:0px; margin-left:10px; margin-top:10px;}
#plinks{color: gray;}
#plinks a, #copyright a{color: gray; text-decoration:none;}
#plinks a:hover{color: black;}
#version {margin-top: 23px; max-width:500px;}
#pcore{margin-bottom:-12px; margin-left:12px; color:#5c5a5a;}
#pshapes{margin-bottom:-12px; margin-left:12px; color:#c55757;}
#ptextures{margin-bottom:-12px; margin-left:12px; color:#60815a;}
#ptext{margin-bottom:-12px; margin-left:12px; color:#377764;}
#pmodels{margin-bottom:-12px; margin-left:12px; color:#417794;}
#paudio{margin-bottom:-12px; margin-left:12px; color:#8c7539;}
#pstructs{margin-bottom:-12px; margin-left:12px; color:#bcbccd;}
#pcolors{margin-bottom:-12px; margin-left:12px; color:#bcbccd;}

#fullgroup{
display: grid;
grid-column-gap: 20px;
grid-template-columns: auto auto;
}

#copyright p{color:#8b8b8b; font-size:10px}
#copyright a:hover{color:black;}

#downpdf{text-decoration: none;color:#aaaaaa;}
#downpdf:hover{color:#444;}

#fulldata p a {color:#0eefff; text-decoration: none;}

/* for the tired programmers at night */
.darkmode{background-color:#1e1e1e; color:#e1e1e1;}
.darkmode a{color:#e1e1e1;}
.darkmode #header{background-color:#1e1e1e; color:#e1e1e1;}
.darkmode #title{color:#e1e1e1;}
.darkmode #plinks{color:#e1e1e1;}
.darkmode #plinks a{color:#e1e1e1;}
.darkmode #plinks a:hover{color:#e1e1e1;}
.darkmode #version{color:#e1e1e1;}
.darkmode #pcore{color:#e1e1e1;}
.darkmode #pshapes{color:#e1e1e1;}
.darkmode #ptextures{color:#e1e1e1;}
.darkmode #ptext{color:#e1e1e1;}
.darkmode #pmodels{color:#e1e1e1;}
.darkmode #paudio{color:#e1e1e1;}
.darkmode #pstructs{color:#e1e1e1;}
.darkmode #pcolors{color:#e1e1e1;}

@media screen and (max-width: 1550px) {
#fullgroup {
grid-template-columns: auto;
}

.leftgroup, .rightgroup {
overflow-x: auto;
}
}
</style>

<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
function addModule(url, targetSelector) {
fetch(url)
.then(response => response.text())
.then(data => {
document.querySelector(targetSelector).innerHTML = data;
document.querySelectorAll(targetSelector).forEach(function(e) {
hljs.highlightBlock(e);
});
})
.catch(error => console.error('Could not get ' + url, error));
}

addModule('kr/raylib_core.c', '#core pre code');
addModule('kr/raylib_shapes.c', '#shapes pre code');
addModule('kr/raylib_textures.c', '#textures pre code');
addModule('kr/raylib_text.c', '#text pre code');
addModule('kr/raylib_models.c', '#models pre code');
addModule('kr/raylib_audio.c', '#audio pre code');
addModule('kr/raylib_colors.c', '#colors pre code');
addModule('kr/raylib_structs.c', '#structs pre code');
});

function toggleDarkMode() {
document.body.classList.toggle("darkmode");
}

</script>
</head>

<body>
<div id="header">
<a id="logo" href="../index.html"></a>
<p id="title">A simple and easy-to-use library to enjoy videogames programming</p>
<p id="plinks">[<a href="https://discord.gg/raylib">raylib Discord 서버</a>][<a href="https://github.com/raysan5/raylib">github.com/raysan5/raylib</a>][<a href="https://github.com/raysan5/raylib/blob/master/src/raylib.h">raylib.h</a>]</p>
<p></p>
<p id="version">v5.0 레퍼런스 카드 [<a id="downpdf" href="https://www.raylib.com/cheatsheet/raylib_cheatsheet_v5.0.pdf">PDF 다운로드</a>]</p>
</div>
<br>
<p>> 한국어 번역 기여: 순천향대학교 오픈 소스 SW 동아리 <a href="https://github.com/6pm-crew">'6PM'</a> (<a href="https://github.com/jdeokkim">Jaedeok Kim</a>, <a href="https://github.com/dennis0324">Dennis Ko</a>, <a href="https://github.com/minsubak">Minsu Bak</a>)</p>
<div id="fulldata">
<p id="pcore">module: rcore <a href="#pcore">→</a></p>
<div id="core"><pre><code class="cpp"></code></pre></div>
<p id="pshapes">module: rshapes <a href="#pshapes">→</a></p>
<div id="shapes"><pre><code class="cpp"></code></pre></div>
<p id="ptextures">module: rtextures <a href="#ptextures">→</a></p>
<div id="textures"><pre><code class="cpp"></code></pre></div>
<p id="ptext">module: rtext <a href="#ptext">→</a></p>
<div id="text"><pre><code class="cpp"></code></pre></div>
<p id="pmodels">module: rmodels <a href="#pmodels">→</a></p>
<div id="models"><pre><code class="cpp"></code></pre></div>
<p id="paudio">module: raudio <a href="#paudio">→</a></p>
<div id="audio"><pre><code class="cpp"></code></pre></div>

<div id="fullgroup">
<div class="leftgroup">
<p id="pstructs">structs</p>
<div id="structs"><pre><code class="cpp"></code></pre></div>
</div>
<div class="rightgroup">
<p id="pcolors">colors</p>
<div id="colors"><pre><code class="cpp"></code></pre></div>
</div>
</div>

<p>다른 치트 시트</p>
<ul>
<li>
<a href="/cheatsheet/raymath_cheatsheet.html">raymath cheatsheet</a>
</li>
</ul>

<div id="copyright">
<p>raylib quick reference card - Copyright (c) 2013-2024 Ramon Santamaria (<a href="https://www.twitter.com/raysan5">@raysan5</a>)</p>
</div>
</div>
</body>
</html>
78 changes: 78 additions & 0 deletions cheatsheet/kr/raylib_audio.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Audio device management functions
void InitAudioDevice(void); // Initialize audio device and context
void CloseAudioDevice(void); // Close the audio device and context
bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully
void SetMasterVolume(float volume); // Set master volume (listener)
float GetMasterVolume(void); // Get master volume (listener)

// Wave/Sound loading/unloading functions
Wave LoadWave(const char *fileName); // Load wave data from file
Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
bool IsWaveReady(Wave wave); // Checks if wave data is ready
Sound LoadSound(const char *fileName); // Load sound from file
Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
bool IsSoundReady(Sound sound); // Checks if a sound is ready
void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
void UnloadWave(Wave wave); // Unload wave data
void UnloadSound(Sound sound); // Unload sound
void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success

// Wave/Sound management functions
void PlaySound(Sound sound); // Play a sound
void StopSound(Sound sound); // Stop playing a sound
void PauseSound(Sound sound); // Pause a sound
void ResumeSound(Sound sound); // Resume a paused sound
bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
Wave WaveCopy(Wave wave); // Copy a wave to a new wave
void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()

// Music management functions
Music LoadMusicStream(const char *fileName); // Load music stream from file
Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
bool IsMusicReady(Music music); // Checks if a music stream is ready
void UnloadMusicStream(Music music); // Unload music stream
void PlayMusicStream(Music music); // Start music playing
bool IsMusicStreamPlaying(Music music); // Check if music is playing
void UpdateMusicStream(Music music); // Updates buffers for music streaming
void StopMusicStream(Music music); // Stop music playing
void PauseMusicStream(Music music); // Pause music playing
void ResumeMusicStream(Music music); // Resume playing paused music
void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
void SetMusicPan(Music music, float pan); // Set pan for a music (0.5 is center)
float GetMusicTimeLength(Music music); // Get music time length (in seconds)
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)

// AudioStream management functions
AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
void PlayAudioStream(AudioStream stream); // Play audio stream
void PauseAudioStream(AudioStream stream); // Pause audio stream
void ResumeAudioStream(AudioStream stream); // Resume audio stream
bool IsAudioStreamPlaying(AudioStream stream); // Check if audio stream is playing
void StopAudioStream(AudioStream stream); // Stop audio stream
void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data

void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream

void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline

Loading