1
0
forked from metin2/client

Compare commits

..

22 Commits

Author SHA1 Message Date
bb19e9abda Merge pull request 'Used antialiasing filter, removed unused code' (#21) from nightly into master
Reviewed-on: metin2/client#21
2025-04-13 16:48:54 +03:00
0fa4fe2494 Bumped version to 0.4.1 2025-04-13 11:02:05 +03:00
863c3f9296 Modified up/down-sampling filter for some 2D textures 2025-04-13 11:00:48 +03:00
363f729f5d Removed Armadillo Nanomite 2025-04-13 09:14:17 +03:00
1e96dae60b Remove P2P UDP & Hackshield packets 2025-04-13 09:05:07 +03:00
6c1e703ee2 Merge pull request 'Add new archive manager, removed Panama & HybridCrypt, config utility improvements' (#20) from nightly into master
Reviewed-on: metin2/client#20
2025-04-12 10:36:11 +03:00
5ba1cb44b9 Bump version to 0.4.x 2025-04-12 10:04:17 +03:00
37847b1635 Merge new archive manager with zip file support 2025-04-12 08:28:41 +03:00
60cfea47e0 Remove .eix/.epk archives from .gitignore 2025-04-12 07:38:14 +03:00
51bde0b3d9 Merge pull request 'Sync nightly with master' (#18) from master into nightly
Reviewed-on: metin2/client#18
2025-04-12 07:35:20 +03:00
8b4d012e72 Updated build script to use 7-Zip for building archives 2025-04-12 07:26:00 +03:00
830e47b00b Improved pack initialization algorithm, archive types are now configurable in the Index file. 2025-04-12 07:00:29 +03:00
0ad2d3b7cc Merge pull request 'Convert source files from EUC-KR to UTF8' (#13) from Tr0n/client:chore/convert-euckr into master
Reviewed-on: metin2/client#13
Reviewed-by: Exynox <exynox@old-metin2.com>
2025-03-22 19:00:33 +02:00
540ba33b0e
translate according to pr review 2025-01-12 18:37:38 +01:00
67c4325b01
lognf instancebase 2025-01-12 18:31:32 +01:00
62916f0622
logbox 2025-01-12 18:29:08 +01:00
2589163a49
translate commented out code and traces 2025-01-12 18:14:49 +01:00
077a365840
use modern fontfaces in GetFontFaceFromCodePage9x 2025-01-01 19:37:28 +01:00
373c184dfe
convert comments in h files to utf8 2024-12-17 22:41:21 +01:00
361a62853d
convert comments in cpp files to utf8 2024-12-17 22:41:21 +01:00
4525e3103d
convert literals to escaped bytes 2024-12-17 22:41:21 +01:00
609862f222 Cleaned up project, added configuration utility
Reviewed-on: metin2/client#12
2024-12-14 20:54:06 +02:00
248 changed files with 2052 additions and 2829 deletions

2
bin/.gitignore vendored
View File

@ -16,8 +16,6 @@ log.txt
syserr.txt syserr.txt
# Game files # Game files
pack/*.eix
pack/*.epk
pack/*.zip pack/*.zip
# Guild images # Guild images

View File

@ -1,249 +1,102 @@
PACK patch1 ZIP
* season3_eu ZIP
patch1 patch2 ZIP
* metin2_patch_snow ZIP
season3_eu metin2_patch_snow_dungeon ZIP
* metin2_patch_etc_costume1 ZIP
patch2 metin2_patch_pet1 ZIP
* metin2_patch_pet2 ZIP
metin2_patch_snow metin2_patch_ramadan_costume ZIP
pack/ metin2_patch_flame ZIP
metin2_patch_snow_dungeon metin2_patch_flame_dungeon ZIP
pack/ metin2_patch_w21_etc ZIP
metin2_patch_etc_costume1 metin2_patch_w21_mobs ZIP
pack/ metin2_patch_w21_mobs_m ZIP
metin2_patch_pet1 metin2_patch_dss_box ZIP
pack/ metin2_patch_costume_soccer ZIP
metin2_patch_pet2 metin2_patch_easter1 ZIP
pack/ metin2_patch_mineral ZIP
metin2_patch_ramadan_costume metin2_patch_w20_sound ZIP
pack/ metin2_patch_ds ZIP
metin2_patch_flame metin2_patch_5th_armor ZIP
pack/ metin2_patch_w20_etc ZIP
metin2_patch_flame_dungeon metin2_patch_dragon_rock ZIP
pack/ metin2_patch_dragon_rock_mobs ZIP
metin2_patch_w21_etc metin2_patch_etc ZIP
pack/ metin2_patch_xmas ZIP
metin2_patch_w21_mobs metin2_patch_eu3 ZIP
pack/ metin2_patch_eu4 ZIP
metin2_patch_w21_mobs_m metin2_patch_mundi ZIP
pack/ metin2_patch_sd ZIP
metin2_patch_dss_box metin2_patch_halloween ZIP
pack/ metin2_patch_party ZIP
metin2_patch_costume_soccer metin2_patch_dance ZIP
pack/ pc ZIP
metin2_patch_easter1 pc2 ZIP
pack/ monster ZIP
metin2_patch_mineral monster2 ZIP
pack/ effect ZIP
metin2_patch_w20_sound zone ZIP
pack/ terrain ZIP
metin2_patch_ds npc ZIP
pack/ npc2 ZIP
metin2_patch_5th_armor tree ZIP
pack/ guild ZIP
metin2_patch_w20_etc item ZIP
pack/ textureset ZIP
metin2_patch_dragon_rock property ZIP
pack/ icon ZIP
metin2_patch_dragon_rock_mobs season1 ZIP
pack/ season2 ZIP
metin2_patch_etc outdoora1 ZIP
pack/ outdoora2 ZIP
metin2_patch_xmas outdoora3 ZIP
pack/ outdoorb1 ZIP
metin2_patch_eu3 outdoorb3 ZIP
pack/ outdoorc1 ZIP
metin2_patch_eu4 outdoorc3 ZIP
pack/ outdoorsnow1 ZIP
metin2_patch_mundi outdoordesert1 ZIP
pack/ outdoorflame1 ZIP
metin2_patch_sd outdoorfielddungeon1 ZIP
pack/ outdoort1 ZIP
metin2_patch_halloween outdoort2 ZIP
pack/ outdoort3 ZIP
metin2_patch_party outdoort4 ZIP
pack/ outdoorwedding ZIP
metin2_patch_dance outdoormilgyo1 ZIP
d:/ymir work/pc/ indoorspiderdungeon1 ZIP
pc indoordeviltower1 ZIP
d:/ymir work/pc2/ indoormonkeydungeon1 ZIP
pc2 indoormonkeydungeon2 ZIP
d:/ymir work/monster/ indoormonkeydungeon3 ZIP
monster outdoortrent02 ZIP
d:/ymir work/monster2/ outdoorguild1 ZIP
monster2 outdoorguild2 ZIP
d:/ymir work/effect/ outdoorguild3 ZIP
effect outdoortrent ZIP
d:/ymir work/zone/ outdoorduel ZIP
zone outdoorgmguildbuild ZIP
d:/ymir work/terrainmaps/ sound ZIP
terrain sound_m ZIP
d:/ymir work/npc/ sound2 ZIP
npc bgm ZIP
d:/ymir work/npc2/ ETC ZIP
npc2 locale_de ZIP
d:/ymir work/tree/ locale_es ZIP
tree locale_fr ZIP
d:/ymir work/guild/ locale_gr ZIP
guild locale_it ZIP
d:/ymir work/item/ locale_nl ZIP
item locale_pl ZIP
textureset/ locale_pt ZIP
textureset locale_tr ZIP
property/ locale_en ZIP
property locale_ro ZIP
icon/ locale_ru ZIP
icon locale_dk ZIP
season1/ locale_cz ZIP
season1 locale_hu ZIP
season2/ uiscript ZIP
season2 uiloading ZIP
metin2_map_a1/ root ZIP
outdoora1
map_a2/
outdoora2
metin2_map_a3/
outdoora3
metin2_map_b1/
outdoorb1
metin2_map_b3/
outdoorb3
metin2_map_c1/
outdoorc1
metin2_map_c3/
outdoorc3
map_n_snowm_01/
outdoorsnow1
metin2_map_n_desert_01/
outdoordesert1
metin2_map_n_flame_01/
outdoorflame1
map_b_fielddungeon/
outdoorfielddungeon1
metin2_map_t1/
outdoort1
metin2_map_t2/
outdoort2
metin2_map_t3/
outdoort3
metin2_map_t4/
outdoort4
metin2_map_wedding_01/
outdoorwedding
metin2_map_milgyo/
outdoormilgyo1
metin2_map_spiderdungeon/
indoorspiderdungeon1
metin2_map_deviltower1/
indoordeviltower1
metin2_map_monkeydungeon/
indoormonkeydungeon1
metin2_map_monkeydungeon_02/
indoormonkeydungeon2
metin2_map_monkeydungeon_03/
indoormonkeydungeon3
metin2_map_trent02/
outdoortrent02
metin2_map_guild_01/
outdoorguild1
metin2_map_guild_02/
outdoorguild2
metin2_map_guild_03/
outdoorguild3
metin2_map_trent/
outdoortrent
metin2_map_trent02/
outdoortrent02
metin2_map_duel/
outdoorduel
gm_guild_build/
outdoorgmguildbuild
sound/ambience/
sound
sound/common/
sound
sound/effect/
sound
sound/monster/
sound
sound/npc/
sound
sound/pc/
sound
sound/ui/
sound
sound/ambience/
sound_m
sound/common/
sound_m
sound/effect/
sound_m
sound/monster/
sound_m
sound/npc/
sound_m
sound/pc/
sound_m
sound/ui/
sound_m
sound/monster2/
sound2
sound/pc2/
sound2
bgm/
bgm
d:/ymir work/special/
ETC
d:/ymir work/environment/
ETC
locale/ca/
locale_ca
locale/ae/
locale_ae
locale/de/
locale_de
locale/es/
locale_es
locale/fr/
locale_fr
locale/gr/
locale_gr
locale/it/
locale_it
locale/nl/
locale_nl
locale/pl/
locale_pl
locale/pt/
locale_pt
locale/tr/
locale_tr
locale/uk/
locale_uk
locale/bg/
locale_bg
locale/en/
locale_en
locale/mx/
locale_mx
locale/ro/
locale_ro
locale/ru/
locale_ru
locale/dk/
locale_dk
locale/cz/
locale_cz
locale/hu/
locale_hu
locale/us/
locale_us
locale/pa/
locale_pa
uiscript/
uiscript
d:/ymir work/ui/
ETC
d:/ymir work/uiloading/
uiloading

102
bin/pack/Index.dev Normal file
View File

@ -0,0 +1,102 @@
patch1 FOLDER
season3_eu FOLDER
patch2 FOLDER
metin2_patch_snow FOLDER
metin2_patch_snow_dungeon FOLDER
metin2_patch_etc_costume1 FOLDER
metin2_patch_pet1 FOLDER
metin2_patch_pet2 FOLDER
metin2_patch_ramadan_costume FOLDER
metin2_patch_flame FOLDER
metin2_patch_flame_dungeon FOLDER
metin2_patch_w21_etc FOLDER
metin2_patch_w21_mobs FOLDER
metin2_patch_w21_mobs_m FOLDER
metin2_patch_dss_box FOLDER
metin2_patch_costume_soccer FOLDER
metin2_patch_easter1 FOLDER
metin2_patch_mineral FOLDER
metin2_patch_w20_sound FOLDER
metin2_patch_ds FOLDER
metin2_patch_5th_armor FOLDER
metin2_patch_w20_etc FOLDER
metin2_patch_dragon_rock FOLDER
metin2_patch_dragon_rock_mobs FOLDER
metin2_patch_etc FOLDER
metin2_patch_xmas FOLDER
metin2_patch_eu3 FOLDER
metin2_patch_eu4 FOLDER
metin2_patch_mundi FOLDER
metin2_patch_sd FOLDER
metin2_patch_halloween FOLDER
metin2_patch_party FOLDER
metin2_patch_dance FOLDER
pc FOLDER
pc2 FOLDER
monster FOLDER
monster2 FOLDER
effect FOLDER
zone FOLDER
terrain FOLDER
npc FOLDER
npc2 FOLDER
tree FOLDER
guild FOLDER
item FOLDER
textureset FOLDER
property FOLDER
icon FOLDER
season1 FOLDER
season2 FOLDER
outdoora1 FOLDER
outdoora2 FOLDER
outdoora3 FOLDER
outdoorb1 FOLDER
outdoorb3 FOLDER
outdoorc1 FOLDER
outdoorc3 FOLDER
outdoorsnow1 FOLDER
outdoordesert1 FOLDER
outdoorflame1 FOLDER
outdoorfielddungeon1 FOLDER
outdoort1 FOLDER
outdoort2 FOLDER
outdoort3 FOLDER
outdoort4 FOLDER
outdoorwedding FOLDER
outdoormilgyo1 FOLDER
indoorspiderdungeon1 FOLDER
indoordeviltower1 FOLDER
indoormonkeydungeon1 FOLDER
indoormonkeydungeon2 FOLDER
indoormonkeydungeon3 FOLDER
outdoortrent02 FOLDER
outdoorguild1 FOLDER
outdoorguild2 FOLDER
outdoorguild3 FOLDER
outdoortrent FOLDER
outdoorduel FOLDER
outdoorgmguildbuild FOLDER
sound FOLDER
sound_m FOLDER
sound2 FOLDER
bgm FOLDER
ETC FOLDER
locale_de FOLDER
locale_es FOLDER
locale_fr FOLDER
locale_gr FOLDER
locale_it FOLDER
locale_nl FOLDER
locale_pl FOLDER
locale_pt FOLDER
locale_tr FOLDER
locale_en FOLDER
locale_ro FOLDER
locale_ru FOLDER
locale_dk FOLDER
locale_cz FOLDER
locale_hu FOLDER
uiscript FOLDER
uiloading FOLDER
root FOLDER

View File

@ -1,15 +0,0 @@
@echo off
setlocal enabledelayedexpansion
FOR /d %%i IN ("*") DO (
echo Packing %%i
rem "C:\Program Files\7-Zip\7z.exe" a "%%i.zip" ".\%%i\*" -m0=BZip2
rem "C:\Program Files\7-Zip-Zstandard\7za.exe" a "%%i.zip" ".\%%i\*" -m0=Zstd
"C:\Program Files\7-Zip\7z.exe" a "%%i.zip" ".\%%i\*" -m0=Copy
rem "C:\Program Files\7-Zip\7z.exe" a "%%i.zip" ".\%%i\*"
if !errorlevel! neq 0 exit /b !errorlevel!
cls
)
pause

View File

@ -85,7 +85,6 @@ class MainStream(object):
net.SetHandler(self) net.SetHandler(self)
net.SetTCPRecvBufferSize(128*1024) net.SetTCPRecvBufferSize(128*1024)
net.SetTCPSendBufferSize(4096) net.SetTCPSendBufferSize(4096)
net.SetUDPRecvBufferSize(4096)
self.id="" self.id=""
self.pwd="" self.pwd=""
@ -261,8 +260,6 @@ class MainStream(object):
else: else:
net.ConnectTCP(self.addr, self.port) net.ConnectTCP(self.addr, self.port)
#net.ConnectUDP(IP, Port)
def SetConnectInfo(self, addr, port, account_addr=0, account_port=0): def SetConnectInfo(self, addr, port, account_addr=0, account_port=0):
self.addr = addr self.addr = addr
self.port = port self.port = port

View File

@ -6,7 +6,7 @@ ECHO Only use on a clean project directory.
ECHO ====================================================== ECHO ======================================================
rem SET M2_MSVC_DIR=C:\Program Files\Microsoft Visual Studio\2022\Community\ rem SET M2_MSVC_DIR=C:\Program Files\Microsoft Visual Studio\2022\Community\
rem SET M2_PML_PATH=C:\Users\User\Path\To\PackMakerLite\PackMakerLite.exe rem SET M2_7ZIP_PATH=C:\Program Files\7-Zip\7z.exe
rem Check the environment variables rem Check the environment variables
VERIFY OTHER 2>nul VERIFY OTHER 2>nul
@ -16,17 +16,21 @@ IF NOT DEFINED M2_MSVC_DIR (
ECHO M2_MSVC_DIR is NOT defined! Please define M2_MSVC_DIR with the path of your local MSVC install. ECHO M2_MSVC_DIR is NOT defined! Please define M2_MSVC_DIR with the path of your local MSVC install.
EXIT /B -1 EXIT /B -1
) )
IF NOT DEFINED M2_PML_PATH ( IF NOT DEFINED M2_7ZIP_PATH (
ECHO M2_PML_PATH is NOT defined! Please define M2_PML_PATH with the path of your local PackMakerLite executable. ECHO M2_7ZIP_PATH is NOT defined! Please define M2_7ZIP_PATH with the path of your local 7-Zip "7z.exe" executable.
EXIT /B -1 EXIT /B -1
) )
ENDLOCAL ENDLOCAL
rem Cause variables to be expanded at execution time (in order for !errorlevel! to work)
SETLOCAL EnableDelayedExpansion
rem Initialize the MSVC environment rem Initialize the MSVC environment
CALL "%M2_MSVC_DIR%\VC\Auxiliary\Build\vcvars32.bat" CALL "%M2_MSVC_DIR%\VC\Auxiliary\Build\vcvars32.bat"
rem Build rem Build
msbuild Metin2Client.sln /p:Configuration=Distribute /p:Platform="Win32" msbuild Metin2Client.sln /p:Configuration=Distribute /p:Platform="Win32"
if !errorlevel! neq 0 exit /b !errorlevel!
rem Start assembling the client package rem Start assembling the client package
RMDIR /S /Q dist RMDIR /S /Q dist
@ -48,12 +52,11 @@ MKDIR dist\screenshot\
xcopy bin\upload\ dist\upload\ /E /Y /Q xcopy bin\upload\ dist\upload\ /E /Y /Q
rem Build and copy the archives rem Build and copy the archives
DEL /F /Q "bin\pack\*.eix" DEL /F /Q "bin\pack\*.zip"
DEL /F /Q "bin\pack\*.epk"
FOR /d %%i IN ("bin\pack\*") DO ( FOR /d %%i IN ("bin\pack\*") DO (
echo Packing %%i echo Packing %%i
%M2_PML_PATH% --nolog --parallel -p "%%i" "%M2_7ZIP_PATH%" a "%%i.zip" ".\%%i\*"
if !errorlevel! neq 0 exit /b !errorlevel!
) )
MOVE /Y bin\pack\*.eix dist\pack\ MOVE /Y bin\pack\*.zip dist\pack\
MOVE /Y bin\pack\*.epk dist\pack\

View File

@ -1,157 +0,0 @@
#if defined(__BORLANDC__)
/* These definitions provided by Dr. Todd Brennan, 04Oct2002 */
#define SECUREBEGIN _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x00;}
#define SECUREEND _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_A _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x01;}
#define SECUREEND_A _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_B _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x02;}
#define SECUREEND_B _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_C _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x03;}
#define SECUREEND_C _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_D _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x04;}
#define SECUREEND_D _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_E _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x05;}
#define SECUREEND_E _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_F _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x06;}
#define SECUREEND_F _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_G _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x07;}
#define SECUREEND_G _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_H _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x08;}
#define SECUREEND_H _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_I _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x09;}
#define SECUREEND_I _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_J _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x0A;}
#define SECUREEND_J _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define SECUREBEGIN_K _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0x0B;}
#define SECUREEND_K _asm {db 0xEB; db 0x03; db 0xD6; db 0xD6; db 0xFF;}
#define NANOBEGIN _asm {db 0xEB; db 0x03; db 0xD6; db 0xD7; db 0x01;}
#define NANOEND _asm {db 0xEB; db 0x03; db 0xD6; db 0xD7; db 0x00;}
/* The former definitions for Borland C++ Builder, if anyone needs them. */
/*
#define SECUREBEGIN __emit__ (0xEB,0x03,0xD6,0xD6,0x00);
#define SECUREEND __emit__ (0xEB,0x03,0xD6,0xD6,0xFF);
#define SECUREBEGIN_A __emit__ (0xEB,0x03,0xD6,0xD6,0x01);
#define SECUREEND_A __emit__ (0xEB,0x03,0xD6,0xD6,0xFF);
#define SECUREBEGIN_B __emit__ (0xEB,0x03,0xD6,0xD6,0x02);
#define SECUREEND_B __emit__ (0xEB,0x03,0xD6,0xD6,0xFF);
#define SECUREBEGIN_C __emit__ (0xEB,0x03,0xD6,0xD6,0x03);
#define SECUREEND_C __emit__ (0xEB,0x03,0xD6,0xD6,0xFF);
#define NANOBEGIN __emit__ (0xEB,0x03,0xD6,0xD7,0x01);
#define NANOEND __emit__ (0xEB,0x03,0xD6,0xD7,0x00);
*/
#elif defined(__LCC__)
/* Provided by Rubem Pechansky, 26Feb2003 */
#define SECUREBEGIN _asm(".byte 0xEB,0x03,0xD6,0xD6,0x00");
#define SECUREEND _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_A _asm(".byte 0xEB,0x03,0xD6,0xD6,0x01");
#define SECUREEND_A _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_B _asm(".byte 0xEB,0x03,0xD6,0xD6,0x02");
#define SECUREEND_B _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_C _asm(".byte 0xEB,0x03,0xD6,0xD6,0x03");
#define SECUREEND_C _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_D _asm(".byte 0xEB,0x03,0xD6,0xD6,0x04");
#define SECUREEND_D _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_E _asm(".byte 0xEB,0x03,0xD6,0xD6,0x05");
#define SECUREEND_E _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_F _asm(".byte 0xEB,0x03,0xD6,0xD6,0x06");
#define SECUREEND_F _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_G _asm(".byte 0xEB,0x03,0xD6,0xD6,0x07");
#define SECUREEND_G _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_H _asm(".byte 0xEB,0x03,0xD6,0xD6,0x08");
#define SECUREEND_H _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_I _asm(".byte 0xEB,0x03,0xD6,0xD6,0x09");
#define SECUREEND_I _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_J _asm(".byte 0xEB,0x03,0xD6,0xD6,0x0A");
#define SECUREEND_J _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define SECUREBEGIN_K _asm(".byte 0xEB,0x03,0xD6,0xD6,0x0B");
#define SECUREEND_K _asm(".byte 0xEB,0x03,0xD6,0xD6,0xFF");
#define NANOBEGIN _asm(".byte 0xEB,0x03,0xD6,0xD7,0x01");
#define NANOEND _asm(".byte 0xEB,0x03,0xD6,0xD7,0x00");
#endif
#ifdef _WIN64
#define ARMACCESS_API __declspec(dllimport) __stdcall
extern "C" void ARMACCESS_API SECUREBEGIN(void);
extern "C" void ARMACCESS_API SECUREBEGIN_A(void);
extern "C" void ARMACCESS_API SECUREBEGIN_B(void);
extern "C" void ARMACCESS_API SECUREBEGIN_C(void);
extern "C" void ARMACCESS_API SECUREBEGIN_D(void);
extern "C" void ARMACCESS_API SECUREBEGIN_E(void);
extern "C" void ARMACCESS_API SECUREBEGIN_F(void);
extern "C" void ARMACCESS_API SECUREBEGIN_G(void);
extern "C" void ARMACCESS_API SECUREBEGIN_H(void);
extern "C" void ARMACCESS_API SECUREBEGIN_I(void);
extern "C" void ARMACCESS_API SECUREBEGIN_J(void);
extern "C" void ARMACCESS_API SECUREBEGIN_K(void);
extern "C" void ARMACCESS_API SECUREEND(void);
extern "C" void ARMACCESS_API SECUREEND_A(void);
extern "C" void ARMACCESS_API SECUREEND_B(void);
extern "C" void ARMACCESS_API SECUREEND_C(void);
extern "C" void ARMACCESS_API SECUREEND_D(void);
extern "C" void ARMACCESS_API SECUREEND_E(void);
extern "C" void ARMACCESS_API SECUREEND_F(void);
extern "C" void ARMACCESS_API SECUREEND_G(void);
extern "C" void ARMACCESS_API SECUREEND_H(void);
extern "C" void ARMACCESS_API SECUREEND_I(void);
extern "C" void ARMACCESS_API SECUREEND_J(void);
extern "C" void ARMACCESS_API SECUREEND_K(void);
extern "C" void ARMACCESS_API NANOBEGIN(void);
extern "C" void ARMACCESS_API NANOEND(void);
#define SECUREBEGIN SECUREBEGIN()
#define SECUREEND SECUREEND()
#define SECUREBEGIN_A SECUREBEGIN_A()
#define SECUREEND_A SECUREEND_A()
#define SECUREBEGIN_B SECUREBEGIN_B()
#define SECUREEND_B SECUREEND_B()
#define SECUREBEGIN_C SECUREBEGIN_C()
#define SECUREEND_C SECUREEND_C()
#define SECUREBEGIN_D SECUREBEGIN_D()
#define SECUREEND_D SECUREEND_D()
#define SECUREBEGIN_E SECUREBEGIN_E()
#define SECUREEND_E SECUREEND_E()
#define SECUREBEGIN_F SECUREBEGIN_F()
#define SECUREEND_F SECUREEND_F()
#define SECUREBEGIN_G SECUREBEGIN_G()
#define SECUREEND_G SECUREEND_G()
#define SECUREBEGIN_H SECUREBEGIN_H()
#define SECUREEND_H SECUREEND_H()
#define SECUREBEGIN_I SECUREBEGIN_I()
#define SECUREEND_I SECUREEND_I()
#define SECUREBEGIN_J SECUREBEGIN_J()
#define SECUREEND_J SECUREEND_J()
#define SECUREBEGIN_K SECUREBEGIN_K()
#define SECUREEND_K SECUREEND_K()
#define NANOBEGIN NANOBEGIN()
#define NANOEND NANOEND()
#else
#define SECUREBEGIN __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x00
#define SECUREEND __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_A __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x01
#define SECUREEND_A __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_B __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x02
#define SECUREEND_B __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_C __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x03
#define SECUREEND_C __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_D __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x04
#define SECUREEND_D __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_E __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x05
#define SECUREEND_E __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_F __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x06
#define SECUREEND_F __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_G __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x07
#define SECUREEND_G __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_H __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x08
#define SECUREEND_H __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_I __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x09
#define SECUREEND_I __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_J __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x0A
#define SECUREEND_J __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define SECUREBEGIN_K __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0x0B
#define SECUREEND_K __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD6 __asm _emit 0xFF
#define NANOBEGIN __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD7 __asm _emit 0x01
#define NANOEND __asm _emit 0xEB __asm _emit 0x03 __asm _emit 0xD6 __asm _emit 0xD7 __asm _emit 0x00
#endif

View File

@ -15,8 +15,8 @@
#endif #endif
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0, 3, 1, 0 FILEVERSION 0,4,1,0
PRODUCTVERSION 0, 3, 1, 0 PRODUCTVERSION 0,4,1,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS METIN2_DEBUG FILEFLAGS METIN2_DEBUG
FILEOS VOS__WINDOWS32 FILEOS VOS__WINDOWS32
@ -29,12 +29,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "The Old Metin2 Project" VALUE "CompanyName", "The Old Metin2 Project"
VALUE "FileDescription", METIN2_COMPONENT_DESCRIPTION VALUE "FileDescription", METIN2_COMPONENT_DESCRIPTION
VALUE "FileVersion", "0.3.1.0" VALUE "FileVersion", "0.4.1.0"
VALUE "InternalName", METIN2_COMPONENT_INTERNALNAME VALUE "InternalName", METIN2_COMPONENT_INTERNALNAME
VALUE "LegalCopyright", "Copyright (C) 2024" VALUE "LegalCopyright", "Copyright (C) 2022-2025"
VALUE "OriginalFilename", METIN2_COMPONENT_FILENAME VALUE "OriginalFilename", METIN2_COMPONENT_FILENAME
VALUE "ProductName", "Metin2Config" VALUE "ProductName", "Metin2Config"
VALUE "ProductVersion", "0.3.1.0" VALUE "ProductVersion", "0.4.1.0"
END END
END END

View File

@ -42,8 +42,8 @@ class CEffectData
void __ClearLightDataVector(); void __ClearLightDataVector();
void __ClearMeshDataVector(); void __ClearMeshDataVector();
// FIXME : 이 부분은 그다지 맘에 들지 않는다. 좋은 아이디어를 찾아내어 고치자. // FIXME : 이 부분은 그다지 맘에 들지 않는다. 좋은 아이디어를 찾아내어 고치자.
// 상위가 (특화된) 상위의 인터페이스 때문에 모양이 바뀌어야 한다는 것은 옳지 못하다. - [levites] // 상위가 (특화된) 상위의 인터페이스 때문에 모양이 바뀌어야 한다는 것은 옳지 못하다. - [levites]
virtual CParticleSystemData * AllocParticle(); virtual CParticleSystemData * AllocParticle();
virtual CEffectMeshScript * AllocMesh(); virtual CEffectMeshScript * AllocMesh();
virtual CLightData * AllocLight(); virtual CLightData * AllocLight();

View File

@ -52,7 +52,7 @@ void CEffectInstance::UpdateSound()
{ {
CSoundManager& rkSndMgr=CSoundManager::Instance(); CSoundManager& rkSndMgr=CSoundManager::Instance();
rkSndMgr.UpdateSoundInstance(m_matGlobal._41, m_matGlobal._42, m_matGlobal._43, m_dwFrame, m_pSoundInstanceVector); rkSndMgr.UpdateSoundInstance(m_matGlobal._41, m_matGlobal._42, m_matGlobal._43, m_dwFrame, m_pSoundInstanceVector);
// NOTE : 매트릭스에서 위치를 직접 얻어온다 - [levites] // NOTE : 매트릭스에서 위치를 직접 얻어온다 - [levites]
} }
++m_dwFrame; ++m_dwFrame;
} }

View File

@ -48,7 +48,7 @@ bool CEffectManager::IsAliveEffect(DWORD dwInstanceIndex)
void CEffectManager::Update() void CEffectManager::Update()
{ {
// 2004. 3. 1. myevan. 이펙트 모니터링 하는 코드 // 2004. 3. 1. myevan. 이펙트 모니터링 하는 코드
/* /*
if (GetAsyncKeyState(VK_F9)) if (GetAsyncKeyState(VK_F9))
{ {
@ -173,8 +173,8 @@ BOOL CEffectManager::RegisterEffect(const char * c_szFileName,bool isExistDelete
return TRUE; return TRUE;
} }
// CEffectData 를 포인터형으로 리턴하게 하고.. // CEffectData 를 포인터형으로 리턴하게 하고..
// CEffectData에서 CRC를 얻을수 있게 한다 // CEffectData에서 CRC를 얻을수 있게 한다
BOOL CEffectManager::RegisterEffect2(const char * c_szFileName, DWORD* pdwRetCRC, bool isNeedCache) BOOL CEffectManager::RegisterEffect2(const char * c_szFileName, DWORD* pdwRetCRC, bool isNeedCache)
{ {
std::string strFileName; std::string strFileName;

View File

@ -62,8 +62,8 @@ class CEffectManager : public CScreen, public CSingleton<CEffectManager>
bool GetEffectData(DWORD dwID, CEffectData ** ppEffect); bool GetEffectData(DWORD dwID, CEffectData ** ppEffect);
bool GetEffectData(DWORD dwID, const CEffectData ** c_ppEffect); bool GetEffectData(DWORD dwID, const CEffectData ** c_ppEffect);
// Area에 직접 찍는 Effect용 함수... EffectInstance의 Pointer를 반환한다. // Area에 직접 찍는 Effect용 함수... EffectInstance의 Pointer를 반환한다.
// EffectManager 내부 EffectInstanceMap을 이용하지 않는다. // EffectManager 내부 EffectInstanceMap을 이용하지 않는다.
void CreateUnsafeEffectInstance(DWORD dwEffectDataID, CEffectInstance ** ppEffectInstance); void CreateUnsafeEffectInstance(DWORD dwEffectDataID, CEffectInstance ** ppEffectInstance);
bool DestroyUnsafeEffectInstance(CEffectInstance * pEffectInstance); bool DestroyUnsafeEffectInstance(CEffectInstance * pEffectInstance);

View File

@ -9,7 +9,7 @@
class CEffectMeshInstance : public CEffectElementBaseInstance class CEffectMeshInstance : public CEffectElementBaseInstance
{ {
public: public:
// NOTE : Mesh 단위 텍스춰 데이타의 인스턴스이다. // NOTE : Mesh 단위 텍스춰 데이타의 인스턴스이다.
typedef struct STextureInstance typedef struct STextureInstance
{ {
CFrameController TextureFrameController; CFrameController TextureFrameController;

View File

@ -185,9 +185,9 @@ void CParticleInstance::Transform(const D3DXMATRIX * c_matLocal)
case BILLBOARD_TYPE_ALL: case BILLBOARD_TYPE_ALL:
default: default:
{ {
// NOTE : Rotation Routine. Camera의 Up Vector와 Cross Vector 자체를 View Vector 기준으로 // NOTE : Rotation Routine. Camera의 Up Vector와 Cross Vector 자체를 View Vector 기준으로
// Rotation 시킨다. // Rotation 시킨다.
// FIXME : 반드시 최적화 할 것! // FIXME : 반드시 최적화 할 것!
if (m_fRotation==0.0f) if (m_fRotation==0.0f)
{ {
v3Up = -c_rv3Cross; v3Up = -c_rv3Cross;
@ -239,7 +239,7 @@ void CParticleInstance::Transform(const D3DXMATRIX * c_matLocal)
D3DXVec3TransformNormal(&v3Up, &v3Up, c_matLocal); D3DXVec3TransformNormal(&v3Up, &v3Up, c_matLocal);
} }
// NOTE: 속도가 길이에 주는 영향 : log(velocity)만큼 늘어난다. // NOTE: 속도가 길이에 주는 영향 : log(velocity)만큼 늘어난다.
float length = D3DXVec3Length(&v3Up); float length = D3DXVec3Length(&v3Up);
if (length == 0.0f) if (length == 0.0f)
{ {
@ -342,9 +342,9 @@ void CParticleInstance::Transform(const D3DXMATRIX * c_matLocal, const float c_f
case BILLBOARD_TYPE_ALL: case BILLBOARD_TYPE_ALL:
default: default:
{ {
// NOTE : Rotation Routine. Camera의 Up Vector와 Cross Vector 자체를 View Vector 기준으로 // NOTE : Rotation Routine. Camera의 Up Vector와 Cross Vector 자체를 View Vector 기준으로
// Rotation 시킨다. // Rotation 시킨다.
// FIXME : 반드시 최적화 할 것! // FIXME : 반드시 최적화 할 것!
if (m_fRotation==0.0f) if (m_fRotation==0.0f)
{ {
v3Up = -c_rv3Cross; v3Up = -c_rv3Cross;
@ -373,7 +373,7 @@ void CParticleInstance::Transform(const D3DXMATRIX * c_matLocal, const float c_f
D3DXVec3TransformNormal(&v3Up, &v3Up, c_matLocal); D3DXVec3TransformNormal(&v3Up, &v3Up, c_matLocal);
} }
// NOTE: 속도가 길이에 주는 영향 : log(velocity)만큼 늘어난다. // NOTE: 속도가 길이에 주는 영향 : log(velocity)만큼 늘어난다.
float length = D3DXVec3Length(&v3Up); float length = D3DXVec3Length(&v3Up);
if (length == 0.0f) if (length == 0.0f)
{ {

View File

@ -161,8 +161,8 @@ void CParticleSystemInstance::CreateParticles(float fElapsedTime)
D3DXVec3TransformCoord(&v3TimePosition, &v3TimePosition, mc_pmatLocal); D3DXVec3TransformCoord(&v3TimePosition, &v3TimePosition, mc_pmatLocal);
} }
pInstance->m_v3StartPosition = v3TimePosition; pInstance->m_v3StartPosition = v3TimePosition;
// NOTE : Update를 호출하지 않고 Rendering 되기 때문에 length가 0이 되는 문제가 있다. // NOTE : Update를 호출하지 않고 Rendering 되기 때문에 length가 0이 되는 문제가 있다.
// Velocity를 구한 후 그만큼 빼준 값으로 초기화 해주도록 바꿨음 - [levites] // Velocity를 구한 후 그만큼 빼준 값으로 초기화 해주도록 바꿨음 - [levites]
//pInstance->m_v3LastPosition = pInstance->m_v3Position; //pInstance->m_v3LastPosition = pInstance->m_v3Position;
// Direction & Velocity // Direction & Velocity
@ -212,8 +212,8 @@ void CParticleSystemInstance::CreateParticles(float fElapsedTime)
// Rotation // Rotation
pInstance->m_fRotation = m_pParticleProperty->m_wRotationRandomStartingBegin; pInstance->m_fRotation = m_pParticleProperty->m_wRotationRandomStartingBegin;
pInstance->m_fRotation = frandom(m_pParticleProperty->m_wRotationRandomStartingBegin,m_pParticleProperty->m_wRotationRandomStartingEnd); pInstance->m_fRotation = frandom(m_pParticleProperty->m_wRotationRandomStartingBegin,m_pParticleProperty->m_wRotationRandomStartingEnd);
// Rotation - Lie 일 경우 LocalMatrix 의 Rotation 값을 Random 에 적용한다. // Rotation - Lie 일 경우 LocalMatrix 의 Rotation 값을 Random 에 적용한다.
// 매번 할 필요는 없을듯. 어느 정도의 최적화가 필요. - [levites] // 매번 할 필요는 없을듯. 어느 정도의 최적화가 필요. - [levites]
if (BILLBOARD_TYPE_LIE == m_pParticleProperty->m_byBillboardType && mc_pmatLocal) if (BILLBOARD_TYPE_LIE == m_pParticleProperty->m_byBillboardType && mc_pmatLocal)
{ {
pInstance->m_fRotation += fLieRotation; pInstance->m_fRotation += fLieRotation;
@ -486,7 +486,7 @@ void CParticleSystemInstance::OnInitialize()
void CParticleSystemInstance::OnDestroy() void CParticleSystemInstance::OnDestroy()
{ {
// 2004. 3. 1. myevan. 파티클 제거 루틴 // 2004. 3. 1. myevan. 파티클 제거 루틴
TParticleInstanceListVector::iterator i; TParticleInstanceListVector::iterator i;
for(i = m_ParticleInstanceListVector.begin(); i!=m_ParticleInstanceListVector.end(); ++i) for(i = m_ParticleInstanceListVector.begin(); i!=m_ParticleInstanceListVector.end(); ++i)
{ {

View File

@ -71,12 +71,12 @@ enum EBillBoardType
BILLBOARD_TYPE_ALL, BILLBOARD_TYPE_ALL,
BILLBOARD_TYPE_Y, BILLBOARD_TYPE_Y,
BILLBOARD_TYPE_LIE, // 바닥에 누은 형상 BILLBOARD_TYPE_LIE, // 바닥에 누은 형상
BILLBOARD_TYPE_2FACE, // / and \ BILLBOARD_TYPE_2FACE, // / and \
BILLBOARD_TYPE_3FACE, // / and \ and - BILLBOARD_TYPE_3FACE, // / and \ and -
//BILLBOARD_TYPE_RAY, // 잔상 //BILLBOARD_TYPE_RAY, // 잔상
}; };
@ -220,8 +220,8 @@ typedef std::vector<TTimeEventTypeVector2> TTimeEventTableVector2;
typedef std::vector<TTimeEventTypeVector3> TTimeEventTableVector3; typedef std::vector<TTimeEventTypeVector3> TTimeEventTableVector3;
// NOTE : TimeEventValue 함수들은 값을 넘겨 받지 말아야 하는 때도 있으므로 // NOTE : TimeEventValue 함수들은 값을 넘겨 받지 말아야 하는 때도 있으므로
// 값의 직접 리턴이 아닌 포인터 리턴으로 작성 했습니다. - [levites] // 값의 직접 리턴이 아닌 포인터 리턴으로 작성 했습니다. - [levites]
template <typename T> template <typename T>
__forceinline void GetTimeEventBlendValue(float fElapsedTime, std::vector<CTimeEvent<T> >& rVector, T * pReturnValue) __forceinline void GetTimeEventBlendValue(float fElapsedTime, std::vector<CTimeEvent<T> >& rVector, T * pReturnValue)

View File

@ -6,14 +6,14 @@ class _CPostItMemoryBlock;
/** /**
* @class CPostIt * @class CPostIt
* @brief * @brief
*/ */
class CPostIt class CPostIt
{ {
public: public:
/** /**
* @brief CPostIt constructor * @brief CPostIt constructor
* @param [in] szAppName : . * @param [in] szAppName : .
*/ */
explicit CPostIt( LPCSTR szAppName ); explicit CPostIt( LPCSTR szAppName );
@ -23,45 +23,45 @@ public:
~CPostIt( void ); ~CPostIt( void );
/** /**
* @brief CPostIt class에서 . * @brief CPostIt class에서 .
*/ */
BOOL Flush( void ); BOOL Flush( void );
/** /**
* @brief CPostIt class에서 . * @brief CPostIt class에서 .
*/ */
void Empty( void ); void Empty( void );
/** /**
* @brief . * @brief .
* @param [in] lpszKeyName : . "KEY" . * @param [in] lpszKeyName : . "KEY" .
* @param [in] lpszData : * @param [in] lpszData :
* @param [in] nSize : lpszData * @param [in] nSize : lpszData
*/ */
BOOL Get( LPCSTR lpszKeyName, LPSTR lpszData, DWORD nSize ); BOOL Get( LPCSTR lpszKeyName, LPSTR lpszData, DWORD nSize );
/** /**
* @brief . * @brief .
* @param [in] lpBuffer : . "KEY=DATA" . * @param [in] lpBuffer : . "KEY=DATA" .
*/ */
BOOL Set( LPCSTR lpszData ); BOOL Set( LPCSTR lpszData );
/** /**
* @brief . * @brief .
* @param [in] lpszKeyName : . "KEY" . * @param [in] lpszKeyName : . "KEY" .
* @param [in] lpszData : . "DATA" . * @param [in] lpszData : . "DATA" .
*/ */
BOOL Set( LPCSTR lpszKeyName, LPCSTR lpszData ); BOOL Set( LPCSTR lpszKeyName, LPCSTR lpszData );
/** /**
* @brief (DWORD) . * @brief (DWORD) .
* @param [in] lpBuffer : . "KEY=DATA" . * @param [in] lpBuffer : . "KEY=DATA" .
* @param [in] dwValue : . (DWORD) * @param [in] dwValue : . (DWORD)
*/ */
BOOL Set( LPCSTR lpszKeyName, DWORD dwValue ); BOOL Set( LPCSTR lpszKeyName, DWORD dwValue );
/** /**
* @brief CPostIt class를 . ( constructor에 , ) * @brief CPostIt class를 . ( constructor에 , )
* @param [in] pPostIt : Destination class * @param [in] pPostIt : Destination class
* @param [in] lpszKeyName : Destination class's new app-name * @param [in] lpszKeyName : Destination class's new app-name
*/ */

View File

@ -60,9 +60,9 @@ bool CDir::Create(const char * c_szFilter, const char* c_szPath, BOOL bCheckedEx
if (!c_szExtension) if (!c_szExtension)
continue; continue;
// NOTE : 임시 변수 - [levites] // NOTE : 임시 변수 - [levites]
// 최종적으로는 무조건 TRUE 형태로 만든다. // 최종적으로는 무조건 TRUE 형태로 만든다.
// 그전에 전 프로젝트의 CDir을 사용하는 곳에서 Extension을 "wav", "gr2" 이런식으로 넣게끔 한다. - [levites] // 그전에 전 프로젝트의 CDir을 사용하는 곳에서 Extension을 "wav", "gr2" 이런식으로 넣게끔 한다. - [levites]
if (bCheckedExtension) if (bCheckedExtension)
{ {
std::string strFilter = c_szFilter; std::string strFilter = c_szFilter;

View File

@ -72,7 +72,7 @@ int CMemoryTextFileLoader::SplitLine2(DWORD dwLine, CTokenVector* pstTokenVector
pstTokenVector->push_back(c_rstLine.substr(beginPos, endPos - beginPos)); pstTokenVector->push_back(c_rstLine.substr(beginPos, endPos - beginPos));
// 추가 코드. 맨뒤에 탭이 있는 경우를 체크한다. - [levites] // 추가 코드. 맨뒤에 탭이 있는 경우를 체크한다. - [levites]
if (int(c_rstLine.find_first_not_of(c_szDelimeter, basePos)) < 0) if (int(c_rstLine.find_first_not_of(c_szDelimeter, basePos)) < 0)
break; break;
} while (basePos < c_rstLine.length()); } while (basePos < c_rstLine.length());
@ -116,7 +116,7 @@ bool CMemoryTextFileLoader::SplitLine(DWORD dwLine, CTokenVector* pstTokenVector
pstTokenVector->push_back(c_rstLine.substr(beginPos, endPos - beginPos)); pstTokenVector->push_back(c_rstLine.substr(beginPos, endPos - beginPos));
// 추가 코드. 맨뒤에 탭이 있는 경우를 체크한다. - [levites] // 추가 코드. 맨뒤에 탭이 있는 경우를 체크한다. - [levites]
if (int(c_rstLine.find_first_not_of(c_szDelimeter, basePos)) < 0) if (int(c_rstLine.find_first_not_of(c_szDelimeter, basePos)) < 0)
break; break;
} while (basePos < c_rstLine.length()); } while (basePos < c_rstLine.length());

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#pragma warning(disable:4786) // character 255 넘어가는거 끄기 #pragma warning(disable:4786) // character 255 넘어가는거 끄기
#include <windows.h> #include <windows.h>
#include <vector> #include <vector>

View File

@ -85,7 +85,7 @@ BYTE* CMappedFile::AppendDataBlock( const void* pBlock, DWORD dwBlockSize )
void CMappedFile::Destroy() void CMappedFile::Destroy()
{ {
if (m_pLZObj) // 압축된 데이터가 이 포인터로 연결 된다 if (m_pLZObj) // 압축된 데이터가 이 포인터로 연결 된다
{ {
delete m_pLZObj; delete m_pLZObj;
m_pLZObj = NULL; m_pLZObj = NULL;
@ -144,7 +144,7 @@ int CMappedFile::Seek(DWORD offset, int iSeekType)
return m_seekPosition; return m_seekPosition;
} }
// 2004.09.16.myevan.MemoryMappedFile 98/ME 개수 제한 문제 체크 // 2004.09.16.myevan.MemoryMappedFile 98/ME 개수 제한 문제 체크
//DWORD g_dwCount=0; //DWORD g_dwCount=0;
int CMappedFile::Map(const void **dest, int offset, int size) int CMappedFile::Map(const void **dest, int offset, int size)
@ -192,7 +192,7 @@ int CMappedFile::Map(const void **dest, int offset, int size)
return 0; return 0;
} }
// 2004.09.16.myevan.MemoryMappedFile 98/ME 개수 제한 문제 체크 // 2004.09.16.myevan.MemoryMappedFile 98/ME 개수 제한 문제 체크
//g_dwCount++; //g_dwCount++;
//Tracenf("MAPFILE %d", g_dwCount); //Tracenf("MAPFILE %d", g_dwCount);
@ -247,7 +247,7 @@ void CMappedFile::Unmap(LPCVOID data)
{ {
if (UnmapViewOfFile(data)) if (UnmapViewOfFile(data))
{ {
// 2004.09.16.myevan.MemoryMappedFile 98/ME 개수 제한 문제 체크 // 2004.09.16.myevan.MemoryMappedFile 98/ME 개수 제한 문제 체크
//g_dwCount--; //g_dwCount--;
//Tracenf("UNMAPFILE %d", g_dwCount); //Tracenf("UNMAPFILE %d", g_dwCount);
} }

View File

@ -6,7 +6,7 @@
#endif #endif
#pragma warning(disable:4710) // not inlined #pragma warning(disable:4710) // not inlined
#pragma warning(disable:4786) // character 255 넘어가는거 끄기 #pragma warning(disable:4786) // character 255 넘어가는거 끄기
#pragma warning(disable:4244) // type conversion possible lose of data #pragma warning(disable:4244) // type conversion possible lose of data
#include <windows.h> #include <windows.h>
@ -40,16 +40,6 @@
#define atoi _atoi64 #define atoi _atoi64
#endif #endif
// Armadillo nanomite protection
#if !defined(NANOBEGIN) && !defined(NANOEND)
#ifdef _DEBUG
#define NANOBEGIN
#define NANOEND
#else
#include <armadillo/SecuredSections.h>
#endif
#endif
#include "vk.h" #include "vk.h"
#include "filename.h" #include "filename.h"
#include "ServiceDefs.h" #include "ServiceDefs.h"

View File

@ -27,7 +27,7 @@ BOOL ELTimer_Init()
DWORD ELTimer_GetMSec() DWORD ELTimer_GetMSec()
{ {
//assert(gs_dwBaseTime!=0 && "ELTimer_Init 를 먼저 실행하세요"); //assert(gs_dwBaseTime!=0 && "ELTimer_Init 를 먼저 실행하세요");
//LARGE_INTEGER liTickCount; //LARGE_INTEGER liTickCount;
//QueryPerformanceCounter(&liTickCount); //QueryPerformanceCounter(&liTickCount);
return timeGetTime() - gs_dwBaseTime; //(liTickCount.QuadPart*1000 / gs_liTickCountPerSec.QuadPart)-gs_dwBaseTime; return timeGetTime() - gs_dwBaseTime; //(liTickCount.QuadPart*1000 / gs_liTickCountPerSec.QuadPart)-gs_dwBaseTime;
@ -35,13 +35,8 @@ DWORD ELTimer_GetMSec()
VOID ELTimer_SetServerMSec(DWORD dwServerTime) VOID ELTimer_SetServerMSec(DWORD dwServerTime)
{ {
NANOBEGIN gs_dwServerTime = dwServerTime;
if (0 != dwServerTime) // nanomite를 위한 더미 if gs_dwClientTime = CTimer::instance().GetCurrentMillisecond();
{
gs_dwServerTime = dwServerTime;
gs_dwClientTime = CTimer::instance().GetCurrentMillisecond();
}
NANOEND
} }
DWORD ELTimer_GetServerMSec() DWORD ELTimer_GetServerMSec()
@ -69,18 +64,13 @@ CTimer::CTimer()
{ {
ELTimer_Init(); ELTimer_Init();
NANOBEGIN m_dwCurrentTime = 0;
if (this) // nanomite를 위한 더미 if m_bUseRealTime = true;
{ m_index = 0;
m_dwCurrentTime = 0;
m_bUseRealTime = true;
m_index = 0;
m_dwElapsedTime = 0; m_dwElapsedTime = 0;
m_fCurrentTime = 0.0f; m_fCurrentTime = 0.0f;
}
NANOEND
} }
CTimer::~CTimer() CTimer::~CTimer()

View File

@ -433,7 +433,7 @@ void MyCreateDirectory(const char* path)
if (strlen(path) >= 3) if (strlen(path) >= 3)
{ {
if (*(path + 1) == ':') // C:, D: 같은 경우를 체크 if (*(path + 1) == ':') // C:, D: 같은 경우를 체크
path += 3; path += 3;
} }

View File

@ -64,9 +64,9 @@ extern void GetExceptionPathName(const char * sz_Name, std::string & OnlyFileN
extern void GetWorkingFolder(std::string & strFileName); extern void GetWorkingFolder(std::string & strFileName);
extern void StringLowers(char * pString); extern void StringLowers(char * pString);
extern void StringPath(std::string & rString); extern void StringPath(std::string & rString);
extern void StringPath(char * pString); // 모두 소문자로 만들고, \는 /로 바꾼다. extern void StringPath(char * pString); // 모두 소문자로 만들고, \는 /로 바꾼다.
extern void StringPath(const char * c_szSrc, char * szDest); // 모두 소문자로 만들고, \는 /로 바꾼다. extern void StringPath(const char * c_szSrc, char * szDest); // 모두 소문자로 만들고, \는 /로 바꾼다.
extern void StringPath(const char * c_szSrc, std::string & rString); // 모두 소문자로 만들고, \는 /로 바꾼다. extern void StringPath(const char * c_szSrc, std::string & rString); // 모두 소문자로 만들고, \는 /로 바꾼다.
extern void PrintAsciiData(const void* data, int bytes); extern void PrintAsciiData(const void* data, int bytes);
bool IsFile(const char* filename); bool IsFile(const char* filename);
bool IsGlobalFileName(const char * c_szFileName); bool IsGlobalFileName(const char * c_szFileName);

View File

@ -120,9 +120,9 @@ void CLZObject::BeginCompress(const void * pvIn, UINT uiInLen)
m_pbIn = (const BYTE *) pvIn; m_pbIn = (const BYTE *) pvIn;
// sizeof(SHeader) + // sizeof(SHeader) +
// 암호화를 위한 fourCC 4바이트 // 암호화를 위한 fourCC 4바이트
// 압축된 후 만들어질 수 있는 최대 용량 + // 압축된 후 만들어질 수 있는 최대 용량 +
// 암호화를 위한 8 바이트 // 암호화를 위한 8 바이트
m_dwBufferSize = sizeof(THeader) + sizeof(DWORD) + (uiInLen + uiInLen / 64 + 16 + 3) + 8; m_dwBufferSize = sizeof(THeader) + sizeof(DWORD) + (uiInLen + uiInLen / 64 + 16 + 3) + 8;
m_pbBuffer = gs_freeMemMgr.Alloc(m_dwBufferSize); m_pbBuffer = gs_freeMemMgr.Alloc(m_dwBufferSize);
@ -139,9 +139,9 @@ void CLZObject::BeginCompressInBuffer(const void * pvIn, UINT uiInLen, void * /*
m_pbIn = (const BYTE *) pvIn; m_pbIn = (const BYTE *) pvIn;
// sizeof(SHeader) + // sizeof(SHeader) +
// 암호화를 위한 fourCC 4바이트 // 암호화를 위한 fourCC 4바이트
// 압축된 후 만들어질 수 있는 최대 용량 + // 압축된 후 만들어질 수 있는 최대 용량 +
// 암호화를 위한 8 바이트 // 암호화를 위한 8 바이트
m_dwBufferSize = sizeof(THeader) + sizeof(DWORD) + (uiInLen + uiInLen / 64 + 16 + 3) + 8; m_dwBufferSize = sizeof(THeader) + sizeof(DWORD) + (uiInLen + uiInLen / 64 + 16 + 3) + 8;
m_pbBuffer = gs_freeMemMgr.Alloc(m_dwBufferSize); m_pbBuffer = gs_freeMemMgr.Alloc(m_dwBufferSize);

View File

@ -12,9 +12,9 @@ class CLZObject
typedef struct SHeader typedef struct SHeader
{ {
DWORD dwFourCC; DWORD dwFourCC;
DWORD dwEncryptSize; // 암호화된 크기 DWORD dwEncryptSize; // 암호화된 크기
DWORD dwCompressedSize; // 압축된 데이터 크기 DWORD dwCompressedSize; // 압축된 데이터 크기
DWORD dwRealSize; // 실제 데이터 크기 DWORD dwRealSize; // 실제 데이터 크기
} THeader; } THeader;
#pragma pack() #pragma pack()

View File

@ -1,8 +1,8 @@
/* /*
* Filename: tea.c * Filename: tea.c
* Description: TEA * Description: TEA
* *
* Author: (aka. , Cronan), (aka. myevan, ) * Author: (aka. , Cronan), (aka. myevan, )
*/ */
#include "StdAfx.h" #include "StdAfx.h"
#include "tea.h" #include "tea.h"
@ -10,24 +10,24 @@
/* /*
* TEA Encryption Module Instruction * TEA Encryption Module Instruction
* Edited by aka. , Cronan * Edited by aka. , Cronan
* *
* void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) * void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest)
* void tea_decode(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) * void tea_decode(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest)
* 8 / . key 16 . * 8 / . key 16 .
* sz, sy 8 . * sz, sy 8 .
* *
* int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); * int tea_decrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size);
* int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size); * int tea_encrypt(unsigned long *dest, const unsigned long *src, const unsigned long *key, int size);
* 8 / . size * 8 / . size
* 8 8 "늘려서" . * 8 8 "늘려서" .
* *
* ex. tea_code(pdwSrc[1], pdwSrc[0], pdwKey, pdwDest); * ex. tea_code(pdwSrc[1], pdwSrc[0], pdwKey, pdwDest);
* tea_decrypt(pdwDest, pdwSrc, pdwKey, nSize); * tea_decrypt(pdwDest, pdwSrc, pdwKey, nSize);
*/ */
#define TEA_ROUND 32 // 32 를 권장하며, 높을 수록 결과가 난해해 진다. #define TEA_ROUND 32 // 32 를 권장하며, 높을 수록 결과가 난해해 진다.
#define DELTA 0x9E3779B9 // DELTA 값 바꾸지 말것. #define DELTA 0x9E3779B9 // DELTA 값 바꾸지 말것.
void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest) void tea_code(const unsigned long sz, const unsigned long sy, const unsigned long *key, unsigned long *dest)
{ {

View File

@ -91,7 +91,6 @@ void __FreeDeformVertexBuffer(CGraphicVertexBuffer* pkDelVB)
void __ReserveSharedVertexBuffers(unsigned index, unsigned count) void __ReserveSharedVertexBuffers(unsigned index, unsigned count)
{ {
NANOBEGIN
if (index >= SHARED_VB_NUM) if (index >= SHARED_VB_NUM)
return; return;
@ -107,7 +106,6 @@ void __ReserveSharedVertexBuffers(unsigned index, unsigned count)
D3DPOOL_MANAGED); D3DPOOL_MANAGED);
gs_vbs[index].push_back(pkNewVB); gs_vbs[index].push_back(pkNewVB);
} }
NANOEND
} }
void GrannyCreateSharedDeformBuffer() void GrannyCreateSharedDeformBuffer()
@ -282,8 +280,8 @@ void CGrannyLODController::AddModel(CGraphicThing * pThing, int iSrcModel, CGran
} }
else else
{ {
// FIXME : CModelInstance::m_pgrnWorldPose를 Update에서 사용하는데, // FIXME : CModelInstance::m_pgrnWorldPose를 Update에서 사용하는데,
// Deform을 하지 않으면 NULL 입니다. 구조가 조금 바뀌어야 할지도.. - [levites] // Deform을 하지 않으면 NULL 입니다. 구조가 조금 바뀌어야 할지도.. - [levites]
pModelInstance->DeformNoSkin(&ms_matIdentity); pModelInstance->DeformNoSkin(&ms_matIdentity);
} }
@ -460,10 +458,10 @@ void CGrannyLODController::UpdateLODLevel(float fDistanceFromCenter, float fDist
assert(m_pCurrentModelInstance != NULL); assert(m_pCurrentModelInstance != NULL);
if (fDistanceFromCenter > LOD_APPLY_MIN) // 중심 LOD 예외 취소 if (fDistanceFromCenter > LOD_APPLY_MIN) // 중심 LOD 예외 취소
{ {
// 카메라부터 멀어질 수록 fLODRate가 작아진다 // 카메라부터 멀어질 수록 fLODRate가 작아진다
// 3개 LOD가 있을때.. 가장 먼게 0, 가까울 수록 숫자가 커진다 // 3개 LOD가 있을때.. 가장 먼게 0, 가까울 수록 숫자가 커진다
// 100fps 50fps 33fps 25fps 20fps // 100fps 50fps 33fps 25fps 20fps
// 10ms 20ms 30ms 40ms 50ms // 10ms 20ms 30ms 40ms 50ms

View File

@ -269,7 +269,7 @@ class CGrannyLODController : public CGraphicBase
BOOL isModelInstance(); BOOL isModelInstance();
CGrannyModelInstance* GetModelInstance(); CGrannyModelInstance* GetModelInstance();
bool HaveBlendThing() { return 0 != GetModelInstance() ? GetModelInstance()->HaveBlendThing() : false; } // NOTE: GetModelInstance() == 0일 때 클라 크래쉬나는 문제 수정(2012. 05. 07) bool HaveBlendThing() { return 0 != GetModelInstance() ? GetModelInstance()->HaveBlendThing() : false; } // NOTE: GetModelInstance() == 0일 때 클라 크래쉬나는 문제 수정(2012. 05. 07)
protected: protected:
void SetCurrentModelInstance(CGrannyModelInstance * pgrnModelInstance); void SetCurrentModelInstance(CGrannyModelInstance * pgrnModelInstance);

View File

@ -238,7 +238,7 @@ bool CGrannyMaterial::CreateFromGrannyMaterialPointer(granny_material * pgrnMate
pgrnOpacityTexture = GrannyGetMaterialTextureByType(m_pgrnMaterial, GrannyOpacityTexture); pgrnOpacityTexture = GrannyGetMaterialTextureByType(m_pgrnMaterial, GrannyOpacityTexture);
} }
// Two-Side 렌더링이 필요한 지 검사 // Two-Side 렌더링이 필요한 지 검사
{ {
granny_int32 twoSided = 0; granny_int32 twoSided = 0;
granny_data_type_definition TwoSidedFieldType[] = granny_data_type_definition TwoSidedFieldType[] =
@ -262,7 +262,7 @@ bool CGrannyMaterial::CreateFromGrannyMaterialPointer(granny_material * pgrnMate
if (pgrnOpacityTexture) if (pgrnOpacityTexture)
m_roImage[1].SetPointer(__GetImagePointer(pgrnOpacityTexture->FromFileName)); m_roImage[1].SetPointer(__GetImagePointer(pgrnOpacityTexture->FromFileName));
// 오퍼시티가 있으면 블렌딩 메쉬 // 오퍼시티가 있으면 블렌딩 메쉬
if (!m_roImage[1].IsNull()) if (!m_roImage[1].IsNull())
m_eType = TYPE_BLEND_PNT; m_eType = TYPE_BLEND_PNT;
else else
@ -285,7 +285,7 @@ void CGrannyMaterial::__ApplyDiffuseRenderState()
if (m_bTwoSideRender) if (m_bTwoSideRender)
{ {
// -_-렌더링 프로세스가 좀 구려서... Save & Restore 하면 순서때문에 좀 꼬인다. 귀찮으니 Save & Restore 대신 따로 저장해 둠. // -_-렌더링 프로세스가 좀 구려서... Save & Restore 하면 순서때문에 좀 꼬인다. 귀찮으니 Save & Restore 대신 따로 저장해 둠.
m_dwLastCullRenderStateForTwoSideRendering = STATEMANAGER.GetRenderState(D3DRS_CULLMODE); m_dwLastCullRenderStateForTwoSideRendering = STATEMANAGER.GetRenderState(D3DRS_CULLMODE);
STATEMANAGER.SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); STATEMANAGER.SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
} }
@ -511,7 +511,7 @@ DWORD CGrannyMaterialPalette::GetMaterialCount() const
/* /*
void CActorInstance::BeginSpecularRender() void CActorInstance::BeginSpecularRender()
{ {
// NOTE - Blending해서 찍는 부분은 Specular를 적용시키지 않는다 - [levites] // NOTE - Blending해서 찍는 부분은 Specular를 적용시키지 않는다 - [levites]
STATEMANAGER.SaveRenderState(D3DRS_ALPHABLENDENABLE, FALSE); STATEMANAGER.SaveRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
STATEMANAGER.SetRenderState(D3DRS_TEXTUREFACTOR, D3DXCOLOR(1.0f, 1.0f, 1.0f, m_AddColor.r)); STATEMANAGER.SetRenderState(D3DRS_TEXTUREFACTOR, D3DXCOLOR(1.0f, 1.0f, 1.0f, m_AddColor.r));

View File

@ -159,7 +159,7 @@ bool CGrannyMesh::LoadTriGroupNodeList(CGrannyMaterialPalette& rkMtrlPal)
assert(m_triGroupNodes == NULL); assert(m_triGroupNodes == NULL);
int mtrlCount = m_pgrnMesh->MaterialBindingCount; int mtrlCount = m_pgrnMesh->MaterialBindingCount;
if (mtrlCount <= 0) // 천의 동굴 2층 크래쉬 발생 if (mtrlCount <= 0) // 천의 동굴 2층 크래쉬 발생
return true; return true;
int GroupNodeCount = GrannyGetMeshTriangleGroupCount(m_pgrnMesh); int GroupNodeCount = GrannyGetMeshTriangleGroupCount(m_pgrnMesh);
@ -199,7 +199,7 @@ bool CGrannyMesh::LoadTriGroupNodeList(CGrannyMaterialPalette& rkMtrlPal)
void CGrannyMesh::RebuildTriGroupNodeList() void CGrannyMesh::RebuildTriGroupNodeList()
{ {
assert(!"CGrannyMesh::RebuildTriGroupNodeList() - 왜 리빌드를 하는가- -?"); assert(!"CGrannyMesh::RebuildTriGroupNodeList() - \xBF\xD6 \xB8\xAE\xBA\xF4\xB5\xE5\xB8\xA6 \xC7\xCF\xB4\xC2\xB0\xA1- -?");
/* /*
int mtrlCount = m_pgrnMesh->MaterialBindingCount; int mtrlCount = m_pgrnMesh->MaterialBindingCount;
int GroupNodeCount = GrannyGetMeshTriangleGroupCount(m_pgrnMesh); int GroupNodeCount = GrannyGetMeshTriangleGroupCount(m_pgrnMesh);

View File

@ -155,7 +155,7 @@ bool CGrannyModel::LoadMeshs()
assert(m_meshs == NULL); assert(m_meshs == NULL);
assert(m_pgrnModel != NULL); assert(m_pgrnModel != NULL);
if (m_pgrnModel->MeshBindingCount <= 0) // 메쉬가 없는 모델 if (m_pgrnModel->MeshBindingCount <= 0) // 메쉬가 없는 모델
return true; return true;
granny_skeleton * pgrnSkeleton = m_pgrnModel->Skeleton; granny_skeleton * pgrnSkeleton = m_pgrnModel->Skeleton;

View File

@ -55,12 +55,12 @@ class CGrannyModelInstance : public CGraphicCollisionObject
void DeformNoSkin(const D3DXMATRIX * c_pWorldMatrix); void DeformNoSkin(const D3DXMATRIX * c_pWorldMatrix);
void Deform(const D3DXMATRIX * c_pWorldMatrix); void Deform(const D3DXMATRIX * c_pWorldMatrix);
// FIXME : 현재는 하드웨어의 한계로 2장의 텍스춰로 제한이 되어있는 상태이기에 이런 // FIXME : 현재는 하드웨어의 한계로 2장의 텍스춰로 제한이 되어있는 상태이기에 이런
// 불안정한 아키텍춰가 가능하지만, 궁극적인 방향은 (모델 텍스춰 전부) + (효과용 텍스춰) // 불안정한 아키텍춰가 가능하지만, 궁극적인 방향은 (모델 텍스춰 전부) + (효과용 텍스춰)
// 이런식의 자동 셋팅이 이뤄져야 되지 않나 생각합니다. - [levites] // 이런식의 자동 셋팅이 이뤄져야 되지 않나 생각합니다. - [levites]
// NOTE : 내부에 if문을 포함 시키기 보다는 조금은 번거롭지만 이렇게 함수 콜 자체를 분리 // NOTE : 내부에 if문을 포함 시키기 보다는 조금은 번거롭지만 이렇게 함수 콜 자체를 분리
// 시키는 것이 퍼포먼스 적인 측면에서는 더 나은 것 같습니다. - [levites] // 시키는 것이 퍼포먼스 적인 측면에서는 더 나은 것 같습니다. - [levites]
// NOTE : 건물은 무조건 OneTexture. 캐릭터는 경우에 따라 TwoTexture. // NOTE : 건물은 무조건 OneTexture. 캐릭터는 경우에 따라 TwoTexture.
void RenderWithOneTexture(); void RenderWithOneTexture();
void RenderWithTwoTexture(); void RenderWithTwoTexture();
void BlendRenderWithOneTexture(); void BlendRenderWithOneTexture();
@ -160,7 +160,7 @@ class CGrannyModelInstance : public CGraphicCollisionObject
// Granny Data // Granny Data
granny_model_instance * m_pgrnModelInstance; granny_model_instance * m_pgrnModelInstance;
//granny_world_pose * m_pgrnWorldPose; // 현재 월드 포즈 포인터 //granny_world_pose * m_pgrnWorldPose; // 현재 월드 포즈 포인터
granny_control * m_pgrnCtrl; granny_control * m_pgrnCtrl;
granny_animation * m_pgrnAni; granny_animation * m_pgrnAni;
@ -182,7 +182,7 @@ class CGrannyModelInstance : public CGraphicCollisionObject
CGrannyMaterialPalette m_kMtrlPal; CGrannyMaterialPalette m_kMtrlPal;
// WORK // WORK
granny_world_pose* m_pgrnWorldPoseReal; // 실제 메모리는 여기에 할당 granny_world_pose* m_pgrnWorldPoseReal; // 실제 메모리는 여기에 할당
std::vector<granny_mesh_binding*> m_vct_pgrnMeshBinding; std::vector<granny_mesh_binding*> m_vct_pgrnMeshBinding;
// Dynamic Vertex Buffer // Dynamic Vertex Buffer

View File

@ -239,7 +239,7 @@ void CGraphicThingInstance::DrawBoundBox()
D3DXVECTOR3 vtMax; D3DXVECTOR3 vtMax;
SetDiffuseColor(0.0f, 1.0f, 0.0f); SetDiffuseColor(0.0f, 1.0f, 0.0f);
// 캐릭터 꽉차는 바운딩 박스 // 캐릭터 꽉차는 바운딩 박스
//GetBoundBox(&vtMin, &vtMax); //GetBoundBox(&vtMin, &vtMax);
//DrawLineCube(vtMin.x, vtMin.y, vtMin.z, vtMax.x, vtMax.y, vtMax.z); //DrawLineCube(vtMin.x, vtMin.y, vtMin.z, vtMax.x, vtMax.y, vtMax.z);
//const CThing::TMeshVector& rmeshVector=mc_pModel->meshVector; //const CThing::TMeshVector& rmeshVector=mc_pModel->meshVector;

View File

@ -161,7 +161,7 @@ void CGrannyModelInstance::__CreateMeshMatrices()
{ {
assert(m_pModel != NULL); assert(m_pModel != NULL);
if (m_pModel->GetMeshCount() <= 0) // 메쉬가 없는 (카메라 같은) 모델도 간혹 있다.. if (m_pModel->GetMeshCount() <= 0) // 메쉬가 없는 (카메라 같은) 모델도 간혹 있다..
return; return;
int meshCount = m_pModel->GetMeshCount(); int meshCount = m_pModel->GetMeshCount();
@ -274,14 +274,14 @@ const float * CGrannyModelInstance::GetBoneMatrixPointer(int iBone) const
const float * CGrannyModelInstance::GetCompositeBoneMatrixPointer(int iBone) const const float * CGrannyModelInstance::GetCompositeBoneMatrixPointer(int iBone) const
{ {
// NOTE : GrannyGetWorldPose4x4는 스케일 값등이 잘못나올 수 있음.. 그래니가 속도를 위해 // NOTE : GrannyGetWorldPose4x4는 스케일 값등이 잘못나올 수 있음.. 그래니가 속도를 위해
// GrannyGetWorldPose4x4에 모든 matrix 원소를 제 값으로 넣지 않음 // GrannyGetWorldPose4x4에 모든 matrix 원소를 제 값으로 넣지 않음
return GrannyGetWorldPoseComposite4x4(__GetWorldPosePtr(), iBone); return GrannyGetWorldPoseComposite4x4(__GetWorldPosePtr(), iBone);
} }
void CGrannyModelInstance::ReloadTexture() void CGrannyModelInstance::ReloadTexture()
{ {
assert("현재 사용하지 않음 - CGrannyModelInstance::ReloadTexture()"); assert("\xC7\xF6\xC0\xE7 \xBB\xE7\xBF\xEB\xC7\xCF\xC1\xF6 \xBE\xCA\xC0\xBD - CGrannyModelInstance::ReloadTexture()");
/* /*
assert(m_pModel != NULL); assert(m_pModel != NULL);
const CGrannyMaterialPalette & c_rGrannyMaterialPalette = m_pModel->GetMaterialPalette(); const CGrannyMaterialPalette & c_rGrannyMaterialPalette = m_pModel->GetMaterialPalette();

View File

@ -112,7 +112,7 @@ void CGrannyModelInstance::ChangeMotionPointer(const CGrannyMotion* pMotion, int
if (!pgrnModelInstance) if (!pgrnModelInstance)
return; return;
// 보간 되는 앞부분을 스킵 하기 위해 LocalTime 을 어느 정도 무시한다. - [levites] // 보간 되는 앞부분을 스킵 하기 위해 LocalTime 을 어느 정도 무시한다. - [levites]
float fSkipTime = 0.3f; float fSkipTime = 0.3f;
float localTime = GetLocalTime() - fSkipTime; float localTime = GetLocalTime() - fSkipTime;

View File

@ -47,7 +47,7 @@ void CGrannyModelInstance::DeformNoSkin(const D3DXMATRIX * c_pWorldMatrix)
// With One Texture // With One Texture
void CGrannyModelInstance::RenderWithOneTexture() void CGrannyModelInstance::RenderWithOneTexture()
{ {
// FIXME : Deform, Render, BlendRender를 묶어 상위에서 걸러주는 것이 더 나을 듯 - [levites] // FIXME : Deform, Render, BlendRender를 묶어 상위에서 걸러주는 것이 더 나을 듯 - [levites]
if (IsEmpty()) if (IsEmpty())
return; return;
@ -99,7 +99,7 @@ void CGrannyModelInstance::BlendRenderWithOneTexture()
// With Two Texture // With Two Texture
void CGrannyModelInstance::RenderWithTwoTexture() void CGrannyModelInstance::RenderWithTwoTexture()
{ {
// FIXME : Deform, Render, BlendRender를 묶어 상위에서 걸러주는 것이 더 나을 듯 - [levites] // FIXME : Deform, Render, BlendRender를 묶어 상위에서 걸러주는 것이 더 나을 듯 - [levites]
if (IsEmpty()) if (IsEmpty())
return; return;

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#pragma warning(disable:4786) // character 255 넘어가는거 끄기 #pragma warning(disable:4786) // character 255 넘어가는거 끄기
//#include <crtdbg.h> //#include <crtdbg.h>
#include <granny/granny.h> #include <granny/granny.h>
@ -10,13 +10,3 @@
#include "../eterBase/Stl.h" #include "../eterBase/Stl.h"
#include "Util.h" #include "Util.h"
// Armadillo nanomite protection
#if !defined(NANOBEGIN) && !defined(NANOEND)
#ifdef _DEBUG
#define NANOBEGIN
#define NANOEND
#else
#include <armadillo/SecuredSections.h>
#endif
#endif

View File

@ -342,8 +342,8 @@ bool CGraphicThingInstance::GetBonePosition(int iModelIndex, int iBoneIndex, flo
*pfz = pfMatrix[14]; *pfz = pfMatrix[14];
return true; return true;
} }
//iSkelInstance 가 있으면 기본 본에 Link(본이 붙는것)시키고, //iSkelInstance 가 있으면 기본 본에 Link(본이 붙는것)시키고,
//없으면 기본 본에 attach(좌표만 가져다 쓰는것) 됩니다. //없으면 기본 본에 attach(좌표만 가져다 쓰는것) 됩니다.
bool CGraphicThingInstance::SetModelInstance(int iDstModelInstance, int iSrcModelThing, int iSrcModel,int iSkelInstance) bool CGraphicThingInstance::SetModelInstance(int iDstModelInstance, int iSrcModelThing, int iSrcModel,int iSkelInstance)
{ {
if (!CheckModelInstanceIndex(iDstModelInstance)) if (!CheckModelInstanceIndex(iDstModelInstance))
@ -735,7 +735,7 @@ void CGraphicThingInstance::UpdateLODLevel()
const D3DXVECTOR3 & c_rv3CameraPosition = pcurCamera->GetEye(); const D3DXVECTOR3 & c_rv3CameraPosition = pcurCamera->GetEye();
const D3DXVECTOR3 & c_v3Position = GetPosition(); const D3DXVECTOR3 & c_v3Position = GetPosition();
// NOTE : 중심으로부터의 거리 계산에 z값 차이는 사용하지 않는다. - [levites] // NOTE : 중심으로부터의 거리 계산에 z값 차이는 사용하지 않는다. - [levites]
CGrannyLODController::FUpdateLODLevel update; CGrannyLODController::FUpdateLODLevel update;
update.fDistanceFromCenter = sqrtf((c_rv3TargetPosition.x - c_v3Position.x) * (c_rv3TargetPosition.x - c_v3Position.x) + update.fDistanceFromCenter = sqrtf((c_rv3TargetPosition.x - c_v3Position.x) * (c_rv3TargetPosition.x - c_v3Position.x) +
(c_rv3TargetPosition.y - c_v3Position.y) * (c_rv3TargetPosition.y - c_v3Position.y)); (c_rv3TargetPosition.y - c_v3Position.y) * (c_rv3TargetPosition.y - c_v3Position.y));

View File

@ -34,7 +34,7 @@ class CGraphicThingInstance : public CGraphicObjectInstance
void UpdateLODLevel(); void UpdateLODLevel();
void UpdateTime(); void UpdateTime();
void DeformAll(); // ¸ðµç LOD µðÆû void DeformAll(); // 모든 LOD 디폼
bool LessRenderOrder(CGraphicThingInstance* pkThingInst); bool LessRenderOrder(CGraphicThingInstance* pkThingInst);

View File

@ -9,11 +9,11 @@
struct TGA_HEADER struct TGA_HEADER
{ {
char idLen; // 0 char idLen; // 0
char palType; // 파레트있으면 1, 없음 0 char palType; // 파레트있으면 1, 없음 0
char imgType; // 파레트있으면 1, 없음 2 char imgType; // 파레트있으면 1, 없음 2
WORD colorBegin; // 0 WORD colorBegin; // 0
WORD colorCount; // 파레트 있으면 256, 없음 0 WORD colorCount; // 파레트 있으면 256, 없음 0
char palEntrySize; // 파레트 있으면 24, 없음 0 char palEntrySize; // 파레트 있으면 24, 없음 0
WORD left; WORD left;
WORD top; WORD top;
WORD width; WORD width;

View File

@ -33,7 +33,7 @@ void CTGAImage::Create(int width, int height)
m_Header.width = (short) width; m_Header.width = (short) width;
m_Header.height = (short) height; m_Header.height = (short) height;
m_Header.colorBits = 32; m_Header.colorBits = 32;
m_Header.desc = 0x08; // alpha channel 있음 m_Header.desc = 0x08; // alpha channel 있음
CImage::Create(width, height); CImage::Create(width, height);
} }
@ -54,7 +54,7 @@ bool CTGAImage::LoadFromMemory(int iSize, const BYTE * c_pbMem)
switch (m_Header.imgType) switch (m_Header.imgType)
{ {
case 3: // 알파만 있는 것 (1bytes per pixel, 거의 안쓰임) case 3: // 알파만 있는 것 (1bytes per pixel, 거의 안쓰임)
{ {
for (i = 0; i < hxw; ++i) for (i = 0; i < hxw; ++i)
{ {
@ -64,7 +64,7 @@ bool CTGAImage::LoadFromMemory(int iSize, const BYTE * c_pbMem)
} }
break; break;
case 2: // 압축 안된 TGA case 2: // 압축 안된 TGA
{ {
if (m_Header.colorBits == 16) // 16bit if (m_Header.colorBits == 16) // 16bit
{ {
@ -112,7 +112,7 @@ bool CTGAImage::LoadFromMemory(int iSize, const BYTE * c_pbMem)
} }
break; break;
case 10: // 압축 된 TGA (RLE) case 10: // 압축 된 TGA (RLE)
{ {
BYTE rle; BYTE rle;
@ -123,7 +123,7 @@ bool CTGAImage::LoadFromMemory(int iSize, const BYTE * c_pbMem)
{ {
rle = (BYTE) *(c_pbMem++); --iSize; rle = (BYTE) *(c_pbMem++); --iSize;
if (rle < 0x80) // 압축 안된 곳 if (rle < 0x80) // 압축 안된 곳
{ {
rle++; rle++;
@ -146,7 +146,7 @@ bool CTGAImage::LoadFromMemory(int iSize, const BYTE * c_pbMem)
} }
else else
{ {
// 압축 된 곳 // 압축 된 곳
rle -= 127; rle -= 127;
b = (BYTE) *(c_pbMem++); --iSize; b = (BYTE) *(c_pbMem++); --iSize;
@ -303,7 +303,7 @@ bool CTGAImage::SaveToDiskFile(const char* c_szFileName)
fwrite(&m_Header, 18, 1, fp); fwrite(&m_Header, 18, 1, fp);
if (m_Header.imgType == 10) // RLE 압축으로 저장 if (m_Header.imgType == 10) // RLE 압축으로 저장
{ {
DWORD * data = GetBasePointer(); DWORD * data = GetBasePointer();

View File

@ -61,7 +61,7 @@ bool CAttributeData::OnLoad(int /*iSize*/, const void * c_pvBuf)
{ {
if (!c_pvBuf) if (!c_pvBuf)
{ {
// NOTE: 파일이 존재하지 않으면 다른곳에서 그래픽 모델을 기반으로 충돌 데이터를 생성하니 리소스를 파괴하지 않고 유지시킴. // NOTE: 파일이 존재하지 않으면 다른곳에서 그래픽 모델을 기반으로 충돌 데이터를 생성하니 리소스를 파괴하지 않고 유지시킴.
return true; return true;
} }

View File

@ -15,7 +15,7 @@ class CAttributeInstance
const char * GetDataFileName() const; const char * GetDataFileName() const;
// NOTE : Object 전용 // NOTE : Object 전용
void SetObjectPointer(CAttributeData * pAttributeData); void SetObjectPointer(CAttributeData * pAttributeData);
void RefreshObject(const D3DXMATRIX & c_rmatGlobal); void RefreshObject(const D3DXMATRIX & c_rmatGlobal);
CAttributeData * GetObjectPointer() const; CAttributeData * GetObjectPointer() const;

View File

@ -438,7 +438,7 @@ void CCamera::RotateEyeAroundTarget(float fPitchDegree, float fRollDegree)
D3DXMATRIX matRot, matRotPitch, matRotRoll; D3DXMATRIX matRot, matRotPitch, matRotRoll;
// 머리위로 넘어가기 막기... // 머리위로 넘어가기 막기...
if (m_fPitch + fPitchDegree > 80.0f) if (m_fPitch + fPitchDegree > 80.0f)
{ {
fPitchDegree = 80.0f - m_fPitch; fPitchDegree = 80.0f - m_fPitch;
@ -593,7 +593,7 @@ bool CCameraManager::isCurrentCamera(unsigned char ucCameraNum)
return false; return false;
} }
// 잡스러운 함수들... // 잡스러운 함수들...
bool CCameraManager::AddCamera(unsigned char ucCameraNum) bool CCameraManager::AddCamera(unsigned char ucCameraNum)
{ {
if(m_CameraMap.end() != m_CameraMap.find(ucCameraNum)) if(m_CameraMap.end() != m_CameraMap.find(ucCameraNum))

View File

@ -51,8 +51,8 @@ class CCamera
void SetResistance(float fResistance); void SetResistance(float fResistance);
private: private:
const CCamera & operator = (const CCamera &) ; // 지원하지 않음 const CCamera & operator = (const CCamera &) ; // 지원하지 않음
CCamera (const CCamera & ) ; //지원하지 않음 CCamera (const CCamera & ) ; //지원하지 않음
// Camera Update // Camera Update
eCameraState m_eCameraState; eCameraState m_eCameraState;
@ -85,14 +85,14 @@ class CCamera
D3DXMATRIX m_matInverseView; D3DXMATRIX m_matInverseView;
D3DXMATRIX m_matBillboard; // Special matrix for billboarding effects D3DXMATRIX m_matBillboard; // Special matrix for billboarding effects
//추가분 //추가분
float m_fPitch; float m_fPitch;
float m_fRoll; float m_fRoll;
float m_fDistance; float m_fDistance;
// 카메라 AI를 위한 Ray 들 // 카메라 AI를 위한 Ray 들
// 카메라를 둘러싼 Ray // 카메라를 둘러싼 Ray
CRay m_kCameraBottomToTerrainRay; CRay m_kCameraBottomToTerrainRay;
CRay m_kCameraFrontToTerrainRay; CRay m_kCameraFrontToTerrainRay;
CRay m_kCameraBackToTerrainRay; CRay m_kCameraBackToTerrainRay;
@ -124,14 +124,14 @@ class CCamera
bool m_bDrag; bool m_bDrag;
// protected: // protected:
// 물리 // 물리
D3DXVECTOR3 m_v3AngularAcceleration; D3DXVECTOR3 m_v3AngularAcceleration;
D3DXVECTOR3 m_v3AngularVelocity; D3DXVECTOR3 m_v3AngularVelocity;
float m_fResistance; float m_fResistance;
public: public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// 물리 // 물리
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void SetAngularAcceleration(D3DXVECTOR3 v3AngularAcceleration) { m_v3AngularAcceleration = v3AngularAcceleration; } void SetAngularAcceleration(D3DXVECTOR3 v3AngularAcceleration) { m_v3AngularAcceleration = v3AngularAcceleration; }
@ -185,7 +185,7 @@ class CCamera
float GetRoll() const { return m_fRoll; } float GetRoll() const { return m_fRoll; }
float GetDistance() const { return m_fDistance; } float GetDistance() const { return m_fDistance; }
void Pitch(const float fPitchDelta); //돌아가는 각도를 넣는다. void Pitch(const float fPitchDelta); //돌아가는 각도를 넣는다.
void Roll(const float fRollDelta); void Roll(const float fRollDelta);
void SetDistance(const float fdistance); void SetDistance(const float fdistance);
@ -193,35 +193,35 @@ class CCamera
// camera movement // camera movement
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// 말그대로 이동... 카메라 위치와 타겟 위치가 모두 달라진다. // 말그대로 이동... 카메라 위치와 타겟 위치가 모두 달라진다.
void Move(const D3DXVECTOR3 & v3Displacement); void Move(const D3DXVECTOR3 & v3Displacement);
// 줌.. 카메라 위치만 이동.. 타겟 위치는 고정... // 줌.. 카메라 위치만 이동.. 타겟 위치는 고정...
void Zoom(float fRatio); void Zoom(float fRatio);
// 뷰 방향으로 이동.. 타겟위치가 달라지므로 줌과는 다르다... // 뷰 방향으로 이동.. 타겟위치가 달라지므로 줌과는 다르다...
void MoveAlongView(float fDistance); void MoveAlongView(float fDistance);
// 카메라 옆 방향으로 이동.. // 카메라 옆 방향으로 이동..
void MoveAlongCross(float fDistance); void MoveAlongCross(float fDistance);
// 카메라 업벡터 방향으로 이동... // 카메라 업벡터 방향으로 이동...
void MoveAlongUp(float fDistance); void MoveAlongUp(float fDistance);
// 카메라 옆 방향으로 이동... MoveAlongCross과 동일.. // 카메라 옆 방향으로 이동... MoveAlongCross과 동일..
void MoveLateral(float fDistance); void MoveLateral(float fDistance);
// 뷰 방향의 Z 성분을 무시한 XY평면 방향으로 이동.. // 뷰 방향의 Z 성분을 무시한 XY평면 방향으로 이동..
void MoveFront(float fDistance); void MoveFront(float fDistance);
// Z방향(연직 방향)으로 이동... // Z방향(연직 방향)으로 이동...
void MoveVertical(float fDistance); void MoveVertical(float fDistance);
// //카메라 위치는 고정시키고 머리만 든다. 타겟이 달라지겠죠? // //카메라 위치는 고정시키고 머리만 든다. 타겟이 달라지겠죠?
// //회전각을 라디안이 아닌 "도(Degree)"로 넣는다. // //회전각을 라디안이 아닌 "도(Degree)"로 넣는다.
// void RotateUpper(float fDegree); // void RotateUpper(float fDegree);
// 타겟 중심으로 돈다. Eterlib의 SetAroundCamera의 기능과 유사... // 타겟 중심으로 돈다. Eterlib의 SetAroundCamera의 기능과 유사...
// fPitchDegree는 수평(0도)로부터 아랫쪽으로 꺽어지는 각도... // fPitchDegree는 수평(0도)로부터 아랫쪽으로 꺽어지는 각도...
// fRollDegree는 타겟 중심으로 시계방향으로 도는 각도... // fRollDegree는 타겟 중심으로 시계방향으로 도는 각도...
void RotateEyeAroundTarget(float fPitchDegree, float fRollDegree); void RotateEyeAroundTarget(float fPitchDegree, float fRollDegree);
// 도는 중심점을 따로 지정 그 점을 중심으로 돈다. 타겟 점도 달라지겠죠? // 도는 중심점을 따로 지정 그 점을 중심으로 돈다. 타겟 점도 달라지겠죠?
void RotateEyeAroundPoint(const D3DXVECTOR3 & v3Point, float fPitchDegree, float fRollDegree); void RotateEyeAroundPoint(const D3DXVECTOR3 & v3Point, float fPitchDegree, float fRollDegree);
protected: protected:

View File

@ -230,7 +230,7 @@ bool CSphereCollisionInstance::OnMovementCollisionDynamicSphere(const CDynamicSp
{ {
if (square_distance_between_linesegment_and_point(s.v3LastPosition,s.v3Position,m_attribute.v3Position) < (m_attribute.fRadius+s.fRadius)*(m_attribute.fRadius+s.fRadius)) if (square_distance_between_linesegment_and_point(s.v3LastPosition,s.v3Position,m_attribute.v3Position) < (m_attribute.fRadius+s.fRadius)*(m_attribute.fRadius+s.fRadius))
{ {
// NOTE : 거리가 가까워 졌을때만.. - [levites] // NOTE : 거리가 가까워 졌을때만.. - [levites]
if (GetVector3Distance(s.v3Position, m_attribute.v3Position) < if (GetVector3Distance(s.v3Position, m_attribute.v3Position) <
GetVector3Distance(s.v3LastPosition, m_attribute.v3Position)) GetVector3Distance(s.v3LastPosition, m_attribute.v3Position))
return true; return true;
@ -321,7 +321,7 @@ bool CPlaneCollisionInstance::OnMovementCollisionDynamicSphere(const CDynamicSph
if (D3DXVec3Dot(&v3QuadPosition2, &m_attribute.v3InsideVector[2]) > - s.fRadius/*0.0f*/) if (D3DXVec3Dot(&v3QuadPosition2, &m_attribute.v3InsideVector[2]) > - s.fRadius/*0.0f*/)
if (D3DXVec3Dot(&v3QuadPosition2, &m_attribute.v3InsideVector[3]) > - s.fRadius/*0.0f*/) if (D3DXVec3Dot(&v3QuadPosition2, &m_attribute.v3InsideVector[3]) > - s.fRadius/*0.0f*/)
{ {
// NOTE : 거리가 가까워 졌을때만.. - [levites] // NOTE : 거리가 가까워 졌을때만.. - [levites]
if (fabs(D3DXVec3Dot(&(s.v3Position - m_attribute.v3Position), &m_attribute.v3Normal)) < if (fabs(D3DXVec3Dot(&(s.v3Position - m_attribute.v3Position), &m_attribute.v3Normal)) <
fabs(D3DXVec3Dot(&(s.v3LastPosition - m_attribute.v3Position), &m_attribute.v3Normal))) fabs(D3DXVec3Dot(&(s.v3LastPosition - m_attribute.v3Position), &m_attribute.v3Normal)))
return true; return true;
@ -471,14 +471,14 @@ bool CCylinderCollisionInstance::OnMovementCollisionDynamicSphere(const CDynamic
{ {
if (CollideCylinderVSDynamicSphere(m_attribute, s)) if (CollideCylinderVSDynamicSphere(m_attribute, s))
{ {
// NOTE : 거리가 가까워 졌을때만.. - [levites] // NOTE : 거리가 가까워 졌을때만.. - [levites]
if (GetVector3Distance(s.v3Position, m_attribute.v3Position) < if (GetVector3Distance(s.v3Position, m_attribute.v3Position) <
GetVector3Distance(s.v3LastPosition, m_attribute.v3Position)) GetVector3Distance(s.v3LastPosition, m_attribute.v3Position))
return true; return true;
} }
// NOTE : 이동 거리가 클 경우 빈틈없이 (원 크기 단위로) 이동하면서 전부 체크 해 본다 - [levites] // NOTE : 이동 거리가 클 경우 빈틈없이 (원 크기 단위로) 이동하면서 전부 체크 해 본다 - [levites]
D3DXVECTOR3 v3Distance = s.v3Position - s.v3LastPosition; D3DXVECTOR3 v3Distance = s.v3Position - s.v3LastPosition;
float fDistance = D3DXVec3Length(&v3Distance); float fDistance = D3DXVec3Length(&v3Distance);
if (s.fRadius<=0.0001f) if (s.fRadius<=0.0001f)

View File

@ -27,10 +27,10 @@ class CColorTransitionHelper
bool isTransitionStarted() { return m_bTransitionStarted; } bool isTransitionStarted() { return m_bTransitionStarted; }
private: private:
D3DCOLOR m_dwCurColor; // 현재 색 D3DCOLOR m_dwCurColor; // 현재 색
DWORD m_dwStartTime; // 바뀌기 시작하는 시간 DWORD m_dwStartTime; // 바뀌기 시작하는 시간
DWORD m_dwDuration; // 얼마 동안에 바뀌는가? DWORD m_dwDuration; // 얼마 동안에 바뀌는가?
bool m_bTransitionStarted; bool m_bTransitionStarted;

View File

@ -93,7 +93,7 @@ void CCullingManager::Reset()
void CCullingManager::Update() void CCullingManager::Update()
{ {
// TODO : update each object // TODO : update each object
// 하지말고 각자 하게 해보자 // 하지말고 각자 하게 해보자
//DWORD time = ELTimer_GetMSec(); //DWORD time = ELTimer_GetMSec();
//Reset(); //Reset();

View File

@ -42,15 +42,15 @@ protected:
D3DXPLANE m_v4FrontPlane; D3DXPLANE m_v4FrontPlane;
D3DXPLANE m_v4BackPlane; D3DXPLANE m_v4BackPlane;
// 개수 // 개수
DWORD m_dwVertexCount; DWORD m_dwVertexCount;
DWORD m_dwPrimitiveCount; DWORD m_dwPrimitiveCount;
// 버택스 버퍼와 인댁스 버퍼 // 버택스 버퍼와 인댁스 버퍼
// CGraphicVertexBuffer m_GraphicVertexBuffer; // CGraphicVertexBuffer m_GraphicVertexBuffer;
// CGraphicIndexBuffer m_GraphicIndexBuffer; // CGraphicIndexBuffer m_GraphicIndexBuffer;
// 버택스 버퍼와 인댁스 버퍼 대신에 배열 만들고 DrawIndexedPrimitiveUP로 그리자. // 버택스 버퍼와 인댁스 버퍼 대신에 배열 만들고 DrawIndexedPrimitiveUP로 그리자.
typedef struct typedef struct
{ {
WORD m_wMinIndex; WORD m_wMinIndex;

View File

@ -76,7 +76,7 @@ void CFileLoaderThread::Shutdown()
} }
while (!bRet); while (!bRet);
WaitForSingleObject(m_hThread, 10000); // 쓰레드가 종료 되기를 10초 기다림 WaitForSingleObject(m_hThread, 10000); // 쓰레드가 종료 되기를 10초 기다림
} }
UINT CFileLoaderThread::Execute(void * /*pvArg*/) UINT CFileLoaderThread::Execute(void * /*pvArg*/)

View File

@ -75,13 +75,13 @@ int CGraphicBase::ms_iWavingPower;
DWORD CGraphicBase::ms_dwFlashingEndTime; DWORD CGraphicBase::ms_dwFlashingEndTime;
D3DXCOLOR CGraphicBase::ms_FlashingColor; D3DXCOLOR CGraphicBase::ms_FlashingColor;
// Terrain picking용 Ray... CCamera 이용하는 버전.. 기존의 Ray와 통합 필요... // Terrain picking용 Ray... CCamera 이용하는 버전.. 기존의 Ray와 통합 필요...
CRay CGraphicBase::ms_Ray; CRay CGraphicBase::ms_Ray;
bool CGraphicBase::ms_bSupportDXT = true; bool CGraphicBase::ms_bSupportDXT = true;
bool CGraphicBase::ms_isLowTextureMemory = false; bool CGraphicBase::ms_isLowTextureMemory = false;
bool CGraphicBase::ms_isHighTextureMemory = false; bool CGraphicBase::ms_isHighTextureMemory = false;
// 2004.11.18.myevan.DynamicVertexBuffer로 교체 // 2004.11.18.myevan.DynamicVertexBuffer로 교체
/* /*
std::vector<TIndex> CGraphicBase::ms_lineIdxVector; std::vector<TIndex> CGraphicBase::ms_lineIdxVector;
std::vector<TIndex> CGraphicBase::ms_lineTriIdxVector; std::vector<TIndex> CGraphicBase::ms_lineTriIdxVector;

View File

@ -230,7 +230,7 @@ class CGraphicBase
void UpdatePipeLineMatrix(); void UpdatePipeLineMatrix();
protected: protected:
// 각종 D3DX Mesh 들 (컬루젼 데이터 등을 표시활 때 쓴다) // 각종 D3DX Mesh 들 (컬루젼 데이터 등을 표시활 때 쓴다)
static LPD3DXMESH ms_lpSphereMesh; static LPD3DXMESH ms_lpSphereMesh;
static LPD3DXMESH ms_lpCylinderMesh; static LPD3DXMESH ms_lpCylinderMesh;
@ -274,7 +274,7 @@ class CGraphicBase
static float ms_fNearY; static float ms_fNearY;
static float ms_fFarY; static float ms_fFarY;
// 2004.11.18.myevan.DynamicVertexBuffer로 교체 // 2004.11.18.myevan.DynamicVertexBuffer로 교체
/* /*
static std::vector<TIndex> ms_lineIdxVector; static std::vector<TIndex> ms_lineIdxVector;
static std::vector<TIndex> ms_lineTriIdxVector; static std::vector<TIndex> ms_lineTriIdxVector;
@ -292,7 +292,7 @@ class CGraphicBase
static DWORD ms_dwFlashingEndTime; static DWORD ms_dwFlashingEndTime;
static D3DXCOLOR ms_FlashingColor; static D3DXCOLOR ms_FlashingColor;
// Terrain picking용 Ray... CCamera 이용하는 버전.. 기존의 Ray와 통합 필요... // Terrain picking용 Ray... CCamera 이용하는 버전.. 기존의 Ray와 통합 필요...
static CRay ms_Ray; static CRay ms_Ray;
// //

View File

@ -18,8 +18,8 @@ class CGraphicCollisionObject : public CGraphicBase
bool IntersectSphere(const D3DXVECTOR3 & c_rv3Position, float fRadius, const D3DXVECTOR3 & c_rv3RayOriginal, const D3DXVECTOR3 & c_rv3RayDirection); bool IntersectSphere(const D3DXVECTOR3 & c_rv3Position, float fRadius, const D3DXVECTOR3 & c_rv3RayOriginal, const D3DXVECTOR3 & c_rv3RayDirection);
bool IntersectCylinder(const D3DXVECTOR3 & c_rv3Position, float fRadius, float fHeight, const D3DXVECTOR3 & c_rv3RayOriginal, const D3DXVECTOR3 & c_rv3RayDirection); bool IntersectCylinder(const D3DXVECTOR3 & c_rv3Position, float fRadius, float fHeight, const D3DXVECTOR3 & c_rv3RayOriginal, const D3DXVECTOR3 & c_rv3RayDirection);
// NOTE : ms_vtPickRayOrig와 ms_vtPickRayDir를 CGraphicBGase가 가지고 있는데 // NOTE : ms_vtPickRayOrig와 ms_vtPickRayDir를 CGraphicBGase가 가지고 있는데
// 굳이 인자로 넣어줘야 하는 이유가 있는가? Customize를 위해서? - [levites] // 굳이 인자로 넣어줘야 하는 이유가 있는가? Customize를 위해서? - [levites]
bool IntersectSphere(const D3DXVECTOR3 & c_rv3Position, float fRadius); bool IntersectSphere(const D3DXVECTOR3 & c_rv3Position, float fRadius);
bool IntersectCylinder(const D3DXVECTOR3 & c_rv3Position, float fRadius, float fHeight); bool IntersectCylinder(const D3DXVECTOR3 & c_rv3Position, float fRadius, float fHeight);
}; };

View File

@ -183,7 +183,7 @@ static DWORD s_MaxTextureWidth, s_MaxTextureHeight;
BOOL EL3D_ConfirmDevice(D3DCAPS9& rkD3DCaps, UINT uBehavior, D3DFORMAT /*eD3DFmt*/) BOOL EL3D_ConfirmDevice(D3DCAPS9& rkD3DCaps, UINT uBehavior, D3DFORMAT /*eD3DFmt*/)
{ {
// PUREDEVICE는 GetTransform / GetViewport 등이 되지 않는다. // PUREDEVICE는 GetTransform / GetViewport 등이 되지 않는다.
if (uBehavior & D3DCREATE_PUREDEVICE) if (uBehavior & D3DCREATE_PUREDEVICE)
return FALSE; return FALSE;
@ -369,7 +369,7 @@ RETRY:
ms_iD3DAdapterInfo, ms_iD3DAdapterInfo,
D3DDEVTYPE_HAL, D3DDEVTYPE_HAL,
hWnd, hWnd,
// 2004. 1. 9 myevan 버텍스 프로세싱 방식 자동 선택 추가 // 2004. 1. 9 myevan 버텍스 프로세싱 방식 자동 선택 추가
pkD3DModeInfo->m_dwD3DBehavior, pkD3DModeInfo->m_dwD3DBehavior,
&ms_d3dPresentParameter, &ms_d3dPresentParameter,
&ms_lpd3dDevice))) &ms_lpd3dDevice)))
@ -393,7 +393,7 @@ RETRY:
if (ErrorCorrection) if (ErrorCorrection)
return CREATE_DEVICE; return CREATE_DEVICE;
// 2004. 1. 9 myevan 큰의미 없는 코드인듯.. 에러나면 표시하고 종료하자 // 2004. 1. 9 myevan 큰의미 없는 코드인듯.. 에러나면 표시하고 종료하자
iReflashRate = 0; iReflashRate = 0;
++ErrorCorrection; ++ErrorCorrection;
iRet = CREATE_REFRESHRATE; iRet = CREATE_REFRESHRATE;

View File

@ -23,8 +23,8 @@ public:
CREATE_GET_DEVICE_CAPS2 = (1 << 3), CREATE_GET_DEVICE_CAPS2 = (1 << 3),
CREATE_DEVICE = (1 << 4), CREATE_DEVICE = (1 << 4),
CREATE_REFRESHRATE = (1 << 5), CREATE_REFRESHRATE = (1 << 5),
CREATE_ENUM = (1 << 6), // 2003. 01. 09. myevan 모드 리스트 얻기 실패 CREATE_ENUM = (1 << 6), // 2003. 01. 09. myevan 모드 리스트 얻기 실패
CREATE_DETECT = (1 << 7), // 2003. 01. 09. myevan 모드 선택 실패 CREATE_DETECT = (1 << 7), // 2003. 01. 09. myevan 모드 선택 실패
CREATE_NO_TNL = (1 << 8), CREATE_NO_TNL = (1 << 8),
CREATE_BAD_DRIVER = (1 << 9), CREATE_BAD_DRIVER = (1 << 9),
CREATE_FORMAT = (1 << 10), CREATE_FORMAT = (1 << 10),

View File

@ -116,7 +116,7 @@ void CGraphicExpandedImageInstance::OnRender()
break; break;
} }
// 2004.11.18.myevan.ctrl+alt+del 반복 사용시 튕기는 문제 // 2004.11.18.myevan.ctrl+alt+del 반복 사용시 튕기는 문제
if (CGraphicBase::SetPDTStream(vertices, 4)) if (CGraphicBase::SetPDTStream(vertices, 4))
{ {
CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT); CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT);

View File

@ -213,7 +213,7 @@ CGraphicFontTexture::TCharacterInfomation* CGraphicFontTexture::UpdateCharacterI
wchar_t keyValue = code.second; wchar_t keyValue = code.second;
if (keyValue == 0x08) if (keyValue == 0x08)
keyValue = L' '; // 탭은 공백으로 바꾼다 (아랍 출력시 탭 사용: NAME:\tTEXT -> TEXT\t:NAME 로 전환됨 ) keyValue = L' '; // 탭은 공백으로 바꾼다 (아랍 출력시 탭 사용: NAME:\tTEXT -> TEXT\t:NAME 로 전환됨 )
ABCFLOAT stABC; ABCFLOAT stABC;
SIZE size; SIZE size;

View File

@ -68,7 +68,7 @@ bool CGraphicImage::OnLoad(int iSize, const void * c_pvBuf)
m_imageTexture.SetFileName(CResource::GetFileName()); m_imageTexture.SetFileName(CResource::GetFileName());
// 특정 컴퓨터에서 Unknown으로 '안'하면 튕기는 현상이 있음-_-; -비엽 // 특정 컴퓨터에서 Unknown으로 '안'하면 튕기는 현상이 있음-_-; -비엽
if (!m_imageTexture.CreateFromMemoryFile(iSize, c_pvBuf, D3DFMT_UNKNOWN, m_dwFilter)) if (!m_imageTexture.CreateFromMemoryFile(iSize, c_pvBuf, D3DFMT_UNKNOWN, m_dwFilter))
return false; return false;

View File

@ -83,7 +83,7 @@ void CGraphicImageInstance::OnRender()
vertices[3].texCoord = TTextureCoordinate(eu, ev); vertices[3].texCoord = TTextureCoordinate(eu, ev);
vertices[3].diffuse = m_DiffuseColor; vertices[3].diffuse = m_DiffuseColor;
// 2004.11.18.myevan.ctrl+alt+del 반복 사용시 튕기는 문제 // 2004.11.18.myevan.ctrl+alt+del 반복 사용시 튕기는 문제
if (CGraphicBase::SetPDTStream(vertices, 4)) if (CGraphicBase::SetPDTStream(vertices, 4))
{ {
CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT); CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT);
@ -207,7 +207,7 @@ void CGraphicImageInstance::Initialize()
void CGraphicImageInstance::Destroy() void CGraphicImageInstance::Destroy()
{ {
m_roImage.SetPointer(NULL); // CRef 에서 레퍼런스 카운트가 떨어져야 함. m_roImage.SetPointer(NULL); // CRef 에서 레퍼런스 카운트가 떨어져야 함.
Initialize(); Initialize();
} }

View File

@ -44,7 +44,7 @@ bool CGraphicImageTexture::CreateDeviceObjects()
if (m_stFileName.empty()) if (m_stFileName.empty())
{ {
// 폰트 텍스쳐 // 폰트 텍스쳐
if (FAILED(ms_lpd3dDevice->CreateTexture(m_width, m_height, 1, 0, m_d3dFmt, D3DPOOL_MANAGED, &m_lpd3dTexture, NULL))) if (FAILED(ms_lpd3dDevice->CreateTexture(m_width, m_height, 1, 0, m_d3dFmt, D3DPOOL_MANAGED, &m_lpd3dTexture, NULL)))
return false; return false;
} }

View File

@ -97,18 +97,18 @@ struct LightComp
} }
}; };
// NOTE : FlushLight후 렌더링 // NOTE : FlushLight후 렌더링
// 그 후 반드시 RestoreLight를 해줘야만 한다. // 그 후 반드시 RestoreLight를 해줘야만 한다.
void CLightManager::FlushLight() void CLightManager::FlushLight()
{ {
Update(); Update();
m_LightSortVector.clear(); m_LightSortVector.clear();
// NOTE: Dynamic과 Static을 분리 시키고 CenterPosition이 바뀔때마다 Static만 // NOTE: Dynamic과 Static을 분리 시키고 CenterPosition이 바뀔때마다 Static만
// 다시 Flush 하는 식으로 최적화 할 수 있다. - [levites] // 다시 Flush 하는 식으로 최적화 할 수 있다. - [levites]
// light들의 거리를 추출해 정렬한다. // light들의 거리를 추출해 정렬한다.
TLightMap::iterator itor = m_LightMap.begin(); TLightMap::iterator itor = m_LightMap.begin();
for (; itor != m_LightMap.end(); ++itor) for (; itor != m_LightMap.end(); ++itor)
@ -124,7 +124,7 @@ void CLightManager::FlushLight()
// quick sort lights // quick sort lights
std::sort(m_LightSortVector.begin(), m_LightSortVector.end(), LightComp()); std::sort(m_LightSortVector.begin(), m_LightSortVector.end(), LightComp());
// NOTE - 거리로 정렬된 라이트를 Limit 갯수 만큼 제한해서 켜준다. // NOTE - 거리로 정렬된 라이트를 Limit 갯수 만큼 제한해서 켜준다.
STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, TRUE); STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, TRUE);
for (DWORD k = 0; k < min(m_dwLimitLightCount, m_LightSortVector.size()); ++k) for (DWORD k = 0; k < min(m_dwLimitLightCount, m_LightSortVector.size()); ++k)

View File

@ -93,8 +93,8 @@ class CLightManager : public CGraphicBase, public CLightBase, public CSingleton<
void Initialize(); void Initialize();
// NOTE : FlushLight후 렌더링 // NOTE : FlushLight후 렌더링
// 그 후 반드시 RestoreLight를 해줘야만 한다. // 그 후 반드시 RestoreLight를 해줘야만 한다.
void Update(); void Update();
void FlushLight(); void FlushLight();
void RestoreLight(); void RestoreLight();

View File

@ -241,7 +241,7 @@ void CGraphicMarkInstance::Initialize()
void CGraphicMarkInstance::Destroy() void CGraphicMarkInstance::Destroy()
{ {
m_roImage.SetPointer(NULL); // CRef 에서 레퍼런스 카운트가 떨어져야 함. m_roImage.SetPointer(NULL); // CRef 에서 레퍼런스 카운트가 떨어져야 함.
Initialize(); Initialize();
} }

View File

@ -53,7 +53,7 @@ void CScreen::RenderBox3d(float sx, float sy, float sz, float ex, float ey, floa
{ ex, ey, ez, ms_diffuseColor, 0.0f, 0.0f }, // 3 { ex, ey, ez, ms_diffuseColor, 0.0f, 0.0f }, // 3
{ sx, ey, ez, ms_diffuseColor, 0.0f, 0.0f }, // 2 { sx, ey, ez, ms_diffuseColor, 0.0f, 0.0f }, // 2
{ ex+1.0f, ey, ez, ms_diffuseColor, 0.0f, 0.0f } // 3, (x가 1증가된 3) { ex+1.0f, ey, ez, ms_diffuseColor, 0.0f, 0.0f } // 3, (x가 1증가된 3)
}; };
// 2004.11.18.myevan.DrawIndexPrimitiveUP -> DynamicVertexBuffer // 2004.11.18.myevan.DrawIndexPrimitiveUP -> DynamicVertexBuffer
@ -510,11 +510,11 @@ void CScreen::SetCursorPosition(int x, int y, int hres, int vres)
ms_vtPickRayOrig.y = matViewInverse._42; ms_vtPickRayOrig.y = matViewInverse._42;
ms_vtPickRayOrig.z = matViewInverse._43; ms_vtPickRayOrig.z = matViewInverse._43;
// // 2003. 9. 9 동현 추가 // // 2003. 9. 9 동현 추가
// // 지형 picking을 위한 뻘짓... ㅡㅡ; 위에 것과 통합 필요... // // 지형 picking을 위한 뻘짓... ㅡㅡ; 위에 것과 통합 필요...
ms_Ray.SetStartPoint(ms_vtPickRayOrig); ms_Ray.SetStartPoint(ms_vtPickRayOrig);
ms_Ray.SetDirection(-ms_vtPickRayDir, 51200.0f); ms_Ray.SetDirection(-ms_vtPickRayDir, 51200.0f);
// // 2003. 9. 9 동현 추가 // // 2003. 9. 9 동현 추가
} }
bool CScreen::GetCursorPosition(float* px, float* py, float* pz) bool CScreen::GetCursorPosition(float* px, float* py, float* pz)

View File

@ -38,9 +38,9 @@ bool CGraphicText::OnLoad(int /*iSize*/, const void* /*c_pvBuf*/)
bool bItalic = false; bool bItalic = false;
// format // format
// 굴림.fnt "굴림" 폰트 기본 사이즈 12 로 로딩 // 굴림.fnt "굴림" 폰트 기본 사이즈 12 로 로딩
// 굴림:18.fnt "굴림" 폰트 사이즈 18 로 로딩 // 굴림:18.fnt "굴림" 폰트 사이즈 18 로 로딩
// 굴림:14i.fnt "굴림" 폰트 사이즈 14 & 이탤릭으로 로딩 // 굴림:14i.fnt "굴림" 폰트 사이즈 14 & 이탤릭으로 로딩
const char * p = strrchr(GetFileName(), ':'); const char * p = strrchr(GetFileName(), ':');
if (p) if (p)

View File

@ -121,12 +121,12 @@ int ReadToken(const char* token)
void CGraphicTextInstance::Update() void CGraphicTextInstance::Update()
{ {
if (m_isUpdate) // 문자열이 바뀌었을 때만 업데이트 한다. if (m_isUpdate) // 문자열이 바뀌었을 때만 업데이트 한다.
return; return;
if (m_roText.IsNull()) if (m_roText.IsNull())
{ {
Tracef("CGraphicTextInstance::Update - 폰트가 설정되지 않았습니다\n"); Tracef("CGraphicTextInstance::Update - Font not set\n");
return; return;
} }
@ -139,7 +139,7 @@ void CGraphicTextInstance::Update()
UINT defCodePage = GetDefaultCodePage(); UINT defCodePage = GetDefaultCodePage();
UINT dataCodePage = defCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패 UINT dataCodePage = defCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패
CGraphicFontTexture::TCharacterInfomation* pSpaceInfo = pFontTexture->GetCharacterInfomation(dataCodePage, ' '); CGraphicFontTexture::TCharacterInfomation* pSpaceInfo = pFontTexture->GetCharacterInfomation(dataCodePage, ' ');
@ -185,7 +185,7 @@ void CGraphicTextInstance::Update()
bool isEnglish = true; bool isEnglish = true;
int nEnglishBase = wArabicTextLen - 1; int nEnglishBase = wArabicTextLen - 1;
//<<하이퍼 링크>> //<<하이퍼 링크>>
int x = 0; int x = 0;
int len; int len;
@ -194,7 +194,7 @@ void CGraphicTextInstance::Update()
std::wstring hyperlinkBuffer; std::wstring hyperlinkBuffer;
int no_hyperlink = 0; int no_hyperlink = 0;
// 심볼로 끝나면 아랍어 모드로 시작해야한다 // 심볼로 끝나면 아랍어 모드로 시작해야한다
if (Arabic_IsInSymbol(wArabicText[wArabicTextLen - 1])) if (Arabic_IsInSymbol(wArabicText[wArabicTextLen - 1]))
{ {
isEnglish = false; isEnglish = false;
@ -208,24 +208,24 @@ void CGraphicTextInstance::Update()
if (isEnglish) if (isEnglish)
{ {
// <<심볼의 경우 (ex. 기호, 공백)>> -> 영어 모드 유지. // <<심볼의 경우 (ex. 기호, 공백)>> -> 영어 모드 유지.
// <<(심볼이 아닌 것들 : 숫자, 영어, 아랍어)>> // <<(심볼이 아닌 것들 : 숫자, 영어, 아랍어)>>
// (1) 맨 앞의 심볼 or // (1) 맨 앞의 심볼 or
// (2) // (2)
// 1) 앞 글자가 아랍어 아님 && // 1) 앞 글자가 아랍어 아님 &&
// 2) 뒷 글자가 아랍어 아님 && // 2) 뒷 글자가 아랍어 아님 &&
// 3) 뒷 글자가 심볼'|'이 아님 && // 3) 뒷 글자가 심볼'|'이 아님 &&
// or // or
// (3) 현재 심볼이 '|' // (3) 현재 심볼이 '|'
// <<아랍어 모드로 넘어가는 경우 : 심볼에서.>> // <<아랍어 모드로 넘어가는 경우 : 심볼에서.>>
// 1) 앞글자 아랍어 // 1) 앞글자 아랍어
// 2) 뒷글자 아랍어 // 2) 뒷글자 아랍어
// //
// //
if (Arabic_IsInSymbol(wArabicChar) && ( if (Arabic_IsInSymbol(wArabicChar) && (
(i == 0) || (i == 0) ||
(i > 0 && (i > 0 &&
!(Arabic_HasPresentation(wArabicText, i - 1) || Arabic_IsInPresentation(wArabicText[i + 1])) && //앞글자, 뒷글자가 아랍어 아님. !(Arabic_HasPresentation(wArabicText, i - 1) || Arabic_IsInPresentation(wArabicText[i + 1])) && //앞글자, 뒷글자가 아랍어 아님.
wArabicText[i+1] != '|' wArabicText[i+1] != '|'
) || ) ||
wArabicText[i] == '|' wArabicText[i] == '|'
@ -234,10 +234,10 @@ void CGraphicTextInstance::Update()
// pass // pass
int temptest = 1; int temptest = 1;
} }
// (1)아랍어이거나 (2)아랍어 다음의 심볼이라면 아랍어 모드 전환 // (1)아랍어이거나 (2)아랍어 다음의 심볼이라면 아랍어 모드 전환
else if (Arabic_IsInPresentation(wArabicChar) || Arabic_IsInSymbol(wArabicChar)) else if (Arabic_IsInPresentation(wArabicChar) || Arabic_IsInSymbol(wArabicChar))
{ {
//그 전까지의 영어를 그린다. //그 전까지의 영어를 그린다.
for (int e = i + 1; e <= nEnglishBase;) { for (int e = i + 1; e <= nEnglishBase;) {
int ret = GetTextTag(&wArabicText[e], wArabicTextLen - e, len, hyperlinkBuffer); int ret = GetTextTag(&wArabicText[e], wArabicTextLen - e, len, hyperlinkBuffer);
@ -251,7 +251,7 @@ void CGraphicTextInstance::Update()
kHyperlink.ex += charWidth; kHyperlink.ex += charWidth;
//x += charWidth; //x += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정. //기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++) for (int j = 1; j <= no_hyperlink; j++)
{ {
if(m_hyperlinkVector.size() < j) if(m_hyperlinkVector.size() < j)
@ -279,7 +279,7 @@ void CGraphicTextInstance::Update()
if (hyperlinkStep == 1) if (hyperlinkStep == 1)
{ {
++hyperlinkStep; ++hyperlinkStep;
kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치 kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치
} }
else else
{ {
@ -299,7 +299,7 @@ void CGraphicTextInstance::Update()
int charWidth = __DrawCharacter(pFontTexture, dataCodePage, Arabic_ConvSymbol(wArabicText[i]), dwColor); int charWidth = __DrawCharacter(pFontTexture, dataCodePage, Arabic_ConvSymbol(wArabicText[i]), dwColor);
kHyperlink.ex += charWidth; kHyperlink.ex += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정. //기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++) for (int j = 1; j <= no_hyperlink; j++)
{ {
if(m_hyperlinkVector.size() < j) if(m_hyperlinkVector.size() < j)
@ -313,16 +313,16 @@ void CGraphicTextInstance::Update()
isEnglish = false; isEnglish = false;
} }
} }
else //[[[아랍어 모드]]] else //[[[아랍어 모드]]]
{ {
// 아랍어이거나 아랍어 출력중 나오는 심볼이라면 // 아랍어이거나 아랍어 출력중 나오는 심볼이라면
if (Arabic_IsInPresentation(wArabicChar) || Arabic_IsInSymbol(wArabicChar)) if (Arabic_IsInPresentation(wArabicChar) || Arabic_IsInSymbol(wArabicChar))
{ {
int charWidth = __DrawCharacter(pFontTexture, dataCodePage, Arabic_ConvSymbol(wArabicText[i]), dwColor); int charWidth = __DrawCharacter(pFontTexture, dataCodePage, Arabic_ConvSymbol(wArabicText[i]), dwColor);
kHyperlink.ex += charWidth; kHyperlink.ex += charWidth;
x += charWidth; x += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정. //기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++) for (int j = 1; j <= no_hyperlink; j++)
{ {
if(m_hyperlinkVector.size() < j) if(m_hyperlinkVector.size() < j)
@ -333,7 +333,7 @@ void CGraphicTextInstance::Update()
tempLink.sx += charWidth; tempLink.sx += charWidth;
} }
} }
else //영어이거나, 영어 다음에 나오는 심볼이라면, else //영어이거나, 영어 다음에 나오는 심볼이라면,
{ {
nEnglishBase = i; nEnglishBase = i;
isEnglish = true; isEnglish = true;
@ -355,7 +355,7 @@ void CGraphicTextInstance::Update()
int charWidth = __DrawCharacter(pFontTexture, dataCodePage, wArabicText[e], dwColor); int charWidth = __DrawCharacter(pFontTexture, dataCodePage, wArabicText[e], dwColor);
kHyperlink.ex += charWidth; kHyperlink.ex += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정. //기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++) for (int j = 1; j <= no_hyperlink; j++)
{ {
if(m_hyperlinkVector.size() < j) if(m_hyperlinkVector.size() < j)
@ -383,7 +383,7 @@ void CGraphicTextInstance::Update()
if (hyperlinkStep == 1) if (hyperlinkStep == 1)
{ {
++hyperlinkStep; ++hyperlinkStep;
kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치 kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치
} }
else else
{ {
@ -401,7 +401,7 @@ void CGraphicTextInstance::Update()
} }
} }
else // 아랍외 다른 지역. else // 아랍외 다른 지역.
{ {
int x = 0; int x = 0;
int len; int len;
@ -440,7 +440,7 @@ void CGraphicTextInstance::Update()
if (hyperlinkStep == 1) if (hyperlinkStep == 1)
{ {
++hyperlinkStep; ++hyperlinkStep;
kHyperlink.ex = kHyperlink.sx = x; // 실제 텍스트가 시작되는 위치 kHyperlink.ex = kHyperlink.sx = x; // 실제 텍스트가 시작되는 위치
} }
else else
{ {
@ -460,7 +460,7 @@ void CGraphicTextInstance::Update()
if (token < end) if (token < end)
{ {
int newCodePage = ReadToken(token); int newCodePage = ReadToken(token);
dataCodePage = newCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패 dataCodePage = newCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패
begin = token + 5; begin = token + 5;
} }
else else
@ -570,7 +570,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
CGraphicFontTexture::TCharacterInfomation* pCurCharInfo; CGraphicFontTexture::TCharacterInfomation* pCurCharInfo;
// 테두리 // 테두리
if (m_isOutline) if (m_isOutline)
{ {
fCurX=fStanX; fCurX=fStanX;
@ -586,7 +586,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
fFontHeight=float(pCurCharInfo->height); fFontHeight=float(pCurCharInfo->height);
fFontAdvance=float(pCurCharInfo->advance); fFontAdvance=float(pCurCharInfo->advance);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites] // NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth) if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth)
{ {
if (m_isMultiLine) if (m_isMultiLine)
@ -636,7 +636,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
akVertex[2].y=fFontSy-feather; akVertex[2].y=fFontSy-feather;
akVertex[3].y=fFontEy+feather; akVertex[3].y=fFontEy+feather;
// 왼 // 왼
akVertex[0].x=fFontSx-fFontHalfWeight-feather; akVertex[0].x=fFontSx-fFontHalfWeight-feather;
akVertex[1].x=fFontSx-fFontHalfWeight-feather; akVertex[1].x=fFontSx-fFontHalfWeight-feather;
akVertex[2].x=fFontEx-fFontHalfWeight+feather; akVertex[2].x=fFontEx-fFontHalfWeight+feather;
@ -646,7 +646,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
// 오른 // 오른
akVertex[0].x=fFontSx+fFontHalfWeight-feather; akVertex[0].x=fFontSx+fFontHalfWeight-feather;
akVertex[1].x=fFontSx+fFontHalfWeight-feather; akVertex[1].x=fFontSx+fFontHalfWeight-feather;
akVertex[2].x=fFontEx+fFontHalfWeight+feather; akVertex[2].x=fFontEx+fFontHalfWeight+feather;
@ -660,7 +660,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
akVertex[2].x=fFontEx+feather; akVertex[2].x=fFontEx+feather;
akVertex[3].x=fFontEx+feather; akVertex[3].x=fFontEx+feather;
// 위 // 위
akVertex[0].y=fFontSy-fFontHalfWeight-feather; akVertex[0].y=fFontSy-fFontHalfWeight-feather;
akVertex[1].y=fFontEy-fFontHalfWeight+feather; akVertex[1].y=fFontEy-fFontHalfWeight+feather;
akVertex[2].y=fFontSy-fFontHalfWeight-feather; akVertex[2].y=fFontSy-fFontHalfWeight-feather;
@ -670,7 +670,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4)) if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
// 아래 // 아래
akVertex[0].y=fFontSy+fFontHalfWeight-feather; akVertex[0].y=fFontSy+fFontHalfWeight-feather;
akVertex[1].y=fFontEy+fFontHalfWeight+feather; akVertex[1].y=fFontEy+fFontHalfWeight+feather;
akVertex[2].y=fFontSy+fFontHalfWeight-feather; akVertex[2].y=fFontSy+fFontHalfWeight-feather;
@ -684,7 +684,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
} }
} }
// 메인 폰트 // 메인 폰트
fCurX=fStanX; fCurX=fStanX;
fCurY=fStanY; fCurY=fStanY;
fFontMaxHeight=0.0f; fFontMaxHeight=0.0f;
@ -698,7 +698,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
fFontMaxHeight=max(fFontHeight, pCurCharInfo->height); fFontMaxHeight=max(fFontHeight, pCurCharInfo->height);
fFontAdvance=float(pCurCharInfo->advance); fFontAdvance=float(pCurCharInfo->advance);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites] // NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth) if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth)
{ {
if (m_isMultiLine) if (m_isMultiLine)
@ -811,9 +811,9 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
sy -= float(m_textHeight) / 2.0f; sy -= float(m_textHeight) / 2.0f;
break; break;
} }
// 최적화 사항 // 최적화 사항
// 같은텍스쳐를 사용한다면... STRIP을 구성하고, 텍스쳐가 변경되거나 끝나면 DrawPrimitive를 호출해 // 같은텍스쳐를 사용한다면... STRIP을 구성하고, 텍스쳐가 변경되거나 끝나면 DrawPrimitive를 호출해
// 최대한 숫자를 줄이도록하자! // 최대한 숫자를 줄이도록하자!
TPDTVertex vertices[4]; TPDTVertex vertices[4];
vertices[0].diffuse = diffuse; vertices[0].diffuse = diffuse;
@ -865,13 +865,13 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
STATEMANAGER.SetRenderState(D3DRS_FOGENABLE, dwFogEnable); STATEMANAGER.SetRenderState(D3DRS_FOGENABLE, dwFogEnable);
STATEMANAGER.SetRenderState(D3DRS_LIGHTING, dwLighting); STATEMANAGER.SetRenderState(D3DRS_LIGHTING, dwLighting);
//금강경 링크 띄워주는 부분. //금강경 링크 띄워주는 부분.
if (m_hyperlinkVector.size() != 0) if (m_hyperlinkVector.size() != 0)
{ {
int lx = gs_mx - m_v3Position.x; int lx = gs_mx - m_v3Position.x;
int ly = gs_my - m_v3Position.y; int ly = gs_my - m_v3Position.y;
//아랍은 좌표 부호를 바꿔준다. //아랍은 좌표 부호를 바꿔준다.
if (GetDefaultCodePage() == CP_ARABIC) { if (GetDefaultCodePage() == CP_ARABIC) {
lx = -lx; lx = -lx;
ly = -ly + m_textHeight; ly = -ly + m_textHeight;
@ -1063,7 +1063,7 @@ WORD CGraphicTextInstance::GetTextLineCount()
float fFontAdvance=float(pCurCharInfo->advance); float fFontAdvance=float(pCurCharInfo->advance);
//float fFontHeight=float(pCurCharInfo->height); //float fFontHeight=float(pCurCharInfo->height);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites] // NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
if (fx+fFontWidth > m_fLimitWidth) if (fx+fFontWidth > m_fLimitWidth)
{ {
fx = 0.0f; fx = 0.0f;
@ -1110,7 +1110,7 @@ void CGraphicTextInstance::__Initialize()
m_vAlign = VERTICAL_ALIGN_TOP; m_vAlign = VERTICAL_ALIGN_TOP;
m_iMax = 0; m_iMax = 0;
m_fLimitWidth = 1600.0f; // NOTE : 해상도의 최대치. 이보다 길게 쓸 일이 있을까? - [levites] m_fLimitWidth = 1600.0f; // NOTE : 해상도의 최대치. 이보다 길게 쓸 일이 있을까? - [levites]
m_isCursor = false; m_isCursor = false;
m_isSecret = false; m_isSecret = false;

View File

@ -3,7 +3,7 @@
bool CStaticVertexBuffer::Create(int vtxCount, DWORD fvf, bool /*isManaged*/) bool CStaticVertexBuffer::Create(int vtxCount, DWORD fvf, bool /*isManaged*/)
{ {
// 무조건 MANAGED 모드 // 무조건 MANAGED 모드
return CGraphicVertexBuffer::Create(vtxCount, fvf, D3DUSAGE_WRITEONLY, D3DPOOL_MANAGED); return CGraphicVertexBuffer::Create(vtxCount, fvf, D3DUSAGE_WRITEONLY, D3DPOOL_MANAGED);
} }

View File

@ -819,7 +819,7 @@ void CIME::SetCurPos(int offset)
} }
else else
{ {
// offset은 보여지는 텍스트의 위치로 온다. 따라서 새로 계산해야함. // offset은 보여지는 텍스트의 위치로 온다. 따라서 새로 계산해야함.
//ms_curpos = min(ms_lastpos, offset); //ms_curpos = min(ms_lastpos, offset);
ms_curpos = min(ms_lastpos, GetTextTagInternalPosFromRenderPos(m_wText, ms_lastpos, offset)); ms_curpos = min(ms_lastpos, GetTextTagInternalPosFromRenderPos(m_wText, ms_lastpos, offset));
} }
@ -1503,8 +1503,8 @@ void CIME::CheckInputLocale()
ms_wszCurrentIndicator[1] = towlower(szLang[1]); ms_wszCurrentIndicator[1] = towlower(szLang[1]);
} }
// 아랍어에서 영어로 변경시 코드 페이지를 바꾸지 않는다 // 아랍어에서 영어로 변경시 코드 페이지를 바꾸지 않는다
// 내용도 지우지 않는다. // 내용도 지우지 않는다.
if(ms_uOutputCodePage != 1256) { if(ms_uOutputCodePage != 1256) {
ms_uOutputCodePage = ms_uInputCodePage; ms_uOutputCodePage = ms_uInputCodePage;
Clear(); Clear();
@ -2147,7 +2147,7 @@ LRESULT CIME::WMComposition(HWND hWnd, UINT /*uiMsg*/, WPARAM /*wParam*/, LPARAM
AttributeProcess(hImc); AttributeProcess(hImc);
if(lParam&GCS_COMPSTR) if(lParam&GCS_COMPSTR)
{ {
if (ms_uOutputCodePage == 950) // 대만 주음 입력 처리 if (ms_uOutputCodePage == 950) // 대만 주음 입력 처리
{ {
if (lParam&GCS_COMPATTR) if (lParam&GCS_COMPATTR)
CompositionProcessBuilding(hImc); CompositionProcessBuilding(hImc);

View File

@ -55,8 +55,6 @@ void CInputKeyboard::ResetKeyboard()
bool CInputKeyboard::InitializeKeyboard(HWND hWnd) bool CInputKeyboard::InitializeKeyboard(HWND hWnd)
{ {
NANOBEGIN
if (ms_lpKeyboard) if (ms_lpKeyboard)
return true; return true;
@ -72,7 +70,7 @@ bool CInputKeyboard::InitializeKeyboard(HWND hWnd)
if (FAILED(hr = ms_lpKeyboard->SetDataFormat(&c_dfDIKeyboard))) if (FAILED(hr = ms_lpKeyboard->SetDataFormat(&c_dfDIKeyboard)))
return false; return false;
// Alt + F4를 위해 비독점 모드로 - [levites] // Alt + F4를 위해 비독점 모드로 - [levites]
// DWORD dwCoopFlags = DISCL_FOREGROUND | DISCL_EXCLUSIVE; // DWORD dwCoopFlags = DISCL_FOREGROUND | DISCL_EXCLUSIVE;
// DWORD dwCoopFlags = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND; // DWORD dwCoopFlags = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND;
DWORD dwCoopFlags = DISCL_FOREGROUND | DISCL_NONEXCLUSIVE; DWORD dwCoopFlags = DISCL_FOREGROUND | DISCL_NONEXCLUSIVE;
@ -82,7 +80,6 @@ bool CInputKeyboard::InitializeKeyboard(HWND hWnd)
ms_lpKeyboard->Acquire(); ms_lpKeyboard->Acquire();
NANOEND
return true; return true;
} }
@ -99,7 +96,7 @@ void CInputKeyboard::UpdateKeyboard()
{ {
hr = ms_lpKeyboard->Acquire(); hr = ms_lpKeyboard->Acquire();
// 현재 어플리케이션이 비활성화 되어 있어 입력을 받을 수 없다. // 현재 어플리케이션이 비활성화 되어 있어 입력을 받을 수 없다.
//if (hr == DIERR_OTHERAPPHASPRIO || hr == DIERR_NOTACQUIRED); //if (hr == DIERR_OTHERAPPHASPRIO || hr == DIERR_NOTACQUIRED);
return; return;
} }

View File

@ -206,7 +206,7 @@ void CLensFlare::DrawBeforeFlare()
STATEMANAGER.SaveRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); STATEMANAGER.SaveRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
STATEMANAGER.SaveRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); STATEMANAGER.SaveRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
/* /*
if (m_fBeforeBright != 0.0f && m_bDrawFlare && m_bDrawBrightScreen && false) // ¿Ø false? if (m_fBeforeBright != 0.0f && m_bDrawFlare && m_bDrawBrightScreen && false) // false?
{ {
glColor4f(1.0f, 1.0f, 1.0f, m_fBeforeBright); glColor4f(1.0f, 1.0f, 1.0f, m_fBeforeBright);
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);

View File

@ -81,7 +81,7 @@ public:
CLensFlare(); CLensFlare();
virtual ~CLensFlare(); virtual ~CLensFlare();
void Compute(const D3DXVECTOR3 & c_rv3LightDirection); // D3DTS_VIEW로 부터 카메라 방향을 얻어오므로, 카메라 설정 뒤에 해야 함. void Compute(const D3DXVECTOR3 & c_rv3LightDirection); // D3DTS_VIEW로 부터 카메라 방향을 얻어오므로, 카메라 설정 뒤에 해야 함.
void DrawBeforeFlare(); void DrawBeforeFlare();
void DrawAfterFlare(); void DrawAfterFlare();

View File

@ -524,7 +524,6 @@ const char * GetRecvHeaderName(BYTE header)
stringList[154] = "HEADER_GC_AUTH_SUCCESS_OPENID"; stringList[154] = "HEADER_GC_AUTH_SUCCESS_OPENID";
stringList[0xfc] = "HEADER_GC_HANDSHAKE_OK"; stringList[0xfc] = "HEADER_GC_HANDSHAKE_OK";
stringList[0xfd] = "HEADER_GC_PHASE"; stringList[0xfd] = "HEADER_GC_PHASE";
stringList[0xfe] = "HEADER_GC_BINDUDP";
stringList[0xff] = "HEADER_GC_HANDSHAKE"; stringList[0xff] = "HEADER_GC_HANDSHAKE";
} }
return stringList[header].c_str(); return stringList[header].c_str();

View File

@ -74,7 +74,7 @@ class CProfiler : public CSingleton<CProfiler>
{ {
CGraphicTextInstance * pGraphicTextInstance = CGraphicTextInstance::New(); CGraphicTextInstance * pGraphicTextInstance = CGraphicTextInstance::New();
CResource * pResource = CResourceManager::Instance().GetResourcePointer("±¼¸²Ã¼.fnt"); CResource * pResource = CResourceManager::Instance().GetResourcePointer("\xB1\xBC\xB8\xB2\xC3\xBC.fnt");
pGraphicTextInstance->Clear(); pGraphicTextInstance->Clear();
pGraphicTextInstance->SetTextPointer(static_cast<CGraphicText*>(pResource)); pGraphicTextInstance->SetTextPointer(static_cast<CGraphicText*>(pResource));
@ -114,7 +114,7 @@ class CProfiler : public CSingleton<CProfiler>
CGraphicTextInstance * pGraphicTextInstance = m_GraphicTextInstancePool.Alloc(); CGraphicTextInstance * pGraphicTextInstance = m_GraphicTextInstancePool.Alloc();
CResource * pResource = CResourceManager::Instance().GetResourcePointer("±¼¸²Ã¼.fnt"); CResource * pResource = CResourceManager::Instance().GetResourcePointer("\xB1\xBC\xB8\xB2\xC3\xBC.fnt");
pGraphicTextInstance->Clear(); pGraphicTextInstance->Clear();
pGraphicTextInstance->SetTextPointer(static_cast<CGraphicText*>(pResource)); pGraphicTextInstance->SetTextPointer(static_cast<CGraphicText*>(pResource));

View File

@ -129,8 +129,8 @@ int CResource::ConvertPathName(const char * c_szPathName, char * pszRetPathName,
void CResource::SetFileName(const char* c_szFileName) void CResource::SetFileName(const char* c_szFileName)
{ {
// 2004. 2. 1. myevan. 쓰레드가 사용되는 상황에서 static 변수는 사용하지 않는것이 좋다. // 2004. 2. 1. myevan. 쓰레드가 사용되는 상황에서 static 변수는 사용하지 않는것이 좋다.
// 2004. 2. 1. myevan. 파일 이름 처리를 std::string 사용 // 2004. 2. 1. myevan. 파일 이름 처리를 std::string 사용
m_stFileName=c_szFileName; m_stFileName=c_szFileName;
} }

View File

@ -10,9 +10,9 @@
int g_iLoadingDelayTime = 20; int g_iLoadingDelayTime = 20;
const long c_Deleting_Wait_Time = 30000; // 삭제 대기 시간 (30초) const long c_Deleting_Wait_Time = 30000; // 삭제 대기 시간 (30초)
const long c_DeletingCountPerFrame = 30; // 프레임당 체크 리소스 갯수 const long c_DeletingCountPerFrame = 30; // 프레임당 체크 리소스 갯수
const long c_Reference_Decrease_Wait_Time = 30000; // 선로딩 리소스의 해제 대기 시간 (30초) const long c_Reference_Decrease_Wait_Time = 30000; // 선로딩 리소스의 해제 대기 시간 (30초)
CFileLoaderThread CResourceManager::ms_loadingThread; CFileLoaderThread CResourceManager::ms_loadingThread;
@ -56,7 +56,7 @@ void CResourceManager::ProcessBackgroundLoading()
ms_loadingThread.Request(stFileName); ms_loadingThread.Request(stFileName);
m_WaitingMap.insert(TResourceRequestMap::value_type(dwFileCRC, stFileName)); m_WaitingMap.insert(TResourceRequestMap::value_type(dwFileCRC, stFileName));
itor = m_RequestMap.erase(itor); itor = m_RequestMap.erase(itor);
//break; // NOTE: 여기서 break 하면 천천히 로딩 된다. //break; // NOTE: 여기서 break 하면 천천히 로딩 된다.
} }
DWORD dwCurrentTime = ELTimer_GetMSec(); DWORD dwCurrentTime = ELTimer_GetMSec();
@ -74,7 +74,7 @@ void CResourceManager::ProcessBackgroundLoading()
pResource->OnLoad(pData.data->size(), pData.data->data()); pResource->OnLoad(pData.data->size(), pData.data->data());
pResource->AddReferenceOnly(); pResource->AddReferenceOnly();
// 여기서 올라간 레퍼런스 카운트를 일정 시간이 지난 뒤에 풀어주기 위하여 // 여기서 올라간 레퍼런스 카운트를 일정 시간이 지난 뒤에 풀어주기 위하여
m_pResRefDecreaseWaitingMap.insert(TResourceRefDecreaseWaitingMap::value_type(dwCurrentTime, pResource)); m_pResRefDecreaseWaitingMap.insert(TResourceRefDecreaseWaitingMap::value_type(dwCurrentTime, pResource));
} }
} }
@ -82,7 +82,7 @@ void CResourceManager::ProcessBackgroundLoading()
m_WaitingMap.erase(GetCRC32(pData.fileName.c_str(), pData.fileName.size())); m_WaitingMap.erase(GetCRC32(pData.fileName.c_str(), pData.fileName.size()));
} }
// DO : 일정 시간이 지나고 난뒤 미리 로딩해 두었던 리소스의 레퍼런스 카운트를 감소 시킨다 - [levites] // DO : 일정 시간이 지나고 난뒤 미리 로딩해 두었던 리소스의 레퍼런스 카운트를 감소 시킨다 - [levites]
long lCurrentTime = ELTimer_GetMSec(); long lCurrentTime = ELTimer_GetMSec();
TResourceRefDecreaseWaitingMap::iterator itorRef = m_pResRefDecreaseWaitingMap.begin(); TResourceRefDecreaseWaitingMap::iterator itorRef = m_pResRefDecreaseWaitingMap.begin();
@ -230,7 +230,7 @@ CResource * CResourceManager::GetTypeResourcePointer(const char * c_szFileName,
DWORD dwFileCRC = __GetFileCRC(c_szFileName, &c_pszFile); DWORD dwFileCRC = __GetFileCRC(c_szFileName, &c_pszFile);
CResource * pResource = FindResourcePointer(dwFileCRC); CResource * pResource = FindResourcePointer(dwFileCRC);
if (pResource) // 이미 리소스가 있으면 리턴 한다. if (pResource) // 이미 리소스가 있으면 리턴 한다.
return pResource; return pResource;
CResource * (*newFunc) (const char *) = NULL; CResource * (*newFunc) (const char *) = NULL;
@ -280,7 +280,7 @@ CResource * CResourceManager::GetResourcePointer(const char * c_szFileName)
DWORD dwFileCRC = __GetFileCRC(c_szFileName, &c_pszFile); DWORD dwFileCRC = __GetFileCRC(c_szFileName, &c_pszFile);
CResource * pResource = FindResourcePointer(dwFileCRC); CResource * pResource = FindResourcePointer(dwFileCRC);
if (pResource) // 이미 리소스가 있으면 리턴 한다. if (pResource) // 이미 리소스가 있으면 리턴 한다.
return pResource; return pResource;
const char * pcFileExt = strrchr(c_pszFile, '.'); const char * pcFileExt = strrchr(c_pszFile, '.');

View File

@ -27,7 +27,7 @@ class CResourceManager : public CSingleton<CResourceManager>
CResource * GetResourcePointer(const char * c_szFileName); CResource * GetResourcePointer(const char * c_szFileName);
CResource * GetTypeResourcePointer(const char * c_szFileName, int iType=-1); CResource * GetTypeResourcePointer(const char * c_szFileName, int iType=-1);
// 추가 // 추가
bool isResourcePointerData(DWORD dwFileCRC); bool isResourcePointerData(DWORD dwFileCRC);
void RegisterResourceNewFunctionPointer(const char* c_szFileExt, CResource* (*pResNewFunc)(const char* c_szFileName)); void RegisterResourceNewFunctionPointer(const char* c_szFileExt, CResource* (*pResNewFunc)(const char* c_szFileName));
@ -64,7 +64,7 @@ class CResourceManager : public CSingleton<CResourceManager>
TResourceNewFunctionPointerMap m_pResNewFuncMap; TResourceNewFunctionPointerMap m_pResNewFuncMap;
TResourceNewFunctionByTypePointerMap m_pResNewFuncByTypeMap; TResourceNewFunctionByTypePointerMap m_pResNewFuncByTypeMap;
TResourceDeletingMap m_ResourceDeletingMap; TResourceDeletingMap m_ResourceDeletingMap;
TResourceRequestMap m_RequestMap; // 쓰레드로 로딩 요청한 리스트 TResourceRequestMap m_RequestMap; // 쓰레드로 로딩 요청한 리스트
TResourceRequestMap m_WaitingMap; TResourceRequestMap m_WaitingMap;
TResourceRefDecreaseWaitingMap m_pResRefDecreaseWaitingMap; TResourceRefDecreaseWaitingMap m_pResRefDecreaseWaitingMap;

View File

@ -272,7 +272,7 @@ void CSkyBox::SetCloudTexture(const char * c_szFileName)
CGraphicImageInstance * pGraphicImageInstance = GenerateTexture(c_szFileName); CGraphicImageInstance * pGraphicImageInstance = GenerateTexture(c_szFileName);
m_GraphicImageInstanceMap.insert(TGraphicImageInstanceMap::value_type(m_FaceCloud.m_strfacename, pGraphicImageInstance)); m_GraphicImageInstanceMap.insert(TGraphicImageInstanceMap::value_type(m_FaceCloud.m_strfacename, pGraphicImageInstance));
// 이거 안쓰는거 같은데요? [cronan] // 이거 안쓰는거 같은데요? [cronan]
// CGraphicImage * pImage = (CGraphicImage *) CResourceManager::Instance().GetResourcePointer("D:\\Ymir Work\\special/cloudalpha.tga"); // CGraphicImage * pImage = (CGraphicImage *) CResourceManager::Instance().GetResourcePointer("D:\\Ymir Work\\special/cloudalpha.tga");
// m_CloudAlphaImageInstance.SetImagePointer(pImage); // m_CloudAlphaImageInstance.SetImagePointer(pImage);
} }
@ -803,7 +803,7 @@ void CSkyBox::Update()
void CSkyBox::Render() void CSkyBox::Render()
{ {
// 2004.01.25 myevan 처리를 렌더링 후반으로 옮기고, DepthTest 처리 // 2004.01.25 myevan 처리를 렌더링 후반으로 옮기고, DepthTest 처리
STATEMANAGER.SaveRenderState(D3DRS_ZENABLE, TRUE); STATEMANAGER.SaveRenderState(D3DRS_ZENABLE, TRUE);
STATEMANAGER.SaveRenderState(D3DRS_ZWRITEENABLE, FALSE); STATEMANAGER.SaveRenderState(D3DRS_ZWRITEENABLE, FALSE);
STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, FALSE); STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, FALSE);
@ -872,7 +872,7 @@ void CSkyBox::RenderCloud()
if (!pCloudGraphicImageInstance) if (!pCloudGraphicImageInstance)
return; return;
// 2004.01.25 myevan 처리를 렌더링 후반으로 옮기고, DepthTest 처리 // 2004.01.25 myevan 처리를 렌더링 후반으로 옮기고, DepthTest 처리
STATEMANAGER.SaveRenderState(D3DRS_ZENABLE, TRUE); STATEMANAGER.SaveRenderState(D3DRS_ZENABLE, TRUE);
STATEMANAGER.SaveRenderState(D3DRS_ZWRITEENABLE, FALSE); STATEMANAGER.SaveRenderState(D3DRS_ZWRITEENABLE, FALSE);
STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, FALSE); STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, FALSE);

View File

@ -63,7 +63,7 @@ public:
private: private:
TPDTVertex m_Vertex[4]; TPDTVertex m_Vertex[4];
TIndex m_Indices[4]; // 인덱스 버퍼... TIndex m_Indices[4]; // 인덱스 버퍼...
CColorTransitionHelper m_Helper[4]; CColorTransitionHelper m_Helper[4];
}; };
@ -99,7 +99,7 @@ protected:
protected: protected:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// 타입 정의 // 타입 정의
typedef std::vector<CSkyObjectQuad> TSkyObjectQuadVector; typedef std::vector<CSkyObjectQuad> TSkyObjectQuadVector;
typedef TSkyObjectQuadVector::iterator TSkyObjectQuadIterator; typedef TSkyObjectQuadVector::iterator TSkyObjectQuadIterator;
@ -118,8 +118,8 @@ protected:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// 구름... // 구름...
TSkyObjectFace m_FaceCloud; // 구름 일단 한장... TSkyObjectFace m_FaceCloud; // 구름 일단 한장...
D3DXMATRIX m_matWorldCloud, m_matTranslationCloud, m_matTextureCloud; D3DXMATRIX m_matWorldCloud, m_matTranslationCloud, m_matTextureCloud;
D3DXVECTOR3 m_v3PositionCloud; D3DXVECTOR3 m_v3PositionCloud;
float m_fCloudScaleX, m_fCloudScaleY, m_fCloudHeight; float m_fCloudScaleX, m_fCloudScaleY, m_fCloudHeight;
@ -129,7 +129,7 @@ protected:
DWORD m_dwlastTime; DWORD m_dwlastTime;
// 스카이 박스 이미지... // 스카이 박스 이미지...
TGraphicImageInstanceMap m_GraphicImageInstanceMap; TGraphicImageInstanceMap m_GraphicImageInstanceMap;
// Transform... // Transform...
@ -137,7 +137,7 @@ protected:
D3DXVECTOR3 m_v3Position; D3DXVECTOR3 m_v3Position;
float m_fScaleX, m_fScaleY, m_fScaleZ; float m_fScaleX, m_fScaleY, m_fScaleZ;
// 랜더링 관련... 임시 변수.. // 랜더링 관련... 임시 변수..
unsigned char m_ucRenderMode; unsigned char m_ucRenderMode;
std::string m_strCurTime; std::string m_strCurTime;

View File

@ -8,7 +8,7 @@
#define _WIN32_DCOM #define _WIN32_DCOM
#pragma warning(disable:4710) // not inlined #pragma warning(disable:4710) // not inlined
#pragma warning(disable:4786) // character 255 넘어가는거 끄기 #pragma warning(disable:4786) // character 255 넘어가는거 끄기
#pragma warning(disable:4244) // type conversion possible lose of data #pragma warning(disable:4244) // type conversion possible lose of data
#pragma warning(disable:4018) #pragma warning(disable:4018)

View File

@ -19,7 +19,7 @@ int GetTextTag(const wchar_t * src, int maxLen, int & tagLen, std::wstring & ext
extraInfo.assign(++cur, 8); extraInfo.assign(++cur, 8);
return TEXT_TAG_COLOR; return TEXT_TAG_COLOR;
} }
else if (*cur == L'|') // ||는 |로 표시한다. else if (*cur == L'|') // ||는 |로 표시한다.
{ {
tagLen = 2; tagLen = 2;
return TEXT_TAG_TAG; return TEXT_TAG_TAG;
@ -29,7 +29,7 @@ int GetTextTag(const wchar_t * src, int maxLen, int & tagLen, std::wstring & ext
tagLen = 2; tagLen = 2;
return TEXT_TAG_RESTORE_COLOR; return TEXT_TAG_RESTORE_COLOR;
} }
else if (*cur == L'H') // hyperlink |Hitem:10000:0:0:0:0|h[이름]|h else if (*cur == L'H') // hyperlink |Hitem:10000:0:0:0:0|h[이름]|h
{ {
tagLen = 2; tagLen = 2;
return TEXT_TAG_HYPERLINK_START; return TEXT_TAG_HYPERLINK_START;
@ -154,20 +154,20 @@ int FindColorTagStartPosition(const wchar_t * src, int src_len)
const wchar_t * cur = src; const wchar_t * cur = src;
// |r의 경우 // |r의 경우
if (*cur == L'r' && *(cur - 1) == L'|') if (*cur == L'r' && *(cur - 1) == L'|')
{ {
int len = src_len; int len = src_len;
// ||r은 무시 // ||r은 무시
if (len >= 2 && *(cur - 2) == L'|') if (len >= 2 && *(cur - 2) == L'|')
return 1; return 1;
cur -= 2; cur -= 2;
len -= 2; len -= 2;
// |c까지 찾아서 |위치까지 리턴한다. // |c까지 찾아서 |위치까지 리턴한다.
while (len > 1) // 최소 2자를 검사해야 된다. while (len > 1) // 최소 2자를 검사해야 된다.
{ {
if (*cur == L'c' && *(cur - 1) == L'|') if (*cur == L'c' && *(cur - 1) == L'|')
return (src - cur) + 1; return (src - cur) + 1;
@ -175,9 +175,9 @@ int FindColorTagStartPosition(const wchar_t * src, int src_len)
--cur; --cur;
--len; --len;
} }
return (src_len); // 못찾으면 전부;; return (src_len); // 못찾으면 전부;;
} }
// ||의 경우 // ||의 경우
else if (*cur == L'|' && *(cur - 1) == L'|') else if (*cur == L'|' && *(cur - 1) == L'|')
return 1; return 1;

View File

@ -10,8 +10,8 @@ class CThread
protected: protected:
static UINT CALLBACK EntryPoint(void * pThis); static UINT CALLBACK EntryPoint(void * pThis);
virtual UINT Setup() = 0; // Execute이 불려지기 전에 불려진다. virtual UINT Setup() = 0; // Execute이 불려지기 전에 불려진다.
virtual UINT Execute(void * arg) = 0; // 실제 쓰레드가 하는 일이 들어가는 곳 virtual UINT Execute(void * arg) = 0; // 실제 쓰레드가 하는 일이 들어가는 곳
UINT Run(void * arg); UINT Run(void * arg);

View File

@ -210,13 +210,13 @@ const char* GetFontFaceFromCodePage9x(WORD codePage)
switch( codePage ) switch( codePage )
{ {
case CP_932: case CP_932:
return "굃굍 굊긕긘긞긏"; return "MS PGothic";
case CP_949: case CP_949:
return "굴림체"; return "GulimChe";
case CP_936: case CP_936:
return "芥竟"; return "SimSun";
case CP_950: case CP_950:
return "꾄ⁿ톱"; return "MingLiU";
case CP_874: case CP_874:
return "Tahoma"; return "Tahoma";
case CP_1252: case CP_1252:
@ -328,7 +328,7 @@ void base64_decode(const char * str,char * resultStr)
{ {
i=0; i=0;
strcpy(szDest, ""); strcpy(szDest, "");
while(nCount<length && i<4) // 4개의 바이트를 얻는다. while(nCount<length && i<4) // 4개의 바이트를 얻는다.
{ {
r = str[nCount++]; r = str[nCount++];
result = __base64_get(r); result = __base64_get(r);
@ -336,13 +336,13 @@ void base64_decode(const char * str,char * resultStr)
{ {
if(result!=-1) if(result!=-1)
szDest[i++] = result; szDest[i++] = result;
else szDest[i++] = '@'; // It's end (64번은 디코딩시 사용되지 않기 때문) else szDest[i++] = '@'; // It's end (64번은 디코딩시 사용되지 않기 때문)
} }
} }
if(i==4) // 4개의 소스를 모두 얻어냈다. 디코드 시작 if(i==4) // 4개의 소스를 모두 얻어냈다. 디코드 시작
{ {
if( nCount+3 >= length ) // 데이터의 끝에 도달했다. if( nCount+3 >= length ) // 데이터의 끝에 도달했다.
{ {
if( szDest[1] == '@' ) if( szDest[1] == '@' )
{ {

View File

@ -220,11 +220,11 @@ bool Group::GetArg(const char *c_arg_base, int arg_len, TArgList & argList)
{ {
isValue = true; isValue = true;
} }
// 값이 아니고, 이름이 시작되지 않았을 경우 빈칸은 건너 뛴다. // 값이 아니고, 이름이 시작되지 않았을 경우 빈칸은 건너 뛴다.
else if (!isValue && iNameLen == 0 && isspace((unsigned char) c)) else if (!isValue && iNameLen == 0 && isspace((unsigned char) c))
{ {
} }
// 엔터는 건너 뛴다 // 엔터는 건너 뛴다
else if (c == '\r' || c == '\n') else if (c == '\r' || c == '\n')
{ {
} }
@ -350,12 +350,12 @@ bool Group::Create(const std::string & stSource)
memcpy(box_data, data_begin, data_len); memcpy(box_data, data_begin, data_len);
box_data[data_len] = '\0'; box_data[data_len] = '\0';
data_len = LocaleString_RightTrim(box_data, data_len); // 오른쪽 빈칸 자르기 data_len = LocaleString_RightTrim(box_data, data_len); // 오른쪽 빈칸 자르기
} }
{ {
const char* space = LocaleString_FindChar(box_data, data_len, ' '); const char* space = LocaleString_FindChar(box_data, data_len, ' ');
if (space) // 인자가 있음 if (space) // 인자가 있음
{ {
int name_len = space - box_data; int name_len = space - box_data;
cmd.name.assign(box_data, name_len); cmd.name.assign(box_data, name_len);
@ -371,7 +371,7 @@ bool Group::Create(const std::string & stSource)
return false; return false;
} }
} }
else // 인자가 없으므로 모든 스트링이 명령어다. else // 인자가 없으므로 모든 스트링이 명령어다.
{ {
cmd.name.assign(box_data); cmd.name.assign(box_data);
cmd.argList.clear(); cmd.argList.clear();

View File

@ -55,30 +55,30 @@ namespace script
~Group(); ~Group();
public: public:
/** 스트링으로 부터 스크립트 그룹을 만든다. /** 스트링으로 부터 스크립트 그룹을 만든다.
* *
* GetError . * GetError .
* *
* @param stSource . * @param stSource .
* @return true, false * @return true, false
*/ */
bool Create(const std::string & stSource); bool Create(const std::string & stSource);
/** 명령어를 받는 메소드 /** 명령어를 받는 메소드
* *
* @param cmd . * @param cmd .
* @return true, false * @return true, false
*/ */
bool GetCmd(TCmd & cmd); bool GetCmd(TCmd & cmd);
/* /*
. .
*/ */
bool ReadCmd(TCmd & cmd); bool ReadCmd(TCmd & cmd);
/** 에러를 출력 받는 메소드 /** 에러를 출력 받는 메소드
* *
* @return stError . * @return stError .
*/ */
std::string & GetError(); std::string & GetError();

View File

@ -258,7 +258,7 @@ size_t Arabic_MakeShape(wchar_t* src, size_t srcLen, wchar_t* dst, size_t dstLen
if (Arabic_IsInMap(cur)) if (Arabic_IsInMap(cur))
{ {
// 이전 글자 얻어내기 // 이전 글자 얻어내기
wchar_t prev = 0; wchar_t prev = 0;
{ {
size_t prevIndex = srcIndex; size_t prevIndex = srcIndex;
@ -282,7 +282,7 @@ size_t Arabic_MakeShape(wchar_t* src, size_t srcLen, wchar_t* dst, size_t dstLen
} }
} }
// 다음 글자 얻어내기 // 다음 글자 얻어내기
wchar_t next = 0; wchar_t next = 0;
{ {
size_t nextIndex = srcIndex; size_t nextIndex = srcIndex;

View File

@ -1,4 +1,4 @@
#include "stdafx.h" #include "stdafx.h"
#include "StringCodec_Vietnamese.h" #include "StringCodec_Vietnamese.h"
#pragma warning(disable: 4310) // char 짤림 경고 무시 #pragma warning(disable: 4310) // char 짤림 경고 무시
@ -551,4 +551,4 @@ int EL_String_Encode_Vietnamese(const wchar_t* wide, int wideLen, char* multi, i
} }
return dest; return dest;
} }

View File

@ -16,7 +16,7 @@
#define PATH_ABSOLUTE_YMIRWORK1 "d:/ymir work/" #define PATH_ABSOLUTE_YMIRWORK1 "d:/ymir work/"
#define PATH_ABSOLUTE_YMIRWORK2 "d:\\ymir work\\" #define PATH_ABSOLUTE_YMIRWORK2 "d:\\ymir work\\"
// StringPath std::string ¹öÀü // StringPath std::string 버전
std::string CEterPackManager::ConvertFileName(std::string fileName) std::string CEterPackManager::ConvertFileName(std::string fileName)
{ {
std::string convertedFileName = fileName; std::string convertedFileName = fileName;
@ -183,10 +183,22 @@ bool CEterPackManager::isExist(const char * c_szFileName)
return isExistInPack(c_szFileName); return isExistInPack(c_szFileName);
} }
bool CEterPackManager::PackExists(const std::string& name, const std::string& container)
bool CEterPackManager::RegisterPack(const char * c_szName, const char * c_szDirectory, const BYTE* c_pbIV)
{ {
auto it = m_PackMap.find(c_szName); if (container == "FOLDER") {
return _access(name.c_str(), 0) == 0;
}
else if (container == "ZIP") {
std::string zipName = name + ".zip";
return _access(zipName.c_str(), 0) == 0;
}
throw std::runtime_error("Unexpected container type: " + container + "!");
}
bool CEterPackManager::RegisterPack(const std::string& name, const std::string& container)
{
auto it = m_PackMap.find(name);
if (it != m_PackMap.end()) if (it != m_PackMap.end())
return true; return true;
@ -196,24 +208,28 @@ bool CEterPackManager::RegisterPack(const char * c_szName, const char * c_szDire
std::shared_ptr<FileProvider> pack; std::shared_ptr<FileProvider> pack;
// TODO: allow configurable containers // Determine requested container type
if (container == "FOLDER")
//pack = std::make_shared<Folder>(c_szName); pack = std::make_shared<Folder>(name);
pack = std::make_shared<ZIP>(std::string(c_szName) + ".zip"); else if (container == "ZIP")
pack = std::make_shared<ZIP>(name + ".zip");
else
throw std::runtime_error("Unexpected container type: " + container + "!");
// Load container data
auto packFiles = pack->listFiles(); auto packFiles = pack->listFiles();
for (auto const& fileName : packFiles) for (auto const& fileName : packFiles)
m_FileMap.insert({ fileName, pack }); m_FileMap.insert({ fileName, pack });
m_PackMap.insert({ c_szName, pack }); m_PackMap.insert({ name, pack });
return true; return true;
} }
catch (std::exception& e) catch (std::exception& e)
{ {
#ifdef _DEBUG #ifdef _DEBUG
Tracef("Unable to load file provider '%s': %s\n", c_szName, e.what()); Tracef("Unable to load file provider '%s': %s\n", name.c_str(), e.what());
#endif #endif
return false; return false;

View File

@ -17,8 +17,8 @@ class CEterPackManager : public CSingleton<CEterPackManager>
}; };
typedef std::list<std::shared_ptr<FileProvider>> TEterPackList; typedef std::list<std::shared_ptr<FileProvider>> TEterPackList;
typedef std::unordered_map<std::string, std::shared_ptr<FileProvider>, stringhash> TEterPackMap; typedef std::unordered_map<std::string, std::shared_ptr<FileProvider>> TEterPackMap;
typedef std::unordered_map<std::string, std::shared_ptr<FileProvider>, stringhash> TFileMap; typedef std::unordered_map<std::string, std::shared_ptr<FileProvider>> TFileMap;
typedef std::shared_ptr<std::vector<char>> TPackDataPtr; typedef std::shared_ptr<std::vector<char>> TPackDataPtr;
public: public:
@ -34,7 +34,8 @@ class CEterPackManager : public CSingleton<CEterPackManager>
bool isExist(const char * c_szFileName); bool isExist(const char * c_szFileName);
bool isExistInPack(const char * c_szFileName); bool isExistInPack(const char * c_szFileName);
bool RegisterPack(const char * c_szName, const char * c_szDirectory, const BYTE* c_pbIV = NULL); bool PackExists(const std::string& name, const std::string& container);
bool RegisterPack(const std::string& name, const std::string& container);
std::string ConvertFileName(std::string fileName); std::string ConvertFileName(std::string fileName);
const TFileMap& GetFileMap(); const TFileMap& GetFileMap();

View File

@ -25,9 +25,9 @@ void CPythonGraphic::SetInterfaceRenderState()
STATEMANAGER.SetTransform(D3DTS_VIEW, &ms_matIdentity); STATEMANAGER.SetTransform(D3DTS_VIEW, &ms_matIdentity);
STATEMANAGER.SetTransform(D3DTS_WORLD, &ms_matIdentity); STATEMANAGER.SetTransform(D3DTS_WORLD, &ms_matIdentity);
STATEMANAGER.SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_NONE); STATEMANAGER.SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC);
STATEMANAGER.SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_NONE); STATEMANAGER.SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_ANISOTROPIC);
STATEMANAGER.SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); STATEMANAGER.SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
STATEMANAGER.SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); STATEMANAGER.SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
STATEMANAGER.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); STATEMANAGER.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);

View File

@ -287,7 +287,7 @@ PyObject* grpGetSplitingTextLineCount(PyObject* poSelf, PyObject* poArgs)
{ {
i += 1; i += 1;
// 자동 줄 바꿈되고 바로 | 가 있을 경우 // 자동 줄 바꿈되고 바로 | 가 있을 경우
if (iPosition>0) if (iPosition>0)
++iLineCount; ++iLineCount;
@ -337,15 +337,15 @@ PyObject* grpGetSplitingTextLine(PyObject* poSelf, PyObject* poArgs)
int iPosition = 0; int iPosition = 0;
int iLineCount = 0; int iLineCount = 0;
// 1차 : 조금 더 깔끔하게 안될까 -_-a // 1차 : 조금 더 깔끔하게 안될까 -_-a
// 2차 : 오.. 좀 나아졌다 +_+ // 2차 : 오.. 좀 나아졌다 +_+
for (DWORD i = 0; i < strlen(szText);) for (DWORD i = 0; i < strlen(szText);)
{ {
if ('|' == szText[i]) if ('|' == szText[i])
{ {
i += 1; i += 1;
// 자동 줄 바꿈되고 바로 | 가 있을 경우 // 자동 줄 바꿈되고 바로 | 가 있을 경우
if (iPosition>0) if (iPosition>0)
++iLineCount; ++iLineCount;
iPosition = 0; iPosition = 0;

View File

@ -18,10 +18,10 @@ void CGridSlotWindow::OnRenderPickingSlot()
DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber(); DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();
DWORD dwItemIndex = UI::CWindowManager::Instance().GetAttachingIndex(); DWORD dwItemIndex = UI::CWindowManager::Instance().GetAttachingIndex();
// UseMode 이고.. // UseMode 이고..
if (m_isUseMode) if (m_isUseMode)
{ {
// Pick 된 아이템이 있으면.. // Pick 된 아이템이 있으면..
TSlot * pSlot = *SlotList.begin(); TSlot * pSlot = *SlotList.begin();
TSlot * pCenterSlot; TSlot * pCenterSlot;
if (GetSlotPointer(pSlot->dwCenterSlotNumber, &pCenterSlot)) if (GetSlotPointer(pSlot->dwCenterSlotNumber, &pCenterSlot))
@ -40,7 +40,7 @@ void CGridSlotWindow::OnRenderPickingSlot()
} }
} }
// 아니면 그냥 옮기기 // 아니면 그냥 옮기기
if (CheckMoving(dwSlotNumber, dwItemIndex, SlotList)) if (CheckMoving(dwSlotNumber, dwItemIndex, SlotList))
CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.5f); CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.5f);
else else
@ -85,8 +85,8 @@ BOOL CGridSlotWindow::GetPickedSlotPointer(TSlot ** ppSlot)
{ {
TSlot * pSlot = *itor; TSlot * pSlot = *itor;
// NOTE : 한 슬롯 이상 사이즈의 아이템의 경우 가장 왼쪽 위의 슬롯 포인터를 리턴한다. // NOTE : 한 슬롯 이상 사이즈의 아이템의 경우 가장 왼쪽 위의 슬롯 포인터를 리턴한다.
// 명시적이지 못한 코드.. 더 좋은 방법은 없는가? - [levites] // 명시적이지 못한 코드.. 더 좋은 방법은 없는가? - [levites]
if (!pMinSlot) if (!pMinSlot)
{ {
pMinSlot = pSlot; pMinSlot = pSlot;
@ -119,7 +119,7 @@ BOOL CGridSlotWindow::GetPickedSlotPointer(TSlot ** ppSlot)
*ppSlot = pCenterSlot; *ppSlot = pCenterSlot;
// 현재 아이템을 들고 있는 중이고.. // 현재 아이템을 들고 있는 중이고..
if (UI::CWindowManager::Instance().IsAttaching()) if (UI::CWindowManager::Instance().IsAttaching())
{ {
DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber(); DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();
@ -159,7 +159,7 @@ BOOL CGridSlotWindow::GetPickedSlotList(int iWidth, int iHeight, std::list<TSlot
int ixStart = int(ix) - int(ixHalfStep - (ixHalfStep % 2)); int ixStart = int(ix) - int(ixHalfStep - (ixHalfStep % 2));
int ixEnd = int(ix) + int(ixHalfStep); int ixEnd = int(ix) + int(ixHalfStep);
// FIXME : 제대로 된 계산 공식을 찾자 - [levites] // FIXME : 제대로 된 계산 공식을 찾자 - [levites]
int iyStart = 0, iyEnd = 0; int iyStart = 0, iyEnd = 0;
if (1 == iHeight) if (1 == iHeight)
@ -214,7 +214,7 @@ BOOL CGridSlotWindow::GetPickedSlotList(int iWidth, int iHeight, std::list<TSlot
} }
} }
// Refine Scroll 등을 위한 예외 처리 // Refine Scroll 등을 위한 예외 처리
if (m_isUseMode && 1 == pSlotPointerList->size()) if (m_isUseMode && 1 == pSlotPointerList->size())
{ {
TSlot * pMainSlot = *pSlotPointerList->begin(); TSlot * pMainSlot = *pSlotPointerList->begin();
@ -349,11 +349,11 @@ BOOL CGridSlotWindow::CheckMoving(DWORD dwSlotNumber, DWORD dwItemIndex, const s
{ {
TSlot * pSlot = *itor; TSlot * pSlot = *itor;
if (dwSlotNumber != pSlot->dwCenterSlotNumber) // 들었던 자리가 아닐 경우에 if (dwSlotNumber != pSlot->dwCenterSlotNumber) // 들었던 자리가 아닐 경우에
{ {
if (0 != pSlot->dwItemIndex || pSlot->dwCenterSlotNumber != pSlot->dwSlotNumber) // 아이템이 있고 if (0 != pSlot->dwItemIndex || pSlot->dwCenterSlotNumber != pSlot->dwSlotNumber) // 아이템이 있고
{ {
if (dwItemIndex != pSlot->dwItemIndex) // 다른 아이템이면 못 옮김 if (dwItemIndex != pSlot->dwItemIndex) // 다른 아이템이면 못 옮김
return false; return false;
} }
} }

View File

@ -252,7 +252,7 @@ void CSlotWindow::SetCoverButton(DWORD dwIndex, const char * c_szUpImageName, co
rpCoverButton->Enable(); rpCoverButton->Enable();
rpCoverButton->Show(); rpCoverButton->Show();
// NOTE : Cover 버튼이 Plus 버튼을 가려버려서 임시 코드를.. // NOTE : Cover 버튼이 Plus 버튼을 가려버려서 임시 코드를..
if (pSlot->pSlotButton) if (pSlot->pSlotButton)
{ {
SetTop(pSlot->pSlotButton); SetTop(pSlot->pSlotButton);
@ -585,7 +585,7 @@ void CSlotWindow::RefreshSlot()
{ {
OnRefreshSlot(); OnRefreshSlot();
// NOTE : Refresh 될때 ToolTip 도 갱신 합니다 - [levites] // NOTE : Refresh 될때 ToolTip 도 갱신 합니다 - [levites]
if (IsRendering()) if (IsRendering())
{ {
TSlot * pSlot; TSlot * pSlot;
@ -862,8 +862,8 @@ void CSlotWindow::OnMouseOverOut()
void CSlotWindow::OnMouseOver() void CSlotWindow::OnMouseOver()
{ {
// FIXME : 윈도우를 드래깅 하는 도중에 SetTop이 되어버리면 Capture가 풀어져 버린다. 그것의 방지 코드. // FIXME : 윈도우를 드래깅 하는 도중에 SetTop이 되어버리면 Capture가 풀어져 버린다. 그것의 방지 코드.
// 좀 더 근본적인 해결책을 찾아야 할 듯 - [levites] // 좀 더 근본적인 해결책을 찾아야 할 듯 - [levites]
// if (UI::CWindowManager::Instance().IsCapture()) // if (UI::CWindowManager::Instance().IsCapture())
// if (!UI::CWindowManager::Instance().IsAttaching()) // if (!UI::CWindowManager::Instance().IsAttaching())
// return; // return;
@ -991,7 +991,7 @@ void CSlotWindow::OnRender()
TSlotListIterator itor; TSlotListIterator itor;
// //
// 모든 슬롯 상자 그리기 // 모든 슬롯 상자 그리기
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifdef __RENDER_SLOT_AREA__ #ifdef __RENDER_SLOT_AREA__
CPythonGraphic::Instance().SetDiffuseColor(0.5f, 0.5f, 0.5f); CPythonGraphic::Instance().SetDiffuseColor(0.5f, 0.5f, 0.5f);
@ -1056,7 +1056,7 @@ void CSlotWindow::OnRender()
if (fcurTime - rSlot.fStartCoolTime >= rSlot.fCoolTime) if (fcurTime - rSlot.fStartCoolTime >= rSlot.fCoolTime)
{ {
// 쿨타임이 끝난지 1초 이내라면.. // 쿨타임이 끝난지 1초 이내라면..
if ((fcurTime - rSlot.fStartCoolTime) - rSlot.fCoolTime < 1.0f) if ((fcurTime - rSlot.fStartCoolTime) - rSlot.fCoolTime < 1.0f)
__CreateFinishCoolTimeEffect(&rSlot); __CreateFinishCoolTimeEffect(&rSlot);
@ -1218,8 +1218,8 @@ BOOL CSlotWindow::GetPickedSlotPointer(TSlot ** ppSlot)
int ixLocal = lx - m_rect.left; int ixLocal = lx - m_rect.left;
int iyLocal = ly - m_rect.top; int iyLocal = ly - m_rect.top;
// NOTE : 왼쪽 맨위 상단 한곳이 기준 이라는 점을 이용해 왼쪽 위에서부터 오른쪽 아래로 // NOTE : 왼쪽 맨위 상단 한곳이 기준 이라는 점을 이용해 왼쪽 위에서부터 오른쪽 아래로
// 차례로 검색해 감으로써 덮혀 있는 Slot은 자동 무시 된다는 특성을 이용한다. - [levites] // 차례로 검색해 감으로써 덮혀 있는 Slot은 자동 무시 된다는 특성을 이용한다. - [levites]
for (TSlotListIterator itor = m_SlotList.begin(); itor != m_SlotList.end(); ++itor) for (TSlotListIterator itor = m_SlotList.begin(); itor != m_SlotList.end(); ++itor)
{ {
TSlot & rSlot = *itor; TSlot & rSlot = *itor;
@ -1227,7 +1227,7 @@ BOOL CSlotWindow::GetPickedSlotPointer(TSlot ** ppSlot)
int ixCellSize = rSlot.ixCellSize; int ixCellSize = rSlot.ixCellSize;
int iyCellSize = rSlot.iyCellSize; int iyCellSize = rSlot.iyCellSize;
// NOTE : Item이 Hide 되어있을 경우를 위한.. // NOTE : Item이 Hide 되어있을 경우를 위한..
if (rSlot.isItem) if (rSlot.isItem)
{ {
ixCellSize = max(rSlot.ixCellSize, int(rSlot.byxPlacedItemSize * ITEM_WIDTH)); ixCellSize = max(rSlot.ixCellSize, int(rSlot.byxPlacedItemSize * ITEM_WIDTH));

View File

@ -24,7 +24,7 @@ namespace UI
SLOT_STATE_LOCK = (1 << 0), SLOT_STATE_LOCK = (1 << 0),
SLOT_STATE_CANT_USE = (1 << 1), SLOT_STATE_CANT_USE = (1 << 1),
SLOT_STATE_DISABLE = (1 << 2), SLOT_STATE_DISABLE = (1 << 2),
SLOT_STATE_ALWAYS_RENDER_COVER = (1 << 3), // 현재 Cover 버튼은 슬롯에 무언가 들어와 있을 때에만 렌더링 하는데, 이 flag가 있으면 빈 슬롯이어도 커버 렌더링 SLOT_STATE_ALWAYS_RENDER_COVER = (1 << 3), // 현재 Cover 버튼은 슬롯에 무언가 들어와 있을 때에만 렌더링 하는데, 이 flag가 있으면 빈 슬롯이어도 커버 렌더링
}; };
class CSlotWindow : public CWindow class CSlotWindow : public CWindow
@ -44,9 +44,9 @@ namespace UI
{ {
DWORD dwState; DWORD dwState;
DWORD dwSlotNumber; DWORD dwSlotNumber;
DWORD dwCenterSlotNumber; // NOTE : 사이즈가 큰 아이템의 경우 아이템의 실제 위치 번호 DWORD dwCenterSlotNumber; // NOTE : 사이즈가 큰 아이템의 경우 아이템의 실제 위치 번호
DWORD dwItemIndex; // NOTE : 여기서 사용되는 Item이라는 단어는 좁은 개념의 것이 아닌, DWORD dwItemIndex; // NOTE : 여기서 사용되는 Item이라는 단어는 좁은 개념의 것이 아닌,
BOOL isItem; // "슬롯의 내용물"이라는 포괄적인 개념어. 더 좋은 것이 있을까? - [levites] BOOL isItem; // "슬롯의 내용물"이라는 포괄적인 개념어. 더 좋은 것이 있을까? - [levites]
// CoolTime // CoolTime
float fCoolTime; float fCoolTime;

View File

@ -66,10 +66,10 @@ namespace UI
void CWindow::Clear() void CWindow::Clear()
{ {
// FIXME : Children을 즉시 Delete하지는 않는다. // FIXME : Children을 즉시 Delete하지는 않는다.
// 어차피 Python쪽에서 Destroy가 하나씩 다시 호출 될 것이므로.. // 어차피 Python쪽에서 Destroy가 하나씩 다시 호출 될 것이므로..
// 하지만 만약을 위해 링크는 끊어 놓는다. // 하지만 만약을 위해 링크는 끊어 놓는다.
// 더 좋은 형태는 있는가? - [levites] // 더 좋은 형태는 있는가? - [levites]
std::for_each(m_pChildList.begin(), m_pChildList.end(), FClear()); std::for_each(m_pChildList.begin(), m_pChildList.end(), FClear());
m_pChildList.clear(); m_pChildList.clear();
@ -93,8 +93,8 @@ namespace UI
m_bShow = false; m_bShow = false;
} }
// NOTE : IsShow는 "자신이 보이는가?" 이지만, __IsShowing은 "자신이 그려지고 있는가?" 를 체크한다 // NOTE : IsShow는 "자신이 보이는가?" 이지만, __IsShowing은 "자신이 그려지고 있는가?" 를 체크한다
// 자신은 Show 지만 Tree 위쪽의 Parent 중 하나는 Hide 일 수 있으므로.. - [levites] // 자신은 Show 지만 Tree 위쪽의 Parent 중 하나는 Hide 일 수 있으므로.. - [levites]
bool CWindow::IsRendering() bool CWindow::IsRendering()
{ {
if (!IsShow()) if (!IsShow())
@ -577,7 +577,7 @@ namespace UI
BOOL CWindow::OnMouseLeftButtonUp() BOOL CWindow::OnMouseLeftButtonUp()
{ {
PyCallClassMemberFunc(m_poHandler, "OnMouseLeftButtonUp", BuildEmptyTuple()); PyCallClassMemberFunc(m_poHandler, "OnMouseLeftButtonUp", BuildEmptyTuple());
return TRUE; // NOTE : ButtonUp은 예외로 무조건 TRUE return TRUE; // NOTE : ButtonUp은 예외로 무조건 TRUE
} }
BOOL CWindow::OnMouseLeftButtonDoubleClick() BOOL CWindow::OnMouseLeftButtonDoubleClick()
@ -1291,7 +1291,7 @@ namespace UI
} }
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// MarkBox - 마크 출력용 UI 윈도우 // MarkBox - 마크 출력용 UI 윈도우
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
CMarkBox::CMarkBox(PyObject * ppyObject) : CWindow(ppyObject) CMarkBox::CMarkBox(PyObject * ppyObject) : CWindow(ppyObject)
{ {

View File

@ -28,16 +28,16 @@ namespace UI
enum EFlags enum EFlags
{ {
FLAG_MOVABLE = (1 << 0), // 움직일 수 있는 창 FLAG_MOVABLE = (1 << 0), // 움직일 수 있는 창
FLAG_LIMIT = (1 << 1), // 창이 화면을 벗어나지 않음 FLAG_LIMIT = (1 << 1), // 창이 화면을 벗어나지 않음
FLAG_SNAP = (1 << 2), // 스냅 될 수 있는 창 FLAG_SNAP = (1 << 2), // 스냅 될 수 있는 창
FLAG_DRAGABLE = (1 << 3), FLAG_DRAGABLE = (1 << 3),
FLAG_ATTACH = (1 << 4), // 완전히 부모에 붙어 있는 창 (For Drag / ex. ScriptWindow) FLAG_ATTACH = (1 << 4), // 완전히 부모에 붙어 있는 창 (For Drag / ex. ScriptWindow)
FLAG_RESTRICT_X = (1 << 5), // 좌우 이동 제한 FLAG_RESTRICT_X = (1 << 5), // 좌우 이동 제한
FLAG_RESTRICT_Y = (1 << 6), // 상하 이동 제한 FLAG_RESTRICT_Y = (1 << 6), // 상하 이동 제한
FLAG_NOT_CAPTURE = (1 << 7), FLAG_NOT_CAPTURE = (1 << 7),
FLAG_FLOAT = (1 << 8), // 공중에 떠있어서 순서 재배치가 되는 창 FLAG_FLOAT = (1 << 8), // 공중에 떠있어서 순서 재배치가 되는 창
FLAG_NOT_PICK = (1 << 9), // 마우스에 의해 Pick되지 않는 창 FLAG_NOT_PICK = (1 << 9), // 마우스에 의해 Pick되지 않는 창
FLAG_IGNORE_SIZE = (1 << 10), FLAG_IGNORE_SIZE = (1 << 10),
FLAG_RTL = (1 << 11), // Right-to-left FLAG_RTL = (1 << 11), // Right-to-left
}; };
@ -91,8 +91,8 @@ namespace UI
bool IsIn(long x, long y); bool IsIn(long x, long y);
bool IsIn(); bool IsIn();
CWindow * PickWindow(long x, long y); CWindow * PickWindow(long x, long y);
CWindow * PickTopWindow(long x, long y); // NOTE : Children으로 내려가지 않고 상위에서만 CWindow * PickTopWindow(long x, long y); // NOTE : Children으로 내려가지 않고 상위에서만
// 체크 하는 특화된 함수 // 체크 하는 특화된 함수
void __RemoveReserveChildren(); void __RemoveReserveChildren();
@ -166,10 +166,10 @@ namespace UI
EHorizontalAlign m_HorizontalAlign; EHorizontalAlign m_HorizontalAlign;
EVerticalAlign m_VerticalAlign; EVerticalAlign m_VerticalAlign;
long m_x, m_y; // X,Y 상대좌표 long m_x, m_y; // X,Y 상대좌표
long m_lWidth, m_lHeight; // 크기 long m_lWidth, m_lHeight; // 크기
RECT m_rect; // Global 좌표 RECT m_rect; // Global 좌표
RECT m_limitBiasRect; // limit bias 값 RECT m_limitBiasRect; // limit bias 값
bool m_bMovable; bool m_bMovable;
bool m_bShow; bool m_bShow;

View File

@ -534,7 +534,7 @@ namespace UI
if (m_pActiveWindow) if (m_pActiveWindow)
m_pActiveWindow->OnKillFocus(); m_pActiveWindow->OnKillFocus();
// 이미 락된 윈도우리스트안에 있다면 제거한다.. // 이미 락된 윈도우리스트안에 있다면 제거한다..
m_LockWindowList.remove(pWin); m_LockWindowList.remove(pWin);
if (m_pLockWindow) if (m_pLockWindow)
@ -575,8 +575,8 @@ namespace UI
if (m_pActiveWindow) if (m_pActiveWindow)
{ {
// NOTE : 누적된 Window가 많아지면 Clear를 해줘야 할까? // NOTE : 누적된 Window가 많아지면 Clear를 해줘야 할까?
// 일단은 중복 누적이 안되며 포커스 되는 갯수 자체가 5개 미만이니 굳이 필요하지는 않을 듯.. - [levites] // 일단은 중복 누적이 안되며 포커스 되는 갯수 자체가 5개 미만이니 굳이 필요하지는 않을 듯.. - [levites]
m_ActiveWindowList.push_back(m_pActiveWindow); m_ActiveWindowList.push_back(m_pActiveWindow);
m_pActiveWindow->OnKillFocus(); m_pActiveWindow->OnKillFocus();
} }
@ -618,8 +618,8 @@ namespace UI
CWindow * pParentWindow = pWin->GetParent(); CWindow * pParentWindow = pWin->GetParent();
pParentWindow->SetTop(pWin); pParentWindow->SetTop(pWin);
// NOTE : Capture가 리셋된다..? - [levites] // NOTE : Capture가 리셋된다..? - [levites]
// NOTE : 인벤토리에서 아이템을 드래그 해서 밖에다 놓을때 캡춰가 남아서 창의 버튼을 두번 눌러야 하는 버그를 위해 추가 // NOTE : 인벤토리에서 아이템을 드래그 해서 밖에다 놓을때 캡춰가 남아서 창의 버튼을 두번 눌러야 하는 버그를 위해 추가
// ResetCapture(); // ResetCapture();
} }
@ -628,7 +628,7 @@ namespace UI
if (m_pLockWindow) if (m_pLockWindow)
return; return;
// GameLayer에 속해 있는 윈도우가 피킹 됐다면 무조건 SetTop을 해준다. // GameLayer에 속해 있는 윈도우가 피킹 됐다면 무조건 SetTop을 해준다.
TLayerContainer::iterator itor = m_LayerWindowMap.find("UI"); TLayerContainer::iterator itor = m_LayerWindowMap.find("UI");
if (itor == m_LayerWindowMap.end()) if (itor == m_LayerWindowMap.end())
return; return;
@ -896,7 +896,7 @@ namespace UI
{ {
if (m_pLeftCaptureWindow->OnMouseLeftButtonUp()) if (m_pLeftCaptureWindow->OnMouseLeftButtonUp())
{ {
// NOTE : 여기서 m_pLeftCaptureWindow가 NULL 일 수 있습니다!! - [levites] // NOTE : 여기서 m_pLeftCaptureWindow가 NULL 일 수 있습니다!! - [levites]
m_pLeftCaptureWindow = NULL; m_pLeftCaptureWindow = NULL;
return; return;
} }
@ -1099,7 +1099,7 @@ namespace UI
return; return;
} }
// NOTE : 전체로 돌리지 않고 Activate되어있는 EditLine에만 보내는 이벤트 // NOTE : 전체로 돌리지 않고 Activate되어있는 EditLine에만 보내는 이벤트
} }
void CWindowManager::RunChangeCodePage() void CWindowManager::RunChangeCodePage()

View File

@ -1260,7 +1260,7 @@ PyObject * wndMgrSetSlotCoolTime(PyObject * poSelf, PyObject * poArgs)
PyObject * wndMgrSetToggleSlot(PyObject * poSelf, PyObject * poArgs) PyObject * wndMgrSetToggleSlot(PyObject * poSelf, PyObject * poArgs)
{ {
assert(!"wndMgrSetToggleSlot - 사용하지 않는 함수"); assert(!"wndMgrSetToggleSlot - \xBB\xE7\xBF\xEB\xC7\xCF\xC1\xF6 \xBE\xCA\xB4\xC2 \xC7\xD4\xBC\xF6");
return Py_BuildNone(); return Py_BuildNone();
} }
@ -1883,13 +1883,13 @@ PyObject * wndMarkBox_SetImageFilename(PyObject * poSelf, PyObject * poArgs)
PyObject * wndMarkBox_SetImage(PyObject * poSelf, PyObject * poArgs) PyObject * wndMarkBox_SetImage(PyObject * poSelf, PyObject * poArgs)
{ {
// 아무것도 하지 않음 // 아무것도 하지 않음
return Py_BuildNone(); return Py_BuildNone();
} }
PyObject * wndMarkBox_Load(PyObject * poSelf, PyObject * poArgs) PyObject * wndMarkBox_Load(PyObject * poSelf, PyObject * poArgs)
{ {
// 아무것도 하지 않음 // 아무것도 하지 않음
return Py_BuildNone(); return Py_BuildNone();
} }
@ -2495,7 +2495,7 @@ void initwndMgr()
PyObject * poModule = Py_InitModule("wndMgr", s_methods); PyObject * poModule = Py_InitModule("wndMgr", s_methods);
// 하나의 딕셔너리에 너무 많은 Function이 포함 되는 것 같아 이런식으로 딕셔너리를 나누는 것을 고려 중 - [levites] // 하나의 딕셔너리에 너무 많은 Function이 포함 되는 것 같아 이런식으로 딕셔너리를 나누는 것을 고려 중 - [levites]
// PyObject * poMgrModule = Py_InitModule("wndMgr", s_methods); // PyObject * poMgrModule = Py_InitModule("wndMgr", s_methods);
// PyObject * poTextModule = Py_InitModule("wndText", s_methods); // PyObject * poTextModule = Py_InitModule("wndText", s_methods);
// PyObject * poSlotModule = Py_InitModule("wndSlot", s_methods); // PyObject * poSlotModule = Py_InitModule("wndSlot", s_methods);

View File

@ -112,7 +112,7 @@ void CActorInstance::OnUpdate()
} }
// 2004.07.05.myevan. 궁신탄영 맵에 끼이는 문제해결 // 2004.07.05.myevan. 궁신탄영 맵에 끼이는 문제해결
IBackground& CActorInstance::GetBackground() IBackground& CActorInstance::GetBackground()
{ {
return IBackground::Instance(); return IBackground::Instance();
@ -202,7 +202,7 @@ void CActorInstance::SetFishingPosition(D3DXVECTOR3 & rv3Position)
m_v3FishingPosition = rv3Position; m_v3FishingPosition = rv3Position;
} }
// ActorInstanceMotion.cpp 에 넣도록 하자 // ActorInstanceMotion.cpp 에 넣도록 하자
void CActorInstance::Move() void CActorInstance::Move()
{ {
if (m_isWalking) if (m_isWalking)
@ -459,8 +459,8 @@ void CActorInstance::PhysicsProcess()
void CActorInstance::__AccumulationMovement(float fRot) void CActorInstance::__AccumulationMovement(float fRot)
{ {
// NOTE - 일단은 WAIT로 미끄러짐 방지 // NOTE - 일단은 WAIT로 미끄러짐 방지
// 추후에는 RaceMotionData가 이동되는 모션인지에 대한 Flag를 갖고 있게끔 한다. - [levites] // 추후에는 RaceMotionData가 이동되는 모션인지에 대한 Flag를 갖고 있게끔 한다. - [levites]
if (CRaceMotionData::NAME_WAIT == __GetCurrentMotionIndex()) if (CRaceMotionData::NAME_WAIT == __GetCurrentMotionIndex())
return; return;
@ -606,9 +606,9 @@ void CActorInstance::AdjustDynamicCollisionMovement(const CActorInstance * c_pAc
return; return;
} }
// NOTE : 기존의 Sphere Overlap됬을경우 처리가 비비기를 하면은 Penetration될 위험이 많아서 ( 실제로도 나왔고 --) // NOTE : 기존의 Sphere Overlap됬을경우 처리가 비비기를 하면은 Penetration될 위험이 많아서 ( 실제로도 나왔고 --)
// Sphere간 Collision이 생겼을 경우 이전위치로 RollBack하는 방식으로 바꿨다. // Sphere간 Collision이 생겼을 경우 이전위치로 RollBack하는 방식으로 바꿨다.
// 단 BGObject에 대해서만. // 단 BGObject에 대해서만.
if (isAttacking() ) if (isAttacking() )
return; return;
@ -618,7 +618,7 @@ void CActorInstance::AdjustDynamicCollisionMovement(const CActorInstance * c_pAc
{ {
BlockMovement(); BlockMovement();
//Movement초기화 //Movement초기화
/* m_v3Movement = D3DXVECTOR3(0.f,0.f,0.f); /* m_v3Movement = D3DXVECTOR3(0.f,0.f,0.f);
TCollisionPointInstanceListIterator itMain = m_BodyPointInstanceList.begin(); TCollisionPointInstanceListIterator itMain = m_BodyPointInstanceList.begin();
@ -682,7 +682,7 @@ void CActorInstance::__AdjustCollisionMovement(const CGraphicObjectInstance * c_
return; return;
} }
// Body는 하나임을 가정합니다. // Body는 하나임을 가정합니다.
if (m_v3Movement.x == 0.0f && m_v3Movement.y == 0.0f && m_v3Movement.z == 0.0f) if (m_v3Movement.x == 0.0f && m_v3Movement.y == 0.0f && m_v3Movement.z == 0.0f)
return; return;

Some files were not shown because too many files have changed in this diff Show More