scene::EMD2_ANIMATION_TYPE
scm_to_md2_animation_type (SCM md2_animation_type)
{
- char* flag = scm_to_utf8_stringn (scm_symbol_to_string (md2_animation_type), NULL);
+ char* flag = scm_to_utf8_string (scm_symbol_to_string (md2_animation_type));
if (!strcmp (flag, "stand"))
{
return scene::EMAT_STAND;
video::E_DRIVER_TYPE
scm_to_driver_type (SCM driver_type)
{
- char* driverType = scm_to_utf8_stringn (scm_symbol_to_string (driver_type), NULL);
+ char* driverType = scm_to_utf8_string (scm_symbol_to_string (driver_type));
if (!strcmp (driverType, "null"))
{
return video::EDT_NULL;
io::E_FILE_ARCHIVE_TYPE
scm_to_file_archive_type (SCM file_archive_type)
{
- char* type = scm_to_utf8_stringn (scm_symbol_to_string (file_archive_type), NULL);
+ char* type = scm_to_utf8_string (scm_symbol_to_string (file_archive_type));
if (!strcmp (type, "zip"))
{
return io::EFAT_ZIP;
return scm_from_bool
(((io::IFileSystem*)scm_to_irr_pointer (file_system))->
- addFileArchive (scm_to_utf8_stringn (filename, NULL),
+ addFileArchive (scm_to_utf8_string (filename),
scm_to_bool (ignore_case),
scm_to_bool (ignore_paths),
scm_to_file_archive_type (archive_type),
- scm_to_utf8_stringn (password, NULL),
+ scm_to_utf8_string (password),
retArchiveReference));
}
{
gui::IGUIFont* font =
((gui::IGUIEnvironment*)scm_to_irr_pointer (gui_environment))->
- getFont (scm_to_utf8_stringn (filename, NULL));
+ getFont (scm_to_utf8_string (filename));
return scm_from_pointer ((void*)font, NULL);
}
gui::EGUI_DEFAULT_COLOR
scm_to_default_color (SCM default_color)
{
- char* color = scm_to_utf8_stringn (scm_symbol_to_string (default_color), NULL);
+ char* color = scm_to_utf8_string (scm_symbol_to_string (default_color));
if (!strcmp (color, "3d-dark-shadow"))
{
return gui::EGDC_3D_DARK_SHADOW;
gui::EGUI_DEFAULT_FONT
scm_to_default_font (SCM default_font)
{
- char* font = scm_to_utf8_stringn (scm_symbol_to_string (default_font), NULL);
+ char* font = scm_to_utf8_string (scm_symbol_to_string (default_font));
if (!strcmp (font, "default"))
{
return gui::EGDF_DEFAULT;
video::E_MATERIAL_FLAG
scm_to_material_flag (SCM material_flag)
{
- char* flag = scm_to_utf8_stringn (scm_symbol_to_string (material_flag), NULL);
+ char* flag = scm_to_utf8_string (scm_symbol_to_string (material_flag));
if (!strcmp (flag, "wireframe"))
{
return video::EMF_WIREFRAME;
video::E_MATERIAL_TYPE
scm_to_material_type (SCM material_type)
{
- char* type = scm_to_utf8_stringn (scm_symbol_to_string (material_type), NULL);
+ char* type = scm_to_utf8_string (scm_symbol_to_string (material_type));
if (!strcmp (type, "solid"))
{
return video::EMT_SOLID;
video::E_ANTI_ALIASING_MODE
scm_to_anti_aliasing_mode (SCM anti_aliasing_mode)
{
- char* mode = scm_to_utf8_stringn (scm_symbol_to_string (anti_aliasing_mode), NULL);
+ char* mode = scm_to_utf8_string (scm_symbol_to_string (anti_aliasing_mode));
if (!strcmp (mode, "off"))
{
return video::EAAM_OFF;
video::E_BLEND_OPERATION
scm_to_blend_operation (SCM blend_operation)
{
- char* operation = scm_to_utf8_stringn (scm_symbol_to_string (blend_operation), NULL);
+ char* operation = scm_to_utf8_string (scm_symbol_to_string (blend_operation));
if (!strcmp (operation, "none"))
{
return video::EBO_NONE;
video::E_COLOR_MATERIAL
scm_to_color_material (SCM color_material)
{
- char* material = scm_to_utf8_stringn (scm_symbol_to_string (color_material), NULL);
+ char* material = scm_to_utf8_string (scm_symbol_to_string (color_material));
if (!strcmp (material, "none"))
{
return video::ECM_NONE;
video::E_COLOR_PLANE
scm_to_color_plane (SCM color_plane)
{
- char* plane = scm_to_utf8_stringn (scm_symbol_to_string (color_plane), NULL);
+ char* plane = scm_to_utf8_string (scm_symbol_to_string (color_plane));
if (!strcmp (plane, "none"))
{
return video::ECP_NONE;
video::E_COMPARISON_FUNC
scm_to_comparison_func (SCM comparison_func)
{
- char* func = scm_to_utf8_stringn (scm_symbol_to_string (comparison_func), NULL);
+ char* func = scm_to_utf8_string (scm_symbol_to_string (comparison_func));
if (!strcmp (func, "never"))
{
return video::ECFN_NEVER;
video::E_POLYGON_OFFSET
scm_to_polygon_offset (SCM polygon_offset)
{
- char* offset = scm_to_utf8_stringn (scm_symbol_to_string (polygon_offset), NULL);
+ char* offset = scm_to_utf8_string (scm_symbol_to_string (polygon_offset));
if (!strcmp (offset, "back"))
{
return video::EPO_BACK;
scene::E_PRIMITIVE_TYPE
scm_to_primitive_type (SCM primitive_type)
{
- char* type = scm_to_utf8_stringn (scm_symbol_to_string (primitive_type), NULL);
+ char* type = scm_to_utf8_string (scm_symbol_to_string (primitive_type));
if (!strcmp (type, "points"))
{
return scene::EPT_POINTS;
SCM filename)
{
scene::ISceneManager* smgr = (scene::ISceneManager*) scm_to_irr_pointer (scene_manager);
- scene::IAnimatedMesh* mesh = smgr->getMesh(scm_to_utf8_stringn (filename, NULL));
+ scene::IAnimatedMesh* mesh = smgr->getMesh(scm_to_utf8_string (filename));
return scm_from_pointer ((void*) mesh, NULL);
}
video::E_VERTEX_TYPE
scm_to_vertex_type (SCM vertex_type)
{
- char* type = scm_to_utf8_stringn (scm_symbol_to_string (vertex_type), NULL);
+ char* type = scm_to_utf8_string (scm_symbol_to_string (vertex_type));
if (!strcmp (type, "standard"))
{
return video::EVT_STANDARD;
SCM filename)
{
video::IVideoDriver* driver = (video::IVideoDriver*) scm_to_irr_pointer (video_driver);
- video::ITexture* texture = driver->getTexture (scm_to_utf8_stringn (filename, NULL));
+ video::ITexture* texture = driver->getTexture (scm_to_utf8_string (filename));
return scm_from_pointer ((void*) texture, NULL);
}
video::E_TRANSFORMATION_STATE
scm_to_transformation_state (SCM transformation_state)
{
- char* state = scm_to_utf8_stringn (scm_symbol_to_string (transformation_state), NULL);
+ char* state = scm_to_utf8_string (scm_symbol_to_string (transformation_state));
if (!strcmp (state, "view"))
{
return video::ETS_VIEW;
#include "wchar.h"
SCM
-scm_from_wide_char_string (const wchar_t* wtext)
+scm_from_wide_char_string (const wchar_t* text)
{
- size_t nbytes = wcslen (wtext) + 1;
- char* ctext = (char*)malloc (nbytes);
- wcstombs (ctext, wtext, nbytes);
- return scm_from_utf8_string (ctext);
+ return scm_from_utf32_string ((const scm_t_wchar*) text);
}
const wchar_t*
scm_to_wide_char_string (SCM text)
{
- char* ctext = scm_to_utf8_stringn (text, NULL);
- wchar_t* wtext = (wchar_t*)malloc ((strlen (ctext) + 1) * sizeof (wchar_t));
- mbstowcs (wtext, ctext, strlen (ctext) + 1);
- return wtext;
+ return (const wchar_t*) scm_to_utf32_string (text);
}