This commit is contained in:
Juan Linietsky 2014-02-20 23:02:47 -03:00
commit b62ec387f3
17 changed files with 102 additions and 37 deletions

20
.gitignore vendored
View file

@ -13,12 +13,24 @@ modules/register_module_types.cpp
core/version.h
core/method_bind.inc
core/global_defaults.cpp
tools/editor/register_exporters.cpp
-fpic
# Android specific
platform/android/java/local.properties
platform/android/java/project.properties
platform/android/java/AndroidManifest.xml
tools/editor/register_exporters.cpp
platform/android/java/bin/
platform/android/java/gen/
platform/android/java/assets
# General c++ generated files
*.lib
*.o
*.a
*.d
*.so
*.os
# QT project files
*.config
@ -26,6 +38,8 @@ tools/editor/register_exporters.cpp
*.files
*.includes
# Misc
.DS_Store
# for projects that use SCons for building: http://http://www.scons.org/
.sconsign.dblite
@ -59,6 +73,8 @@ bld/
*.VisualState.xml
TestResult.xml
*.o
*.a
*_i.c
*_p.c
*_i.h
@ -216,4 +232,4 @@ ehthumbs.db
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
$RECYCLE.BIN/

View file

@ -97,16 +97,17 @@ ResourceInteractiveLoaderXML::Tag* ResourceInteractiveLoaderXML::parse_tag(bool
if (!complete) {
String name;
String value;
CharString r_value;
bool reading_value=false;
while(!f->eof_reached()) {
CharType c=get_char();
if (c=='>') {
if (value.length()) {
if (r_value.size()) {
tag.args[name]=value;
r_value.push_back(0);
tag.args[name].parse_utf8(r_value.get_data());
}
break;
@ -115,17 +116,18 @@ ResourceInteractiveLoaderXML::Tag* ResourceInteractiveLoaderXML::parse_tag(bool
if (!reading_value && name.length()) {
reading_value=true;
} else if (reading_value && value.length()) {
} else if (reading_value && r_value.size()) {
tag.args[name]=value;
r_value.push_back(0);
tag.args[name].parse_utf8(r_value.get_data());
name="";
value="";
r_value.clear();
reading_value=false;
}
} else if (reading_value) {
value+=c;
r_value.push_back(c);
} else {
name+=c;

View file

@ -2518,7 +2518,7 @@ bool String::begins_with(const char* p_string) const {
}
return true;
return *p_string == 0;
}

View file

@ -15046,6 +15046,13 @@
<description>
</description>
</method>
<method name="get_tiles_ids" qualifiers="const" >
<return type="Array">
</return>
<description>
</description>
</method>
</methods>
<constants>
</constants>

View file

@ -12,7 +12,7 @@
#ifndef WEBP_WEBP_DECODE_VP8_H_
#define WEBP_WEBP_DECODE_VP8_H_
#include "../webp/decode.h"
#include "../decode.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {

View file

@ -14,7 +14,7 @@
#include "./vp8i.h"
#include "./vp8li.h"
#include "./webpi.h"
#include "../webp/format_constants.h"
#include "../format_constants.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {

View file

@ -8,13 +8,13 @@
// WebP container demux.
//
#include "../webp/mux.h"
#include "../mux.h"
#include <stdlib.h>
#include <string.h>
#include "../webp/decode.h" // WebPGetInfo
#include "../webp/format_constants.h"
#include "../decode.h" // WebPGetInfo
#include "../format_constants.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {

View file

@ -15,8 +15,8 @@
#include <stdlib.h>
#include "../dec/vp8i.h"
#include "../dec/vp8li.h"
#include "../webp/format_constants.h"
#include "../webp/mux.h"
#include "../format_constants.h"
#include "../mux.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {

View file

@ -5,11 +5,14 @@ iphone_lib = [
'#platform/iphone/os_iphone.cpp',
#'#platform/iphone/rasterizer_iphone.cpp',
'#platform/iphone/audio_driver_iphone.cpp',
'#platform/iphone/sem_iphone.cpp',
'#platform/iphone/gl_view.mm',
'#platform/iphone/main.m',
'#platform/iphone/app_delegate.mm',
'#platform/iphone/view_controller.mm',
'#platform/iphone/scoreloop_ios.mm',
'#platform/iphone/game_center.mm',
'#platform/iphone/in_app_store.mm',
'#platform/iphone/Appirater.m',
]
@ -17,14 +20,25 @@ iphone_lib = [
#iphone_lib = env.Library('iphone', iphone_lib)
obj = env.Object('#platform/iphone/godot_iphone.cpp')
env_ios = env.Clone();
if env['ios_gles22_override'] == "yes":
env_ios.Append(CPPFLAGS=['-DGLES2_OVERRIDE'])
if env['ios_GLES1_override'] == "yes":
env_ios.Append(CPPFLAGS=['-DGLES1_OVERRIDE'])
if env['ios_appirater'] == "yes":
env_ios.Append(CPPFLAGS=['-DAPPIRATER_ENABLED'])
obj = env_ios.Object('#platform/iphone/godot_iphone.cpp')
prog = None
if env["target"]=="release":
prog = env.Program('#bin/godot_iphone_opt', [obj] + iphone_lib)
prog = env_ios.Program('#bin/godot_opt', [obj] + iphone_lib)
#action = "dsymutil "+File(prog)[0].path+" -o ../build/script_exec/build/Debug-iphoneos/script_exec.app.dSYM"
#env.AddPostAction(prog, action)
else:
prog = env.Program('#bin/godot', [obj] + iphone_lib)
prog = env_ios.Program('#bin/godot', [obj] + iphone_lib)
#action = "dsymutil "+File(prog)[0].path+" -o ../build/script_exec/build/Debug-iphoneos/script_exec.app.dSYM"
#env.AddPostAction(prog, action)

View file

@ -21,8 +21,14 @@ def get_opts():
return [
('ISIMPLATFORM', 'name of the iphone platform', 'iPhoneSimulator'),
('ISIMPATH', 'the path to iphone toolchain', '/Developer/Platforms/${ISIMPLATFORM}.platform'),
('ISIMSDK', 'path to the iphone SDK', '$ISIMPATH/Developer/SDKs/${ISIMPLATFORM}4.3.sdk'),
('ISIMPATH', 'the path to iphone toolchain', '/Applications/Xcode.app/Contents/Developer/Platforms/${ISIMPLATFORM}.platform'),
('ISIMSDK', 'path to the iphone SDK', '$ISIMPATH/Developer/SDKs/${ISIMPLATFORM}7.0.sdk'),
('game_center', 'Support for game center', 'yes'),
('store_kit', 'Support for in-app store', 'yes'),
('ios_gles22_override', 'Force GLES2.0 on iOS', 'yes'),
('ios_GLES1_override', 'Force legacy GLES (1.1) on iOS', 'no'),
('ios_appirater', 'Enable Appirater', 'no'),
('ios_exceptions', 'Use exceptions when compiling on playbook', 'no'),
]
def get_flags():
@ -31,6 +37,8 @@ def get_flags():
('lua', 'no'),
('tools', 'yes'),
('nedmalloc', 'no'),
('webp', 'yes'),
('module_FacebookScorer_ios_enabled', 'no'),
]
@ -50,12 +58,12 @@ def configure(env):
env['AR'] = 'ar'
import string
env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -Wall -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $ISIMSDK -mmacosx-version-min=10.6 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -Wall -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $ISIMSDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
env.Append(LINKFLAGS=['-arch', 'i386',
#'-miphoneos-version-min=2.2.1',
'-mios-simulator-version-min=4.3',
'-isysroot', '$ISIMSDK',
'-mmacosx-version-min=10.6',
#'-mmacosx-version-min=10.6',
'-Xlinker',
'-objc_abi_version',
'-Xlinker', '2',

View file

@ -845,18 +845,17 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
/*** OSX INITIALIZATION ***/
/*** OSX INITIALIZATION ***/
/*** OSX INITIALIZATION ***/
current_videomode=p_desired;
window_delegate = [[GodotWindowDelegate alloc] init];
// Don't use accumulation buffer support; it's not accelerated
// Aux buffers probably aren't accelerated either
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | (current_videomode.resizable?NSResizableWindowMask:0);
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | (p_desired.resizable?NSResizableWindowMask:0);
window_object = [[GodotWindow alloc]
initWithContentRect:NSMakeRect(0, 0, current_videomode.width,current_videomode.height)
initWithContentRect:NSMakeRect(0, 0, p_desired.width, p_desired.height)
styleMask:styleMask
backing:NSBackingStoreBuffered
defer:NO];
@ -865,6 +864,13 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
window_view = [[GodotContentView alloc] init];
current_videomode = p_desired;
// Adjust for display density
const NSRect fbRect = convertRectToBacking(NSMakeRect(0, 0, p_desired.width, p_desired.height));
current_videomode.width = fbRect.size.width;
current_videomode.height = fbRect.size.height;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) {
[window_view setWantsBestResolutionOpenGLSurface:YES];

File diff suppressed because one or more lines are too long

View file

@ -337,8 +337,9 @@ Error StreamPeerWinsock::connect(const IP_Address& p_host, uint16_t p_port) {
};
void StreamPeerWinsock::set_nodelay(bool p_enabled) {
ERR_FAIL_COND(!is_connected());
int flag=p_enabled?1:0;
setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int));
}

View file

@ -250,6 +250,17 @@ Array TileSet::_tile_get_shapes(int p_id) const{
return arr;
}
Array TileSet::_get_tiles_ids() const{
Array arr;
for (Map<int, Data>::Element *E = tile_map.front(); E; E = E->next()) {
arr.push_back(E->key());
}
return arr;
}
void TileSet::get_tile_list(List<int> *p_tiles) const {
for(Map<int,Data>::Element *E=tile_map.front();E;E=E->next()) {
@ -322,6 +333,7 @@ void TileSet::_bind_methods() {
ObjectTypeDB::bind_method(_MD("clear"),&TileSet::clear);
ObjectTypeDB::bind_method(_MD("get_last_unused_tile_id"),&TileSet::get_last_unused_tile_id);
ObjectTypeDB::bind_method(_MD("find_tile_by_name","name"),&TileSet::find_tile_by_name);
ObjectTypeDB::bind_method(_MD("get_tiles_ids", "name"), &TileSet::_get_tiles_ids);
}

View file

@ -57,6 +57,7 @@ protected:
void _get_property_list( List<PropertyInfo> *p_list) const;
void _tile_set_shapes(int p_id,const Array& p_shapes);
Array _tile_get_shapes(int p_id) const;
Array _get_tiles_ids() const;
static void _bind_methods();
public:

View file

@ -288,8 +288,8 @@ void Physics2DServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("area_clear_shapes","area"),&Physics2DServer::area_clear_shapes);
ObjectTypeDB::bind_method(_MD("area_set_param","area","param","value"),&Physics2DServer::area_get_param);
ObjectTypeDB::bind_method(_MD("area_set_transform","area","transform"),&Physics2DServer::area_get_transform);
ObjectTypeDB::bind_method(_MD("area_set_param","area","param","value"),&Physics2DServer::area_set_param);
ObjectTypeDB::bind_method(_MD("area_set_transform","area","transform"),&Physics2DServer::area_set_transform);
ObjectTypeDB::bind_method(_MD("area_get_param","area","param"),&Physics2DServer::area_get_param);
ObjectTypeDB::bind_method(_MD("area_get_transform","area"),&Physics2DServer::area_get_transform);

View file

@ -1057,7 +1057,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
tree = memnew( Tree );
tree_vb->add_margin_child("Resources to Export:",tree,true);
sections->add_child(tree);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
tree->connect("item_edited",this,"_tree_changed");
tree->set_columns(2);